Issue with sound: mix between headphones and speakers volumes

Hi!

I’m new to OpenSuse (recently switched from Kubuntu 14.04). Since my new install of Leap, I have some issues with the sound (everything was working fine on Kubuntu 14.04, so hardware is supported).

To be precise, plugging headphones works, it disable speakers OK and sound is audible through the headphones. But when the headphones are unplugged, sound through speakers is not restored. I investigated the issue with alsamixer and here’s what I found: when plugging/unplugging the headphones, the volumes for channels “Headphone” and “Speaker” are handled properly (i.e. speaker is set to 0 volume and mute when headphones are plugged in and restore to initial values when the headphones are unplugged).

The problem is that there seems to be some weird mix between the channels: the volume of the sound played by the “speaker” channel is linked to the volume of “headphone”, but when “speaker” is on MUTE, no sound is played. To sum up, my speaker volume is mixed up with headphones but the “mute” state is correctly linked to the speaker channel.

From there, I have no idea how to correct the sound management of my laptop!

Some info:

head -n 1 /proc/asound/card0/codec*


Codec: Realtek ALC269VB

more /etc/modprobe.d/50-sound.conf


options snd-hda-intel model=auto                                                                                          
options snd slots=snd-hda-intel
# u1Nb.OPCaYZocXF7:NM10/ICH7 Family High Definition Audio Controller
alias snd-card-0 snd-hda-intel

more /etc/modprobe.d/50-alsa.conf


install snd /sbin/install-snd-module snd $CMDLINE_OPTS
install snd-pcm /sbin/install-snd-module snd-pcm $CMDLINE_OPTS
install snd-seq /sbin/install-snd-module snd-seq $CMDLINE_OPTS

sudo zypper repos


#  | Alias                               | Nom                                     | Activé | Vérification GPG | Rafraichir
---+-------------------------------------+-----------------------------------------+--------+------------------+-----------
 1 | KDE_Applications                    | KDE Applications                        | Oui    | (r ) Oui         | Oui       
 2 | KDE_Extra                           | KDE Extra                               | Oui    | (r ) Oui         | Oui       
 3 | KDE_Frameworks_+_Plasma_5           | KDE Frameworks + Plasma 5               | Oui    | (r ) Oui         | Oui       
 4 | Qt5_Stable                          | Qt5 Stable                              | Oui    | (r ) Oui         | Oui       
 5 | download.opensuse.org-non-oss       | Dépôt principal (NON-OSS)               | Oui    | (r ) Oui         | Oui       
 6 | download.opensuse.org-non-oss_1     | Dépôt de mises à jour (Non-OSS)         | Oui    | (r ) Oui         | Oui       
 7 | download.opensuse.org-oss           | Dépôt principal (OSS)                   | Oui    | (r ) Oui         | Oui       
 8 | download.opensuse.org-oss_1         | Dépôt principal de mise à jour          | Oui    | (r ) Oui         | Oui       
 9 | http-download.opensuse.org-062d276e | home:ervin                              | Oui    | (r ) Oui         | Oui       
10 | http-download.opensuse.org-6848f9fb | home:jaltekger                          | Oui    | (r ) Oui         | Oui       
11 | http-download.opensuse.org-b75ddd51 | utilities                               | Oui    | (r ) Oui         | Oui       
12 | http-download.opensuse.org-c188535f | isv:ownCloud:desktop                    | Oui    | (r ) Oui         | Oui       
13 | http-download.opensuse.org-d07bba32 | devel:tools:scm                         | Oui    | (r ) Oui         | Oui       
14 | openSUSE-42.1-0                     | openSUSE-42.1-0                         | Oui    | (r ) Oui         | Oui       
15 | packman                             | packman                                 | Oui    | (r ) Oui         | Oui       
16 | repo-debug                          | openSUSE-Leap-42.1-Debug                | Non    | ----             | Oui       
17 | repo-debug-non-oss                  | openSUSE-Leap-42.1-Debug-Non-Oss        | Non    | ----             | Oui       
18 | repo-debug-update                   | openSUSE-Leap-42.1-Update-Debug         | Non    | ----             | Oui       
19 | repo-debug-update-non-oss           | openSUSE-Leap-42.1-Update-Debug-Non-Oss | Non    | ----             | Oui       
20 | repo-source                         | openSUSE-Leap-42.1-Source               | Non    | ----             | Oui       
21 | repo-update                         | openSUSE-Leap-42.1-Update               | Oui    | (r ) Oui         | Oui      

Happy to provide more information if this is not enough.

Thanks in advance for your help!

I have tested with Kubuntu 16.04 beta2, which has fairly similar packages than Leap (slightly newer of course though), and I have the same issue… Seems to be a kind of recent regression in the kernel, ALSA or PulseAudio.

Is there a way to change the behaviour of the sound when headphones are plugged? Right now, when they are plugged the “Headphone” channel is set to volume 0 AND to “mute”. I guess a workaround would be to change this behaviour to “just mute” (i.e. no change in volume). That way, volumes of headphones and speakers are linked (not ideal), but the sound would be working overall.

I gather that PulseAudio (rather than ALSA) is responsible for this, but I cannot find my way through the config files… Any help would be greatly appreciated!

Try installing ‘pavucontrol’ (pulse audio volume control) , then run that application, and check the "output device’ and ‘playback’ tabs to ensure the application you are running is sending sound to the appropriate output device.
.

Yes, I did that. “Headphone” is selected when the headphones are plugged and “Speaker” otherwise. Seems that nothing is wrong on that side…

EDIT: Sorry, I’m being rude: thanks for your help!!

Since you now note you tried to configure this with pavucontrol and that did not work, that suggests to me that this is NOT pulse but rather it is the underlying alsa.

wrt volume savings not being saved in alsa, to quote from an alsa developer, if this happens after reboot, it’s likely the wrongly saved mixer state. There are a few layers saving/restoring the mixer state, alsactl invoked via udev, PulseAudio, and kmix.

A possible fix would be to clean up the config. Go to runlevel 3 once, login as root, kill all pending Pulse Audio processes (if any). Then adjust via “alsamixer -c0”, setup the headphones to the volume you want, and run “alsactl store”. This resets the mixer restored via alsactl.

For Pulse Audio, remove ~/.pulse and ~/.config/pulse directories (if they exist).

You were right, the problem was with ALSA apparently. Changing “mode=auto” for “mode=headset-mode” in /etc/modprobe.d/50-sound.conf fixed the issue. Well, now the volume of headphone and speakers are linked whereas they were independent in Kubuntu 14.04, but I can live that!

Thanks for your help!

Glad to read its working a bit better now. Thanks for sharing your solution.