[SOLVED] Default Sound device keeps changing

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

[SOLVED] Default Sound device keeps changing

Post by LostAndDazed »

Hi, I suspect this is an underlying Ubuntu issue, but if my 19.1+Cinnamon screen saver kicks in, when I next use Mint it has reset the default sound card from the HDMI back to the internal card, so no video sound. I am changing this back to HDMI about ten times a day. :cry:

I recall this same problem when I was using Ubuntu 16 way back when, but thought Mint would have it fixed by now. Many Updates and Upgrades and still it happens.

How can I force Mint/Ubuntu/Whatever to leave my choice of Sound device alone?

Thanks
Last edited by LostAndDazed on Sun Feb 24, 2019 5:04 pm, edited 1 time in total.
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

User avatar
MrEen
Level 20
Level 20
Posts: 10527
Joined: Mon Jun 12, 2017 8:39 pm

Re: Default Sound device keeps changing

Post by MrEen »

Hi LostAndDazed.

As long as your internal sound card and HDMI sound card are different devices, this should be a piece of cake. The output of running aplay -l in the terminal will answer that question. If there are multiple card numbers, you should be good to try what's next.

Install and run PulseAudio Volume Control (pavucontrol.) On the Output Devices tab click on the check mark next to the HDMI port to make it the default (fallback) device. That should deselect the onboard card from being the default device.

If you never use the onboard sound card at all or extremely rarely, you can set it to Off on the Configuration tab of pavucontrol.

Hope that helps.

LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

Re: Default Sound device keeps changing

Post by LostAndDazed »

MrEen wrote:
Wed Feb 20, 2019 7:18 pm
The output of running aplay -l in the terminal will answer that question. If there are multiple card numbers
Thanks for your reply, but it does not look promising.
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC271X Analog [ALC271X Analog]
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
I installed pavucontrol and there is only one device shown at a time in "Output" tab. The drop down at the bottom was showing "All output devices." I went to the "Configuration" tab and selected "Output HDMI" and then back to the "Output" tab and it showed the HDMI option there, but at no time was I able to check or uncheck for **any** output options. I could not even "Lock" or "Unlock" the channels. I tried using sudo to launch pavucontrol from the CLI but still the same.

Could 19.1 have an "improved" process here? :D :shock:

ETA: I am OK with totally disabling the internal card it is never used on this laptop.
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

User avatar
MrEen
Level 20
Level 20
Posts: 10527
Joined: Mon Jun 12, 2017 8:39 pm

Re: Default Sound device keeps changing

Post by MrEen »

Ok, HDMI is on the same card number. We can still set this up properly but I need a little more info. Start a song or video while everything is working properly, then in the terminal run pacmd list-sinks and paste the output back here.

LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

Re: Default Sound device keeps changing

Post by LostAndDazed »

MrEen wrote:
Fri Feb 22, 2019 4:37 pm
pacmd list-sinks
Hi, thanks for hanging in there with this.

Code: Select all

:~$ pacmd list-sinks
1 sink(s) available.
  * index: 8
	name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: 
	priority: 9030
	volume: front-left: 35390 /  54% / -16.06 dB,   front-right: 35390 /  54% / -16.06 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 24.87 ms
	max request: 4 KiB
	max rewind: 64 KiB
	monitor source: 8
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 1
	configured latency: 25.00 ms; range is 0.50 .. 341.33 ms
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 0"
		alsa.id = "HDMI 0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xc0610000 irq 31"
		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 = "1e20"
		device.product.name = "7 Series/C216 Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "hdmi:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo"
		device.profile.description = "Digital Stereo (HDMI)"
		device.description = "Built-in Audio Digital Stereo (HDMI)"
		alsa.mixer_name = "Realtek ALC271X"
		alsa.components = "HDA:10ec0269,10250743,00100100 HDA:80862806,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "ASUS VS239"
	active port: <hdmi-output-0>
:~$ 
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

User avatar
MrEen
Level 20
Level 20
Posts: 10527
Joined: Mon Jun 12, 2017 8:39 pm

Re: Default Sound device keeps changing

Post by MrEen »

This should keep your default on HDMI:

In the terminal type xed admin:///etc/pulse/default.pa and scroll to the bottom of the file and change this:

Code: Select all

### Make some devices default
#set-default-sink output
#set-default-source input
to this:

Code: Select all

### Make some devices default
set-default-sink alsa_output.pci-0000_00_1b.0.hdmi-stereo
#set-default-source input
Please note the comment (#) has been removed from the beginning of the line. Save the file, then run pulseaudio -k in the terminal and you should be all fixed.

LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

Re: Default Sound device keeps changing

Post by LostAndDazed »

MrEen wrote:
Sat Feb 23, 2019 3:00 pm
This should keep your default on HDMI:
Great, thanks I have just done that. I now need to wait until the screen saver kicks in as it was only happening after that.

Will get back to you either way. Thank you for taking the time, it is very much appreciated.
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

[SOLVED] Re: Default Sound device keeps changing

Post by LostAndDazed »

MrEen wrote:
Sat Feb 23, 2019 3:00 pm
run pulseaudio -k in the terminal and you should be all fixed.
And, quite correct you are! Great, that seems to have finally fixed that. I have lived with it for years and after changing to Mint a few months back I realized just how staid ubuntu had become. I am being spoiled by Mint/Cinnamon and that has taught me to expect better and now I have it. Again, thank you very much!
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

User avatar
MrEen
Level 20
Level 20
Posts: 10527
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Default Sound device keeps changing

Post by MrEen »

That's great LostAndDazed. I'm happy I could help. :D

LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

Re: [SOLVED] Default Sound device keeps changing

Post by LostAndDazed »

MrEen wrote:
Sun Feb 24, 2019 5:05 pm
That's great LostAndDazed. I'm happy I could help. :D
AAAARRRGGGGGHHH -- replied too soon! Started up this morning and it is back to the internal board. Oh, well, at least it seems to be fixed for after the screen saver kicks in. I will only have to reset it once a day.
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

User avatar
MrEen
Level 20
Level 20
Posts: 10527
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Default Sound device keeps changing

Post by MrEen »

There are a few possibilities causing that. The graphics card may not have finished initializing before pulseaudio was setting the default (which wasn't yet present.) Or maybe for some reason, before shutting down, the file that ends with -default-sink in ~/.config/pulse was overwritten with the onboard card which will take precedence over /etc/pulse/default.pa I believe. Or, it may have been Gremlins. :wink:

LostAndDazed
Level 3
Level 3
Posts: 102
Joined: Wed Jul 24, 2013 12:54 pm

Re: [SOLVED] Default Sound device keeps changing

Post by LostAndDazed »

MrEen wrote:
Mon Feb 25, 2019 3:04 pm
Or, it may have been Gremlins. :wink:
Might have to go with them! This morning it is set at the HDMI for default. Beats me. Yesterday after your last post I checked the date stamp on that "-default-sink" file and it was 3:15pm. Something happened at that time, but no idea if it was the screen saver kicking in or what. I will watch it closely today and see if I can see what's what.
Mint 19.1, Cinnamon, i5, 64-bit, 6GB, 500GB-SSD - Always up to date

Post Reply

Return to “Newbie Questions”