You are not logged in.

#1 2013-06-09 04:04:33

leomao
Member
Registered: 2013-04-27
Posts: 9

[Solved] PulseAudio can't remember default device after logout/login

Kernel Version: 3.9.4
DE: Gnome 3.8.3
Recently I updated pulseaudio to 4.0, and I found that my default output device was set to HDMI output. Because I wanted to use Analog output, I change it in the gnome settings. But after I logouted and logined, the output device was set to HTML output again. I have tried to add set-defualt-sink in /etc/pulse/defualt.pa  but it didn't work.

Anyone know how to solve this problem ?
Any advice is appreciated.

aplay -l output:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pacmd list-sinks output:

$ pacmd list-sinks
Welcome to PulseAudio! Use "help" for usage information.
>>> 2 sink(s) available.
    index: 0
	name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo-extra2>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9950
	volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             立體聲
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 5
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 2"
		alsa.id = "HDMI 2"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "8"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf7d00000 irq 46"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "1c20"
		device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "hdmi:0,2"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo-extra2"
		device.profile.description = "Digital Stereo (HDMI)"
		device.description = "內部音效 Digital Stereo (HDMI)"
		alsa.mixer_name = "Intel CougarPoint HDMI"
		alsa.components = "HDA:10ec0892,18491892,00100302 HDA:80862805,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "22GH"
	active port: <hdmi-output-2>
  * index: 1
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9959
	volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 2
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             立體聲
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 5
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC892 Analog"
		alsa.id = "ALC892 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf7d00000 irq 46"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "1c20"
		device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "類比立體聲"
		device.description = "內部音效 類比立體聲"
		alsa.mixer_name = "Intel CougarPoint HDMI"
		alsa.components = "HDA:10ec0892,18491892,00100302 HDA:80862805,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output: 類比輸出 (priority 9900, latency offset 0 usec, available: unknown)
			properties:
				
		analog-output-headphones: 類比頭戴式麥克風 (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output>
>>> 

Sorry for the Chinese characters in output, I tried to set LANG=C but it still outputed Chinese.
And also I'm sorry for my poor English.

Last edited by leomao (2013-07-20 15:37:04)

Offline

#2 2013-06-09 10:29:15

Boneflame
Member
Registered: 2013-06-09
Posts: 5

Re: [Solved] PulseAudio can't remember default device after logout/login

I have the same problem. I just follow the wiki page and set  analog output as my default device.

But there still has a another problem. Pulseaudio CAN'T remember the volume setting respectively, when my headphone pluged in and out.

Offline

#3 2013-06-09 10:50:39

graysky
Member
From: The worse toilet in Scotland
Registered: 2008-12-01
Posts: 8,810
Website

Re: [Solved] PulseAudio can't remember default device after logout/login

I edited that wiki just yesterday after experiencing the very same problem.  I also recommend deleted the customized pulse stuff for all your users and either leaving the configuration to the global /etc/pulse/default.pa or rebuilding them.

rm -rf ~/.pulse
rm -rf ~/.config/pulse

Don't forgot to kill pulseaudio and restart it after doing this, or just reboot if lazy.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2013-06-10 12:14:08

leomao
Member
Registered: 2013-04-27
Posts: 9

Re: [Solved] PulseAudio can't remember default device after logout/login

Thanks for replies.
I just try to remove ~/.pulse and ~/.config/pulse, and edit /etc/pulse/default.pa to set default device to Analog.
But sadly it doesn't work.
After logout/login or reboot it still change back to HDMI.
And I found that after I logout/login or reboot, it automatically edit ~/.config/pulse/xxxxxxxxxx-default-sink and set it to HDMI.
I'm investigating what cause this problem and trying to figure out a solution.

Offline

#5 2013-06-13 01:18:25

ejstacey
Member
Registered: 2013-05-27
Posts: 2

Re: [Solved] PulseAudio can't remember default device after logout/login

I've encountered this too, and I think I have it fixed now:

Run:

$ pacmd list-cards

You should get a list of cards you have, and each card will have a list of profiles.  Get the index number of the card you want.  My card index is 0, and the profile I want is called "output:analog-stereo".

Run

$ pacmd set-card-profile 0 output:analog-stereo

Everything works!

To make it permanent, I edited /etc/pulse/default.pa and at the bottom put:

set-card-profile 0 	output:analog-stereo
set-default-sink 1

This seems to have everything set right after restarting pulseaudio.

Offline

#6 2013-06-14 12:25:48

ajb
Member
From: Poland
Registered: 2008-02-06
Posts: 31

Re: [Solved] PulseAudio can't remember default device after logout/login

Thanks ejstacey!

It works for me even without set-default-sink.

Offline

#7 2013-06-18 10:55:32

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 664

Re: [Solved] PulseAudio can't remember default device after logout/login

I have a similar problem, but the ejastacey's fix doesn't fix it. Actually the first part (default output) is fixed. But alongside this I have another problem.
I use KDE and my volume control, together with VLC isn't working. But if I delete ~/.config/pulse and log off and back in it works. But if I were to restart my computer or log off, volume control stops working again and I can only get it back if I delete .config/pulse.
I'm not even sure if this problem is related to this thread, but I do occasionally suffer from same problems as presented in this thread, so yeah. But again, that I think is solved, but the volume control bug isn't.


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#8 2013-06-27 23:58:57

leomao
Member
Registered: 2013-04-27
Posts: 9

Re: [Solved] PulseAudio can't remember default device after logout/login

Unfortunately, ejastacey's fix doesn'y work for me sad
Actually, I have only one card and it has two output devices (HDMI and analog).

I haven't fixed this problem yet. hope that someone has a solution.

Offline

#9 2013-07-20 15:35:09

leomao
Member
Registered: 2013-04-27
Posts: 9

Re: [Solved] PulseAudio can't remember default device after logout/login

I solve this problem myself

Followings are my steps:
1. login and change the default output to analog
2. Run

$ aplay -l

and find that analog is card 0
3. Run

$ pacmd list

and find the line:

active profile: <output:analog-stereo+input:analog-stereo>

"output:analog-stereo+input:analog-stereo"  is my profile name,  so add

set-card-profile 0 output:analog-stereo+input:analog-stereo

in /etc/pulse/default.pa and save
4. restart pulseaudio and found it works smile

Offline

#10 2016-07-08 20:34:57

Neije
Member
Registered: 2011-07-06
Posts: 22

Re: [Solved] PulseAudio can't remember default device after logout/login

yop and thanks for this answer. It did solve my problem that occured after the update of pa 8 => 9.
But now, I have no control over the volume ...
any idea ? why this line in default.pa blocks all the KDE controls ?

Offline

#11 2016-07-09 21:42:37

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,888
Website

Re: [Solved] PulseAudio can't remember default device after logout/login

Neije, please don't necrobump.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB