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 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!.