Remapping Keyboard Multimedia Buttons to ALSA after removing PulseAudio

Getting rid of ‘PulseAudio’ and using only ALSA is not the answer to all ‘PulseAudio’ related issues in Ubuntu. But it was the only solution (or the easiest, most of the time) that I could use to get my sound card to work in Ubuntu. However that was before I got my Dell Vostro V131 and luckily PulseAudio now works flawlessly in it.

Anyway, if you still have to remove it to get your audio hardware to work properly and also used to using multimedia buttons on your keyboard for things like Volume up/down and muting, then you’ll notice that as soon as you remove PulseAudio they too stop working. Other functions such as Pausing or Next/Previous etc should work as they’re ‘bound’ to the media players rather than the sound server.

Someone (‘Joshua’) asked me if it’s possible to get these to work again and the answer is yes. So I thought it would be beneficial write a post (with screenshots etc) for someone who’s also trying to achieve that. Below is the complete procedure (make ready your surgical gowns! ;-)).

Step 1: First we have to disable the existing keyboard shortcuts for Volume Up/Down & Mute, before re-mapping.

For that, if you use the ‘Unity’ desktop (I’m using Ubuntu 12.04) then search for ‘keyboard’ on ‘Dash’ and click on its icon to open it.


Or, you can also click on the small ‘gear’ icon on the top-right corner (on the desktop) and from the menu choose ‘System Settings’. Then under the ‘Hardware’ click on the ‘Keyboard’ icon … both ways should work.

Step 2: Once you’ve opened the keyboard configuration window, click on the ‘Shortcuts’ tab and then choose ‘Sound and Media’ sub option as shown below.


Step 3: Then to your right side you’ll see a list of existing keyboard shortcuts for various multimedia related tasks. As said, we only have to disable only three shortcuts (the top three in the list).

So first click on the ‘Volume mute’ shortcut and as soon as you click on it, to its right side you should see a text line shows up saying ‘New accelerator…’.


When that happens, press the ‘Backspace’ button and the text will be changed to ‘Disabled’, meaning that particular shortcut is disabled.

Follow the same steps to disable the other two shortcuts below it (Volume down and Volume up).


Step 4: Now click on the small cross icon at the bottom of this window and it’ll open up a small box letting you to enter a custom (new) shortcut.


Entering a new shortcut for Volume mute

You can fill-out the ‘Name’ with anything, let’s just call it ‘Volume mute’ but under the ‘Command’ field, copy the below code and paste it.

amixer set Master toggle

Then click on the ‘Apply’ button. It’ll be disabled by default. To enable it, simply click on the ‘disabled’ text field in front of it and then enter the keyboard shortcut (combination) that you prefer to have for ‘Volume mute’ under ALSA. That’s it for that.

Entering a new one for Volume down

Follow the same steps to add another custom shortcut and this time enter the name ‘Volume down’. Fill out the ‘Command’ field with the below code.

amixer set Master 10--

The ’10’ means a 10% decrease of your volume level per key press. If it’s too aggressive for you then you can change the number but don’t change anything else. After that, again follow the above steps to assign a new shortcut to enable it.

Entering a new shortcut for Volume up

Open the add custom shortcut box, under its Name enter ‘Volume up’ and for the Command enter the below code.

amixer set Master 10+

Here too you can change the ’10’ (again indicating a 10% increase) but leave the rest of the command alone. Then follow the rest of the steps to assign a preferred keyboard shortcut to enable it.

When all is done …

When you’re done, simply close the Keyboard shortcut configuration window. Then while playing something, try pressing the keys to see whether they’re working or not (they should). That’s it!.

An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

15 thoughts on “Remapping Keyboard Multimedia Buttons to ALSA after removing PulseAudio”

  1. Thanks for the excellent tutorial. In my case (Linux Mint 14 Mate) I had to use:

    amixer -c 2 set Master toggle
    amixer -c 2 set Master 10
    amixer -c 2 set Master 10+

    I got several HDMI devices and a separate sound card which is the second card, i.e. -c 2 according to

    aplay -l

  2. Very odd, but I had to restart after the last step to get the shortcut keys to work.

    Also, and maybe it’s obvious to most, but you can check beforehand if the commands above are correct for you or if you need modifications (like Powerhouse did). They are just normal terminal commands, so typing them in terminal to test will let you know if they are correct for your system.

    The commands listed in the main post worked just fine for me — but like I said I oddly had to reboot before the shortcuts would activate. It’s a weird thing to require a reboot, but it works now! Thanks for the article!

  3. Thanks, thanks, and thanks, it works great with the last ubuntu version. I tweaked Pulseaudio, now on Alsa, with Jack and Qasmixer with shortcuts!


Leave a Comment

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