Nostalgia for those ALSA mixer channels that KMix and GNOME Volume Control used to have?

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 showing ALSA channels

KMix with ALSA channels

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

KMix with PulseAudio channels

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

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

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

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

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

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.

About Fitzcarraldo
A Linux user with an interest in all things technical.

25 Responses to Nostalgia for those ALSA mixer channels that KMix and GNOME Volume Control used to have?

  1. Enajski says:

    Hey, thanks for sharing.
    In my case, KMix does not properly read the volume information of my Maya 44 USB soundcard, rendering the volume slider useless, whereas alsamixer works totally fine.

    W.

  2. AlonsoTy says:

    Great Fitzcarraldo,
    you are a role model for completeness of exposition and spirit of dissemination.
    😉

  3. Jon says:

    Hey, thanks very much. After spending days trying to find a decent solution for this (I’m using kubuntu 11.04 and I thought my soundcard wasn’ t properly detected), things work fine now!!

  4. couc says:

    have you tried QasMixer?

    http://xwmw.org/qasmixer/

    peace
    couc

    • Fitzcarraldo says:

      No I haven’t, as I had not come across it before. However, I see that there is not an ebuild for QasMixer in the Portage tree, and I cannot find an ebuild for it in any third-party Portage overlay either. However I’ll be sure to give it a try if someone does write an ebuild for it, as a GUI ALSA mixer for KDE that is better than alsamixergui would be great (alsamixergui is really long in the tooth and, as far as I can tell, is no longer developed).

  5. couc says:

    well
    qasmixer is a very small project. actually there is only 1 person developing, and im one of the 3 translators.
    recently, sebastian (the autor) added it to debian packages (i think that because he uses debian. i suppose that if he uses gentoo he would do it)
    i invite you to collaborate and make qasmixer avaliable in the portages tree and join this small alsa mxier project
    what do you think?
    peace
    couc

  6. couc says:

    would be nice!

    the project site:
    http://xwmw.org/qasmixer/

    good luck

    • Fitzcarraldo says:

      Seems someone has created an ebuild. It’s media-sound/qastools and qasmixer is installed when you install qastools.

      $ eix qastools
      * media-sound/qastools
      Available versions: (~)0.17.1 (~)0.17.2 {{linguas_cs linguas_de linguas_es linguas_ru}}
      Homepage: http://xwmw.org/qastools/
      Description: Qt4 GUI ALSA tools: mixer, configuration browser

  7. AlonsoTy says:

    Hi Fitzcarraldo,
    perhaps for some Gnome users can be useful…
    recently I rediscovered the use of “gnome-alsamixer” an old Gnome GUI for AlsaMixer… but it looks as good as KMix.

  8. Felipe says:

    Hi! Any of you guys know how to enable that “Event Sounds” slider under the “Playback Streams” tab? I’ve made a re-install of Kubuntu 10.10 on my desktop, and I’ve lost this slider, I don’t know why. I’ve tried uninstalling both pulseaudio and alsa and reinstalling again, as I did on the first install, and also deleting the kmix config files, but none worked…
    Thanks!

    • Fitzcarraldo says:

      What does your file kmixrc contain? Mine contains the following (notice the lines referring to Playback_Streams):

      $ cat /home/fitzcarraldo/.kde4/share/config/kmixrc
      [Global]
      AllowDocking=true
      AutoUseMultimediaKeys=true
      ConfigVersion=3
      DefaultCardOnStart=PulseAudio.Playback_Streams.1.default
      Labels=true
      MasterMixer=PulseAudio::Playback_Devices:1
      MasterMixerDevice=alsa_output.pci-0000_00_1b.0.analog-stereo
      Menubar=true
      MixerIgnoreExpression=Modem
      Orientation=Vertical
      Position=0,0
      Size=720,360
      Tickmarks=true
      TrayVolumeControl=true
      Visible=false
      startkdeRestore=true

      [Profiles]
      PulseAudio::Capture_Devices:1=PulseAudio.Capture_Devices.1.default
      PulseAudio::Capture_Streams:1=PulseAudio.Capture_Streams.1.default
      PulseAudio::Playback_Devices:1=PulseAudio.Playback_Devices.1.default
      PulseAudio::Playback_Streams:1=PulseAudio.Playback_Streams.1.default

      [View..PulseAudio::Capture_Devices:1.alsa_input.pci-0000_00_1b.0.analog-stereo]
      Show=true
      Split=false

      [View..PulseAudio::Playback_Devices:1.alsa_output.pci-0000_00_1b.0.analog-stereo]
      Show=true
      Split=false

      [View..PulseAudio::Playback_Devices:1.alsa_output.pci-0000_01_00.1.hdmi-stereo]
      Split=false

      [View..PulseAudio::Playback_Streams:1.restore:sink-input-by-media-role:event]
      Show=true
      Split=false

      [View..PulseAudio::Playback_Streams:1.stream:_]
      Show=true
      Split=false

      • Felipe says:

        Thanks.
        I think that it’s not related to that file, because I have found out that deleting the /home/username/.pulse folder gives me that slider, but just until next boot!

        Anyway, here is my kmixrc file. Don’t bother with the codification error (on the ? symbol), because in my last install was also like this. I still have the old /home folder, just in case.

        [Global]
        AllowDocking=true
        AutoUseMultimediaKeys=true
        ConfigVersion=3
        DefaultCardOnStart=PulseAudio::Dispositivos_de_reproducción:1
        Labels=true
        MasterMixer=PulseAudio::Dispositivos_de_reproducción:1
        MasterMixerDevice=alsa_output.pci-0000_00_1f.5.analog-stereo
        Menubar=true
        MixerIgnoreExpression=Modem
        Orientation=Vertical
        Position=0,0
        Size=208,264
        Tickmarks=true
        TrayVolumeControl=true
        startkdeRestore=true

        [View.Controls.PulseAudio::Dispositivos_de_captura:1.alsa_input.pci-0000_00_1f.5.analog-stereo]
        Show=true
        Split=false

        [View.Controls.PulseAudio::Dispositivos_de_reproducci�n:1.alsa_output.pci-0000_00_1f.5.analog-stereo]
        Show=true
        Split=false

        [View.Controls.PulseAudio::Flujos_de_reproducci�n:1.restore:sink-input-by-media-role:event]
        Show=true
        Split=false

        • Fitzcarraldo says:

          What version of KDE are you using? I’m using KDE 4.7.4. Anyway, your kmixrc looks like it could be missing some entries. For example, you don’t have the Profiles section and you don’t have the final section that is in my file. Have you tried editing kmixrc and adding those?

          If deleting the /home/username/.pulse directory gives you back Playback Streams | Event Sounds in KMix then are you reverting to pure ALSAMixer format in KMix by deleting that directory? Anyway, do you have the following lines in your files /etc/pulse/system.pa and /etc/pulse/default.pa?

          ### Enable positioned event sounds
          load-module module-position-event-sounds

          If you don’t, you might want to try adding them to see if it makes a difference.

          As we’re using different Linux distributions and probably using different versions of ALSA, PulseAudio and KDE, I think you might be better off posting your problem in the Ubuntu Forums where other users are more likely to have an installation similar or identical to yours.

      • Felipe says:

        Thanks for answering.

        I’m using KDE 4.5.5. That kmixrc file is missing some entries because I deleted that file to restore a “mute on reboot issue”, but then I tried with the old kmixrc file and not even worked, so problem is not there.
        I do have those lines on both files, so I can’t find where the problem is!

        I’ve opened a thread on Ubuntu Forums, and I will post it here just for future references, if there’s no problem with that. If it is, please tell me or just delete this comment:

        https://answers.launchpad.net/ubuntu/+question/183001

        By the way, I’ve taken a picture of this page, sorry again for that.

        Regards!

        • Fitzcarraldo says:

          I think your problem is similar (or identical) to Problem no. 3 mentioned in the first post in the following forum thread:

          http://forum.sabayon.org/viewtopic.php?f=53&t=22939

          If you read further down the above-mentioned thread, you’ll see that the problem was seen in KDE 4.6 when the Spanish-language version of KMix was used, but not in the English-language version of KMix. I expect the solution to your problem would be to use a 4.7.x version of KDE.

          You can check if the localisation is indeed the cause of your problem by exiting from the Spanish-language version of KMix and then launching KMix from the command line as follows:

          LANG=en kmix

      • Felipe says:

        It seems not to be a localisation problem.. But thanks for trying so hard! And I have seen on the other post that you were running KDE 4.5.1 with that “Event Sounds” slider. I can’t understand why it doesn’t show again on my desktop (and neither in my laptop, by the way).

  9. tekwyzrd says:

    I have to wonder why the kde devs are so opposed to icons that reflect their function and apps that give users the options they are accustomed to. With the on-going trend that’s controlling gnome and kde it won’t be long before most options are gone and the linux desktops aren’t much different than windows. I’ve been using Linux for almost 6 1/2 years and Sabayon for almost 5 1/2 years and wonder why they would rather cater to those too lazy to learn and remove options than keep them for those of us willing to take the time and make the effort to do so. I resent the simplification trend. I used linux and kde in it’s 2.x days and think they’re going the wrong way. It’s too bad they’re so set on what they have decided is the “right path”.

  10. Klas says:

    Thank you very much for this blog. I use Kmix for Alsa controls and Veromix for volume channel and equalizer control.

    KMix, Veromix, QML and other stories…

    • Fitzcarraldo says:

      I have just tried the Veromix Plasmoid (widget) for the first time and find it very good, so thanks for the tip.

      For others who may be interested, I found there is no need for an ebuild to install Veromix; it can simply be installed via KDE itself:

      1. Right-click on the Desktop and select ‘Unlock Widgets’.
      2. Right-click on the Desktop and select ‘Add Widgets…’
      3. In the widget panel that pops-up, click on ‘Get new widgets’ and select ‘Download New Plasma Widgets’.
      4. In the Search box enter “Veromix” (without the quotes).
      5. Click the ‘Install‘ button of the one widget that is found.
      6. To add Veromix to your Panel or to your Desktop, use the usual KDE procedure for adding a widget to the Panel or Desktop.
      7. To configure Veromix, right-click on the widget and select ‘Veromix Settings’.

  11. I have hated the chaos that pulse audio creates in kmix for a long time now. On many systems I just deinstalled pulseaudio – although the mess with kmix is not the fault of pulseaudio.

    I never understood why the KDE developers did not find a reasonable solution for kmix – namely to provide the user with sliders both for alsa channels and additionally for the pulse audio server and its streams.

    However, on a new laptop on which I installed Opensuse 12.3 with KDE and XFCE I ran across a very nice alternative for a well designed mixer :

    “xfce4-mixer” provides exactly what I need – it separates clearly between alsa channels and pulse audio channels and lets me adjust them separately. So I do not need to open several mixers in parallel any more.

    Why the KDE developers never produced something like the functionality of xfce4-mixer is beyond my understanding.

  12. Hugh says:

    Thanks for all the useful info which has led to a solution after many hours in the audio wilderness. I’ve ditched Kmixer in favour of Veromix which fixed more than a few things which irritated. (:-)

  13. Anatoliy says:

    I hate kmix a lot. So is a program-monstr!!! It take all computer resources and hang up it often. So I uninstall it. But now I have no opportunity to tune sound level/ Also it needn’t in most case. So I want to install something else, not such a monstr… But I fault.

    • Fitzcarraldo says:

      The only alternative to ALSA that I know of is OSS (Open Sound System) but I have never used it myself. ALSA is used by the vast majority of Linux distributions. Your best bet is to stick with ALSA and post a request for help in the forums of your particular Linux distribution.

  14. Kerensky says:

    Thanks for this comprehensive write-up. It helped so much w/ my project of running a slimmed-down desktop.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.