Comment 48 for bug 565685

Revision history for this message
Benjamin Kraus (ben-benkraus) wrote :

I think I have the same problem described in this bug. If it is indeed the same problem, I think I've figured out what is happening and how to "fix" it very easily (at least, this worked for me). It is unclear to me if this is a bug exactly, or just an unexpected behavior. However, it seems to fit with the comment that other people have given.

For those who just want the solution that worked for me see the next comment.

To diagnose what was happening I used two programs, which remained open the whole time: gnome-volume-control (g-v-c) and alsamixer

The volume control slider and mute/unmute checkbox in "gnome-volume-control" control a bunch of channels (as they show up in alsamixer), but what channels are controlled depends on the "Connector" setting on the "Output" tab.

With "Analog Output" selected:

Mute/unmute in g-v-c mutes/unmutes the following: "Master Front", "Headphone", "Front", "Surround", "Center", "LFE", and "Side"
Volume in g-v-c controls "Master Front" then "Front" then all together "PCM", "Surround", "Center", "LFE", and "Side".

Plugging in headphones causes "Front" to be muted. However, when "Front" is muted, it triggers g-v-c to mute, which then mutes "Master Front", "Headphone", "Front", "Surround", "Center", "LFE", and "Side", stopping all sound from both headphones and speakers.
Unplugging headphones causes "Front" to be unmuted. However, everything else remains muted.

In alsamixer, muting any of the "Master Front", "Front", "Surround", "Center", "LFE", or "Side" channels also causes g-v-c to mute, which subsequently causes the remaining channels (including "Headphones") to be muted. However, unmuting any of these channels only unmutes that single channel, and even if you manually unmute all the channels, no sound is produced until you unmute in g-v-c. Also in alsamixer, there is a "Headphones" channel, but it is grayed out so you can only see it's status and not change it.

"Front" mutes/unmutes both the speakers and the headphones, and the volume controls both speakers and headphones.

With "Analog Headphones" selected:

Mute/unmute in g-v-c mutes/unmutes both "Master Front" and "Headphone".
Volume in g-v-c controls "Master Front", "Headphone", and "PCM" (in that order)

Plugging in headphones causes "Front" to be muted, which shuts off the speakers, but the headphones still work.
Unplugging headphones causes "Front" to be unmuted, which turns on the speakers.

Within alsamixer, muting "Master Front" causes g-v-c to mute, which subsequently mutes the "Headphones" channels. However, the "Front", "Surround", "Center", "LFE", and "Side" channels are no lounger coupled to g-v-c mute. Unmuting "Master Front" has no effect on g-v-c or the "Headphone" channel, so after muting "Master Front" to restore sound you have to unmute in g-v-c.

"Front" mutes/unmutes speakers, but does not effect headphones (headphones stay on in both cases).
However, the "Front" volume slider still controls both speakers and headphone volume.

There doesn't seem to be any way to directly control the "Headphone" slider or mute/unmute.

Switching from "Analog Output" to "Analog Headphones" causes the following to be muted and the *volumes to be turned completely down*: "Front", "Surround", "Center", "LFE", and "Side".

Switching from "Analog Headphones" to "Analog Output" causes the same controls to be unmuted and the volumes turns all the way to full.

Therefore, it seems like the solution is to enable "Analog Headphones" mode then turn the "Front" volume to full.

Other details:

This is all tested with an ASUS P5Q Pro Turbo motherboard, Intel HDA sound chipset, and VIA VT1708S codec. My headphones are plugged into the headphone jack on the front of my case, and my speakers are plugged in the jack on the back of my case labeled "Front".

When I start up gnome-alsamixer, I get the errors reported by Ivailo Partchev (comment #32).

When I installed the package David provided in comment #19, I see the following message when I plug-in or unplug the headphones:
"ALSA-HDA hda_codec.c:477: Unsol event from codec: tag = 5, response = 0"
Otherwise, that package doesn't seem to have any effect on the situation.

In summary, once "Analog Headphones" is selected and you've restored the volume on the "Front" channel, plugging in the headphones mutes speakers, and unplugging the headphones unmutes the speakers properly for me. However, there seems to be three things that are causing some confusing behavior:

1) There doesn't seem to be any way to independently control the "Headphone" volume, or mute/unmute the headphones. This channel shows up in alsamixer, but is grayed out and uncontrollable (see attached picture). The channel doesn't show up in the gnome-alsamixer. However, pulseaudio seems to be able to control this channel.
2) The "Front" channel volume slider controls both the headphone volume and the front speaker volume, rather than just the front speaker volume, and when you switch from "Analog Output" to "Analog Headphones" mode in g-v-c, it turns the volume completely down on the "Front" channel, muting the headphones.
3) There is a weird interaction between pulseaudio (g-v-c) and alsamixer when in "Analog Output" mode which causes the sound to be muted when plugging in headphones.

If anyone knows how to fix those problems, that would be helpful to making things behave in a way that is more transparent (to me at least).