I'm looking for a convenient GUI widget to control audio volumes on my computer. Here's what I mean by “convenient” and “volumes”:

  • I have two audio interfaces: the laptop's built-in loudspeaker and microphone, and a USB headset. I want to be able to control at least the USB headset. Having the built-in audio next to it would be nice.
  • Ideally the option to control the USB headset should appear automatically when it's plugged in. I don't mind whether it stays around or vanishes when the headset is not connected.
  • I need three controls: audio output volume, audio mute/unmute, and microphone mute/unmute. My quest for a toggle for the USB headset's microphone with visual feedback (unfortunately my headset has no physical controls) is what prompted this question.
  • The GUI widget must either be an item in the XFCE4 panel, or a standalone window that doesn't use much screen real estate. (I don't use XFCE4 as a desktop environment, just its panel. It has a ”notification area” that hosts Freedesktop widgets such as the NetworkManager icon, having the volume control there would be fine.)

Software packaged for Ubuntu 16.04 would be preferred.

I have tried and rejected (unless there's a way to configure them which I haven't found):

  • Pavucontrol (“Volume Control”): it has all the controls but it's far too complex for a quick mute check or toggle.
  • XFCE4 panel PulseAudio plugin: only handles built-in audio output, not the USB headset and not the microphone.
  • Volti: has no interface for the microphone. Also, although has an interface to select which audio interface to control, this doesn't seem to have any effect on the panel widget, it keeps showing the built-in audio interface.

Before I roll my own (which I suspect would require me to learn more about D-Bus and Pulseaudio than I care to), what are my options?

  • 1
    You might be able to cook something up with/from pa-applet in conjunction with pavucontrol. – Mioriin May 9 '17 at 15:58
  • If nothing else works out, I'd just look at the source code of pavucontrol and extract the stuff you need - that more or less bypasses the need to learn about D-Bus and Pulseaudio, you only need to modify the interface (and restrict it to the sinks you are interested it). – dirkt May 10 '17 at 6:49

I use xfce panel launchers to run single commands to adjust ALSA audio

`amixer set -c 0 Line 42`

sets mic input (connected at device:0 'Line') in alsamixer to 0.0dB (on) value is specific to my sound card. can also use a percentage value

`amixer set -c 0 Line 0`

mutes mic input

I also have 2 more launchers to mute and unmute one audio output, similar commands for same card but different alsamixer control element

There is no option to dynamically change a launcher icon for visual feedback, so replacing discrete on and off buttons with one button that toggles between 2 states isn't a better option IMO

The only launch button visible in panel is the main button for pavucontrol, the extra buttons are stacked on the one launcher and normally hidden on screen, but accessible from popup menu via arrow next to pavucontrol launcher.

The pavucontrol launcher has been modified to pavucontrol -t 1 so it opens to the playback tab, the only tab I need to adjust volume levels. Pavucontrol options can hide some unused controls. these adjustments from default makes it much less cluttered and has become an essential tool for my workflow

An alternative to amixer commands, pacmd can change Pulseaudio levels and mute/unmute. However, pacmd runs as a simple shell in terminal, not just a standard command. I found using pacmd in bash scripts to be unreliable. The equivalent simple terminal command pactl is reliable, but doesn't have the required control functions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.