Pulse Audio don't get unmuted when XF86AudioMute is used

Bug #883485 reported by Eric on 2011-10-29
This bug affects 64 people
Affects Status Importance Assigned to Milestone
Xfce4 Volumed
Won't Fix
xfce4-volumed (Debian)
xfce4-volumed (Ubuntu)
Lionel Le Folgoc

Bug Description

Using the XF86AudioMute media key alsa toggles mute properly and the OSD correctly shows alsa's status, however pulse audio gets turned off but never re-enabled when mute is toggled. The only way to re-enable pulse audio (and sound) is to click on the Unmute button in the sound indicator icon or use "pactl set-sink-mute 0 0" or "pactl set-sink-mute 1 0", etc depending on the card that's supposed to be in. Attached is a simple script that will toggle mute for pulse audio (for all sound cards). This bug appears on 2 different laptops, both running Xubuntu 11.10.

Anton Akhmerov (divbpsc) wrote :

The problem is that xfce volume control unmutes alsa master, but not the pulseaudio master.
I guess it's due to the wrong default settings of alsa or the xfce volume control. A workaround that didn't involve running scripts and worked for me was to
1. create /etc/asound.conf with

pcm.pulse {
    type pulse
ctl.pulse {
    type pulse
pcm.!default {
    type pulse
ctl.!default {
    type pulse

And then to add a keyboard shortcut (via settings -> keyboard)
XF86AudioMute -> amixer set Master toggle

Eric Koegel (eric-koegel) wrote :

Looking into this a little, xfce4-volumed uses whatever the active-card in xfconf is. For me, I set it with:
xfconf-query -c xfce4-mixer -p /active-card -s PlaybackInternalAudioAnalogStereoPulseAudioMixer

The following command will list all the properties under xfce4-mixer.
xfconf-query -lc xfce4-mixer

Then you can query them individually with:
xfconf-query -c xfce4-mixer -p /sound-card

More details about xfconf are here: http://wiki.xfce.org/releng/4.6/general-info
This should fix the mute problem, it does for me.

Steve Dodier-Lazaro (sidi) wrote :

Hi. I'm copy/pasting a comment I made elsewhere about this problem.

xfce4-volumed is NOT compatible with Pulseaudio. Xubuntu 11.10 uses Pulseaudio by default, hence problems. If you want me to work on a Pulseaudio back-end for xfce4-volumed, please send an email to the xfce4 development mailing list and ask for Pulseaudio support in the back-end of xfce4-volumed AND xfce4-mixer, and I'll see with the other developers if we want to work on this or not (this will also depend on my workload, which is extremely high at the moment).

My point here is that I'm not willing to "fix" my application at the moment because it does what it is designed for. The first requirement for me is full compatibility with the xfce4-mixer. In fact, I even re-use code from the mixer directly.

Changed in xfce4-volumed:
status: New → Won't Fix
Paulo Neves (logins-arunce) wrote :

After creating a file as Anton suggested my problem was solved. And no need to create a keyboard shortcut, at least for me.

See comment #2 and try that /etc/asound.conf

nakki (titibanjekistan) wrote :

Why xubuntu natty doesn't have this problem?

Stan (llaen) wrote :

For some reason #2 didn't help me (despite the amixer command working find in terminal), but #3 did.


zachery sharon (zacherysharon) wrote :

Post #3 worked for me as well (I didn't try post #2). I don't know if this mitigates the importance of the 'bug.'

Michael Kogan (michael-kogan) wrote :

Same here as in Stan's description (comment #7). I suspected that something in the command gets parsed wrongly and wrote bash script including the lines


amixer set Master toggle

and assigned this script toXF86AudioMute in the keyboard settings. This way unmuting works though it's quite a hackish workaround.

Michael Kogan (michael-kogan) wrote :

I have to take back my previous comment: The described solution works only a short time and then stops working. Don't know how this can occure...

Carl Oxwall (oxwall) wrote :

Gosh. There are three dupe bug reports on this issue, i just realized.
Any chance of a merge? And oh, how's the progress?

Ingo Ruhnke (grumbel) wrote :

Things work perfectly fine for me with the workaronud in #3, reproducible on multiple machines. So to me this doesn't look like some compatibiltiy issue between Pulse and volumed, but simply a wrong default setting. Given that this is a rather obvious bug on a default Xubuntu install, a fix would really be nice to have.

Simon Steinbeiß (ochosi) wrote :

I just tested the following in a real install of Precise:
Set the active-card property of xfce4-mixer to "PlaybackBuiltinAudioAnalogStereoPulseAudioMixer" (not to what was suggested by #3).

Then the mute/unmute multimedia buttons work. Volume-changes performed by the multimedia-buttons are still reflected by xfce4-mixer, indicator-sound and xfce4-notifyd.
Volume-changes in xfce4-mixer (by clicking and dragging the sliders) is also reflected in indicator-sound and xfce4-notifyd.

So far I couldn't find any regressions in this setting.

Alex (alecscottaz) wrote :

Got this working by going into the Settings Editor, clicking on xfce4-mixer and changing both /active-card and /sound-card to PlaybackBuiltinAudioAnalogStereoPulseAudioMixer. Before that, active card was HDA Intel Alsa Mixer. Essentially, this works the same as the workaround in comment 3, except it is the GUI version of doing things.

Simon Steinbeiß (ochosi) wrote :

Just to mention that, I tried what Alex (#14) proposed as well (i.e. also setting /sound-card to PlaybackBuiltin...), but that resulted in xfce4-mixer only showing one channel, which controls the PulseAudio Master Volume.
If you want to retain control over all Alsa Channels it's better to solely set /active-card to Pulse.

One little regression I forgot to mention is that the unmute-button in xfce4-mixer doesn't work anymore then (seemingly instead of the multimedia-button unmute). But personally I feel this is a minor issue, hardly anyone will use that directly because the mute/unmute function is present in indicator-sound directly.

Michael Kogan (michael-kogan) wrote :

I can confirm #14, besides of the fact that I had to use "PlaybackPulseAudioMixer" instead of "PlaybackBuiltinAudioAnalogStereoPulseAudioMixer". The correct thing to use can be looked up in xfce4-mixer/sound-cards/.

Marco Meijer (marcoxmeijer) wrote :

I am trying to do what number 3, 13 and 14 suggested, but it appears that active-card keeps on resetting itself to HDAIntelAlsamixer, and the bug is persistent. I wonder if my problem would be solved if it stopped doing that.

Ingo Ruhnke (grumbel) wrote :

Try to kill xfce4-volumed before making the change. I had the same issue with the setting getting resetted, but it stuck after volumed was dead. You can also try manually editing ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-mixer.xml while not logged into X11.

Marco Meijer (marcoxmeijer) wrote :

Hmm, the solution from number 2 does work in Terminal, strangely it isn't as fond of doing this as a keyboard shortcut.

Marco Meijer (marcoxmeijer) wrote :

Thanks, that is one thing solved. It seems I am not meant to put in "PlaybackBuiltinAudioAnalogStereoPulseAudioMixer", though. Now I have made volume editing utterly impossible. However, behaviour changed, and that is something. I will try using Photon's "PlaybackPulseAudioMixer" instead.

Marco Meijer (marcoxmeijer) wrote :

Sorry for spamming like this (I am more used to fora, where you can also edit your posts), but it seems using "PlaybackPulseAudioMixer" causes me to control my HDMI output with the media buttons. I have no idea how to get this right. Maybe I should try using #2 as a lead. Although I think I just haven't found the right name to enter in that xml file. Any ideas to what other names I could be using?

Marco Meijer (marcoxmeijer) wrote :

As a last spam, it seems "PlaybackBuiltinAudioAnalogStereoPulseAudioMixer" might be right after all, but that my PulseAudio is crashing. I will experiment some more tomorrow. At least I got a few leads now.

Michael Kogan (michael-kogan) wrote :

You can look up all available valid options in the settings editor under xfce4-mixer/sound-cards/, see screenshot.

Marco Meijer (marcoxmeijer) wrote :

Hmm, that one only lists HDAIntelAlsamixer, which if I set it to active-card (as is standard) causes me these unmute problems.

Marco Meijer (marcoxmeijer) wrote :

I got solution #2 more or less working, but it seems XFCE4's default action for the unmute button overrides my custom command. Binding the unmute command to the calculator button (which was previously not used by any application) makes the calculator button do muting and unmuting properly, but it isn't really something you want to bind to your calculator. Is there a way I can actually erase XFCE4's default action for XF86AudioMute (thus making it unfunctional)? I suspect that if I manage to do that I could have more luck binding my own commands to XF86AudioMute. It would be somewhat of a workaround, but it would do the thing.

Disabling the XFCE volume daemon at startup will give you back control over volume buttons for custom commands.
One solution that has not been proposed but that may work very well on some systems is to remove Pulseaudio altogether and let XFCE manage ALSA alone.

C.E.M.O. (oxwl) wrote :

Weird thing is, although someone told me this issue was fixed in Xubuntu 12.04, I still notice the behavior on my Eee netbook. Writing scripts and changing hotkey action seems like a dull workaround, which perhaps takes cause for yet another edit later on, when 'Buntu developers has come up with an official fix. So, what's the best thing I could do right now? Where is the "official" thread for this issue by the way? My Google skills is sloppy, this Sunday.

gnimsh (loochyj) wrote :

I fixed this in xubuntu 12.04 by opening up the settings editor, browsing to xfce4-mixer, and first changing active-card string value to "PlaybackBuiltinAudioAnalogStereoPulseAudioMixer" and then created a new string with the following name: "/sound-card" with the string value "PlaybackBuiltinAudioAnalogStereoPulseAudioMixer" which worked immediately.

Migo Mueller (migo-mueller) wrote :

After changing both /sound-card and /sound-card to *Pulse*, sound works fine and can be set using the mixer applet. However, the XF86Audio keys no longer influence sound volume nor mute status. They do get reflected in the OSD, though.

So, it seems like the mixer applet works with pulse audio just fine, but the daemon handling the XF86 keys and OSD doesn't. What can be done about this? IMHO, removing pulse audio is not a viable option. It's a dependency of xubuntu-desktop, after all, so it should work in a regular install.

I'm running Xubuntu 12.04 (Precise Pangolin) on a HP mini 210, btw.

Migo Mueller (migo-mueller) wrote :

I just realized that we're beating a dead horse. The developer set the status to "won't fix" (#4). I see his point. Volume.d does what it's designed to do.
Still, this is an unacceptable situation IMHO. Volume.d, the mixer applet, and pulse audio all are dependencies of xubuntu-desktop, so they should cooperate. Yet they don't. This is the type of issue that turns people away from Xfce (in fact, my SO is pushing pretty hard for us to go back to Gnome, because of this bug).
So, maybe we should file this bug under another project? But which? Anyone have an idea?

Migo Mueller (migo-mueller) wrote :

(Sorry for the noise, I'm posting as I find new things)

Apparently, the same issue has been fixed for Ubuntu Studio https://bugs.launchpad.net/xfce4-volumed/+bug/972781
Any chance to get this fix to work for Xubuntu? I volunteer any help that may be useful, but I know nothing about system programming...

Ivan Ivanov (ivan-lz) wrote :

the fixes from #14 (gui version ) and #3 ( shell version of the fix) worked for me!

former kubuntu precise 12.04 - now using xfce on 12.04.

I had the exact same issue with MATE Desktop ( MINT OS Desktop Environment inside Ubuntu 12.04 Precise Pangolin,
Issue was solved with #2 post ( creating asound.conf in /etc )

This problem is awkward and weird.. thanks a lot Anton!! :D

enrico (lamba84-y) wrote :

I can confirm #16 after "killall xfce4-volumed" - Xubuntu Precise x64. Thanks

Erik S (ofenfisch) wrote :

I was about to say, this affects me too. But then I realized, that I'm already using a self-made script for mute-toggling. It wasn't working, too.

I googled a bit, and I found this:

Short: Mute-Button muste Alsa and Pulseaudio, unmute only alsa. For umuting, we need to add pulseaudio on our own.

In a script, it should look like this (if you use the Master-channel):

if amixer get Master | grep "\[on\]"; then
        amixer set Master mute
        amixer -D pulse set Master unmute

Miklós Barabás (mbarabas) wrote :

Hi all!

Im using Xubuntu 12.04 with Xfce, the following commands r working flowlessly binded to the expected shortcuts:

amixer -D pulse set Master toggle
amixer -c 1 -- sset Master playback 5dB-
amixer -c 1 -- sset Master playback 5dB+


See bug#8194 at bugzilla.xfce.org. I suggest you ditch xfce4-volumed. It's buggy, and (worse) it's a black box, without even a manpage. I disabled it via Settings==>Session-Startup==>AppAutoStart. Also make sure to disable Session-Startup==>Advanced==>LaunchGnomeSvcs. Then I was free to program the XF86Audio keys as I wished.

Shell scripts are actually a superior solution for this problem as they are both flexible and allow the user to see what's going on.
So I use the scripts I wrote: http://user.cavenet.com/rolandl/PulseAudioScripts.tgz These are toggle-mute, volume-up, and
volume-down, with zenity for notifications. This allows users to reposition notifications as desired, change their properties, or
eliminate onscreen notifications if they want.

Don't try to solve this problem. Use the shell scripts. Even simpler: program the XF86Audio keys for 'amixer set Master
5%+, or 5%-, or toggle. A black box solution is no solution at all.

Luke Schlather (luke2760) wrote :

So should the default configuration for Xubuntu disable xfce4-volumed in favor of shell scripts, and is that a viable route for the Xubuntu project going forward?

It's clear that the default configuration is broken, and I'd like to come up with a plan to address that, since this seems to be as much if not more a political problem as a technical one.

Ingo Ruhnke (grumbel) wrote :

The workaround in #3 worked perfectly for me, it is trivial and plausible. I reproduced in on multiple machines. So to me it looks like the only problem there is is that xfce4-volumed is simply using the wrong soundcard/sounddevice by default, which means whatever automagic sets the default sounddevice needs to be changed. All that mucking around with shell scripts, amixer or hacking asound.conf does not seem to address the issue directly, but just cover it up.

Is there anybody for which #3 did not work?

Changed in xfce4-volumed (Ubuntu):
status: New → Triaged
assignee: nobody → Lionel Le Folgoc (mrpouit)
no longer affects: xubuntu-desktop
Lionel Le Folgoc (mrpouit) wrote :

To sum up what happened/will happen:

The developer of xfce4-volumed said that xfce4-volumed isn't compatible with pulseaudio, but that's not really accurate. The first problem is a default settings issue (preselection of the correct gst card/channel), and the second culprit is gstreamer pulse plugin is one culprit (basically, the bindings suck, let's say it).

I added a patch in precise to try to preselect a pulseaudio card on Xubuntu (starts by "Playback", contains "PulseAudio"). Obviously that's not optimal, when e.g., the HDMI card is listed before the main card, xfce4-volumed will choose the wrong card (and that's what happens for many people unfortunately).

A few months ago, I "forked" xfce4-volumed and ported it locally to pulseaudio. It works fine here (it takes the default pulse card, you can't change it with xfconf-query anymore, but with pactl or the pulseaudio mixer), but it didn't have many testing and I haven't had time to include it in Xubuntu anyway.
Testing welcome: the sources are at <http://lionel.lefolgoc.net/gitweb/?p=xfce4-volumed-pulse.git;a=summary>, and test packages called "xfce4-volumed-pulse" for precise and quantal are in my ppa <https://launchpad.net/~mrpouit/+archive/ppa> (don't forget to disable xfce4-volumed from autostart or uninstall it).

Xfce4-mixer 4.10 (gstreamer) now has support for keybindings, so I plan to replace xfce4-volumed in raring by its pulseaudio "port". People who don't like pulseaudio can still use xfce4-mixer 4.10, and hopefully other people should have working volume keys out of the box in raring.

Ste (ste-jervis) wrote :

Anton's asound.conf file worked for me running LXDE and Ubuntu 12.10

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xfce4-volumed - 0.2.0-0ubuntu1

xfce4-volumed (0.2.0-0ubuntu1) raring; urgency=low

  * New upstream release (FFe lp: #1153378) with pulseaudio support.
    lp: #883485, #970009, #990562
  * debian/patches/xubuntu_preselect-pulseaudio.patch: dropped, unneeded.
  * debian/rules:
    - disable silent rules
    - keep the program named xfce4-volumed so the change is invisible to the
  * Add a manpage. lp: #428023
  * debian/control:
    - build-depends on libpulse-dev instead of libgstreamer0.10-dev and
    - recommends pulseaudio instead of gstreamer.
 -- Lionel Le Folgoc <email address hidden> Thu, 14 Mar 2013 22:39:32 +0100

Changed in xfce4-volumed (Ubuntu):
status: Triaged → Fix Released

@Miklós Barabás (mbarabas): You're a hero. I just had to replace '1' by '0'. Afterwards:

apt-get remove xfce4-volumed

Good riddance!
Blows my mind how such an issue can exist for 5 years going when you can basically fix it with three lines of shell commands.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions