Nostalgia for those ALSA mixer channels that KMix and GNOME Volume Control used to have?
March 28, 2011 25 Comments
These days the GUI mixers KMix and GNOME Sound Preferences display PulseAudio devices and streams rather than ALSA mixer channels. For example, prior to its integration with PulseAudio, KMix typically displayed a mixer window that looked like the one below.

KMix with ALSA channels
whereas, today, a KMix window typically looks like the following:

KMix with PulseAudio channels
KMix 3.8 in KDE 4.6.1 does not provide separate speaker and headphone channels. You can alter the headphone and speaker volume by using PulseAudio Volume Control instead (see the picture below), but people are not as familiar with the PulseAudio GUI, and it is yet another step to perform.

PulseAudio Volume Control showing selection of Headphones channel
If you are like me, you probably end up using KMix (or GNOME Sound Preferences) but also launch ALSA Mixer in a Konsole/Terminal for fine-grained control of the underlying ALSA channels:

ALSA Mixer running in Konsole
This is more hassle, because you launch Konsole/Terminal and you enter the command alsamixer
and press F6 (alternatively, use the command alsamixer -c 0
if your sound card is Card 0). The PulseAudio channels are displayed by default if you don’t specify your sound card when you launch ALSA Mixer.
EDIT (January 28, 2012): With recent versions of ALSA Mixer I have found that I must specify the card in the alsamixer command (e.g. alsamixer -c 0
) because the command alsamixer
alone results in a Segmentation fault
message.
It would be handy to have an icon on the Panel or on the Desktop that you could use to launch ALSA Mixer. Well, you can. In fact, as there is also a GUI version of ALSA Mixer (albeit with a few less features than its console equivalent) you can use that instead if you prefer. Below I explain a few of the possible ways you can display ALSA Mixer easily from within a desktop environment.
Change KMix from a PulseAudio mixer to an ALSA mixer
By default KMix displays PulseAudio channels instead of ALSA channels. However, if you want to display the ALSA channels instead (as shown in the first picture above), quit KMix and enter the following command in a Konsole window or in KRunner:
export KMIX_PULSEAUDIO_DISABLE=1 && kmix
If you want to make this permanent then add KMIX_PULSEAUDIO_DISABLE=1
to the file /etc/conf.d/alsasound
Personally, though, I prefer not to do this as I want to control the PulseAudio channels via the KMix mixer. Try running two or more audio/video apps simultaneously and you’ll see what I mean – it’s useful! For example, I can control the volume of various applications separately (handy when you want to check something or are using Skype), as illustrated by the picture below:

KMix showing PulseAudio playback streams tab
and I run ALSA Mixer separately to tweak the underlying ALSA channels. Using Yakuake (or Guake in GNOME) is quite a good way to run ALSA Mixer in a console: it is quick and easy to pop-up a window to launch ALSA Mixer, and ALSA Mixer is displayed in colour at nearly the width of the desktop.
Launch ALSA Mixer GUI from an icon on the Panel
First, use your package manager to install the package alsamixergui. It’s a GUI equivalent of the console ALSA Mixer, but with a few less options.
Once you install it, you should find ALSA Mixer GUI in your desktop environment menu (e.g. Kickoff > Applications > Multimedia > ALSA Mixer GUI). By default this will show the PulseAudio channels, so use the menu editor (e.g. right-click on Kickoff and select Menu Editor) to change the command to the following if your sound card is Card 0:
alsamixergui -c 0
Once you have done this, save the new menu entry, log out and log in again, and when you launch ALSA Mixer GUI from the menu a window similar to the following will pop-up:

ALSA Mixer GUI
To put an icon on the Panel in order to make it even easier to launch ALSA Mixer GUI, just drag the icon from the menu to the Panel and it will be copied to the Panel. Simple as that.
Launch ALSA Mixer in a Konsole docked in the System Tray
You can do this using KDocker, which works in KDE, GNOME, Xfce and other desktop environments.
For KDE, create the following Desktop Configuration File Konsole-alsamixer.desktop (or whatever name you want) and put it in the directory ~/.kde4/Autostart/
[Desktop Entry] Comment[en_GB]=Console (docked) running ALSA Mixer Comment=Console (docked) running ALSA Mixer Exec=kdocker konsole -e alsamixer -c 0 GenericName[en_GB]=Dock Konsole running ALSA Mixer in the System Tray GenericName=Dock Konsole running ALSA Mixer in the System Tray Icon=kmix MimeType= Name[en_GB]=Konsole (Docked) Name=Konsole (Docked) Path= StartupNotify=true Terminal=false TerminalOptions= Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-KDE-SubstituteUID=false X-KDE-Username=

KDE System Tray showing Konsole docked using KDocker
Clicking on the docked Konsole icon in the System Tray will pop-up a Konsole window with the familiar ALSA Mixer running in it, as shown in the fourth picture above. Clicking on the icon again will minimise the Konsole to the System Tray.
Launch ALSA Mixer in a Konsole from an icon on the Desktop
For KDE, create the following Desktop Configuration File Konsole-alsamixer.desktop (or whatever name you want) and put it in the directory ~/Desktop/
[Desktop Entry] Comment[en_GB]=Console running ALSA Mixer Comment=Console running ALSA Mixer Exec=konsole -e alsamixer -c 0 GenericName[en_GB]=Konsole running ALSA Mixer GenericName=Konsole running ALSA Mixer Icon=kmix MimeType= Name[en_GB]=Konsole Name=Konsole Path= StartupNotify=true Terminal=false TerminalOptions= Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-KDE-SubstituteUID=false X-KDE-Username=
You can change the icon displayed on the Desktop either by right-clicking on the icon on the Desktop and selecting Properties or by editing the file directly. For example, I specified Icon=/usr/share/icons/mono/scalable/apps/kmix.svgz which looks rather retro and I think suits the unsophisticated looks of ALSA Mixer.
Summary
I have not covered all the options for making it easy to display ALSA channels as well as PulseAudio channels, but hopefully one of the above methods will suit your needs or will spur you to experiment.