headphones always muted at restart

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
chtfn
Established Member
Posts: 76
Joined: Sun Mar 15, 2015 10:21 pm

headphones always muted at restart

Post by chtfn »

Hi community
I recently installed the KXStudio repos on a new Ubuntu Budgie 18.04 install, and one issue that's a bit annoying is that my headphones are always muted at startup. I always have to open `alsamixer` from the terminal and unmute the channel and turn the volume all the way up.
The laptop speakers do turn themselves off when I plug the headphones in, which makes me think that they are detected without a problem.
Any idea why that might be?
This issue is discussed a bit online, but I was wondering if KXStudio users specifically had been aware of that or had figured it out before me.

Cheers
User avatar
nikgnomicradio
Established Member
Posts: 109
Joined: Wed Feb 07, 2018 9:31 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: headphones always muted at restart

Post by nikgnomicradio »

With headphones unmuted and everything else set correct in Alsamixer, use command:

Code: Select all

sudo alsactl store
ALSA settings are stored in file 'asound.state', location can vary depending on distribution
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: headphones always muted at restart

Post by CrocoDuck »

Hi there!

Another thing that affects how onboard devices switch is ALSA module parameters. I think I had the very same issue with my laptop, and also I had that the laptop would fail to switch from speakers to headphone when I plugged in the headphone plug, if I remember correctly. I think this sort of things affect most often Intel HDA cards or cards driven by the snd-hda-intel kernel module. In that case, one common way to prevent headphone and speakers glitches is to specify to ALSA what your device is.

This command will list your ALSA cards:

Code: Select all

 cat /proc/asound/cards 
For example, on my laptop:

Code: Select all

[crocoduck@arch ~]$ cat /proc/asound/cards 
 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xb2214000 irq 52
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xb2210000 irq 49
As you see we have 2 onboard cards, numbered 0 and 1. The one where I plug the headphone is PCH, 1, so I can query the Codec vendor with this:

Code: Select all

[crocoduck@arch ~]$ cat /proc/asound/card1/codec* | grep Codec
Codec: Realtek ALC269VB
(* see also below)

My PCH Codec is ALC269VB. The next step is to look up the codec in this list, which maybe could have a more up to date copy somewhere in your system, as I understand that in theory that list is distributed with ALSA documentation:

http://lxr.linux.no/#linux+v3.2.19/Docu ... Models.txt

Now create /etc/modprobe.d/alsa-base.conf, if it does not exist already. If it exists, append a line like this one at the bottom:

Code: Select all

options snd-hda-intel model=MODEL
Where MODEL is the best fit you found in the list I linked above. In my case, there wasn't any match for ALC269VB, but there was for ALC269, which I think is the broader family of my Codec. Close enough. From the list we read:

Code: Select all

  63  ALC269
  64  ======
  65  laptop-amic   Laptops with analog-mic input
  66  laptop-dmic   Laptops with digital-mic input
Hence, knowing that I have an analog mic I tried this:

Code: Select all

options snd-hda-intel model=laptop-amic
That solved my glitches. I hope this helps.

* Maybe aplay -l will show all the needed info at once. It does on my laptop.

Code: Select all

[crocoduck@arch ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
More info:
https://help.ubuntu.com/community/HdaIntelSoundHowto
https://wiki.archlinux.org/index.php/Ad ... sound_card
chtfn
Established Member
Posts: 76
Joined: Sun Mar 15, 2015 10:21 pm

Re: headphones always muted at restart

Post by chtfn »

Thank you both for your input! However, none of the two solution offered fixed that muted headphone setting at startup...
I will keep you informed if I do find a solution!

Cheers
User avatar
English Guy
Established Member
Posts: 525
Joined: Wed Oct 17, 2012 7:28 pm
Location: England
Has thanked: 8 times
Been thanked: 7 times

Re: headphones always muted at restart

Post by English Guy »

I had a similar problem and the culprit was Pulseaudio. The solution was to install Pulseaudio Volume Control and set the volume from there, then it survives boot up.

Discovering the solution was a great demonstration of the value of verbose messages at boot time!
chtfn
Established Member
Posts: 76
Joined: Sun Mar 15, 2015 10:21 pm

Re: headphones always muted at restart

Post by chtfn »

Thanks English Guy, but unfortunately I already had PAVU Control installed and playing around with it didn't fix my issue.
I'll keep looking around!
Post Reply