How to switch 'default' sound device controlled by hardware keys in Xubuntu?
Solution 1
I got a clue somewhere to look in Settings / Settings Editor (not the normal Settings Manager)
Then, under xfce4-mixer
, there was the setting /active-card
which had the value:
PlaybackHighDefinitionAudioControllerDigitalStereoHDMIPulseAudioMixer
I selected 'active-card', and hit the 'Reset Property' button. That turned the setting into:
PlaybackBuiltinAudioAnalogStereoPulseAudioMixer
( These names closely follow the names of the Output Devices in pavucontrol
see screenshot )
After a reboot, it worked. My volume buttons now affect the volume in the speakers.
(Scrub my earlier, now deleted, hint/comment about Play/Pause not working. They (still) work fine in Rhythmbox - that was/is an unrelated problem with gmusicbrowser
)
This may or may not work for you! :-)
EDIT: For some reason, my xfce profile got corrupted and I've restarted from scratch by rm -rf ~/.config
. Now, only a few days later, resetting it didn't work for me either, but setting /active-card
to PlaybackBuiltinAudioAnalogStereoPulseAudioMixer
did.
EDIT: If the above did not work try setting this via terminal and xfconf, e.g.
xfconf-query -c xfce4-mixer -p /active-card -s 'PlaybackBuiltinAudioAnalogStereoPulseAudioMixer'
Solution 2
For those who do not have /active-card
, it is not needed anyway, nor is the xfce4-mixer
.
The sound is going through PulseAudio and therefore the "default" device is selected by the configuration of PulseAudio, and xfce4-volumed
will only change the "default" outputs volume.
However you can use PulseAudios configuration tool for this, pacmd
.
$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>>
-
First list the devices on your machine
>>> list-sinks
It will print a lot of information about your devices, and as visible they all have an index
2 sink(s) available. * index: 0 name: <alsa_output.pci-0000_00_03.0.hdmi-stereo> ... index: 1 name: <alsa_output.pci-0000_00_1b.0.analog-stereo> ...
-
You need to set your preferred device as default. As you can see (the little star, i.e.
*
, before index:0) my HDMI was the default and I wanted the Analog output.>>> set-default-sink 1
You may need to kill xfce4-volumed
and restart it, to have the desired effect without full system restart:
$pkill volumed
$xfce4-volumed
But basically, that is it.
Solution 3
This fix will also fix the volume control on the Logitech G930 Wireless gaming headsets. (Not sure about the other buttons though) Launch Settings / Settings Editor (not the normal Settings Manager) or open a command prompt and type xfce4-settings-editor
Then, under xfce4-mixer And replace the active-card setting marked Value: to
PlaybackLogitechG930HeadsetAnalogStereoPulseAudioMixer
I've included an image to make it easier to understand
Also if have problems with the headset volume working here's a link that may help https://bugs.launchpad.net/xfce4-volumed/+bug/901338
Basically do a killall xfce4-volumed and try moving the volume on the headset again
Solution 4
In KDE without editing config files, I was able to fix this by right-clicking the volume icon in the task bar and selecting Select Master Channel...
.
This brought up a KMix dialog where I selected Built-in Audio Analog Stereo
instead of GK110 HDMI Audio
. Immediately after clicking OK
the volume keys on my keyboard started working.
Related videos on Youtube
Ruth
Updated on September 18, 2022Comments
-
Ruth almost 2 years
I installed xubuntu-desktop on a 12.04 Ubuntu upgrade after finding Gnome3 lacking. I've mostly been happy, but I've found an odd and frustrating bug. My laptop has two sound 'outputs' - an HDMI-out plug I never use, and the onboard speakers/headphones. For some reason, the hardware keys have been mapped to the HDMI output, even if I set it as 'fallback' in pavucontrol, and notify-osd only displays changes in the HDMI output (though the panel indicator volume control controls onboard sound). I'd ideally like both hardware keys and notify-osd to be looking at the onboard sound, though if I can't get notify-osd it's an acceptable loss. Having to click through a bunch of stuff to change volume is driving me crazy, though.
Googling suggested that it /may/ be a Pulseaudio/ALSA conflict, but the hardware keys seem to change at least indicated volume in pavucontrol for HDMI as expected (I don't have an HDMI cable to test actual sound output)
-
Ruth about 12 yearsThis worked perfectly! No idea why the system thought HDMI should be my default, but I reset those values, rebooted, and now my media hotkeys are working perfectly, no configuration required.
-
fleamour almost 12 yearsCannot edit or create new string, field always resets to "HDAudioGenericAlsamixer". Consequently no volume hot keys work at all.
-
fleamour almost 12 yearsHad to kill xfce4-volumed process, before changing value, otherwise keeps resetting string field. Result!
-
Admin over 11 yearsThank you very much for this! My volume control keys were not working either but now they are fixed. I would just like to let people know that if your language is set to non-US spelling then you need to add the 'ue' to the end of analogue: PlaybackBuiltinAudioAnalogueStereoPulseAudioMixer
-
nanofarad over 11 yearsFrom suggested edit: If the above did not work try setting this via terminal and xfconf, e.g.
xfconf-query -c xfce4-mixer -p /active-card -s 'PlaybackBuiltinAudioAnalogStereoPulseAudioMixer'
-
enenen about 11 yearsThe solution via terminal works for
Xubuntu 13.10
, too. Many thanks! -
Justin Skiles over 10 yearsI killed all instances of
xfce4-volumed
, adjusted the value of theactive-card
, restartedxfce4-volumed
, and re-added myaudio mixer
panel control. All seemed to take well. -
Anthony over 4 yearsThis worked perfectly. I am curious how well it will hold up over time as the default source I chose is a bluetooth speaker. I'll update my comment if it ends up not working through disconnect/connect processes.