martedì 29 dicembre 2009

Asus K50IJ / X5DIJ audio (english)

(Versione italiana disponibile su

13 Feb 2010: Remember to manually install linux-backports-modules-alsa-`uname -r` package at every new kernel installation.
12 Feb 2010: New simpler procedure to upgrade alsa drivers. Just install linux-backports-modules-alsa-`uname -r` package.
30 Dec 2009: Updated link to alsa-driver from 1.0.22 to

After some partial success we have some good configuration for audio system in Asus k50 series (k50ij, x5dij, etc....) laptops with Ubuntu Karmic Koala 9.10.

Please let's read the whole post before trying to follow its advices: you have to choose among some alternatives.
Uninstall pulseaudio

sudo apt-get remove --purge pulseaudio

Install alsa 1.0.22

Thanks to Stéphane Gaudreault and his post at

We must begin by determining our version of alsa as follows :

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.20.

To avoid problems during the upgrade of Alsa-utils, we need to stop it with the following command :
sudo /etc/init.d/alsa-utils stop

We must then install the necessary tools to compile along with the kernel headers :
sudo apt-get -y install build-essential ncurses-dev gettext xmlto
sudo apt-get -y install linux-headers-`uname -r` libncursesw5-dev

Then, we go in our personal folder and download alsa-driver, alsa-lib and alsa-utils :
cd ~
rm -rf ~/alsa* ~/.pulse*

After that, we create a new folder for the compilation and installation of the 3 files. Then, we move the 3 tar files that we just downloaded in this folder :
sudo rm -rf /usr/src/alsa
sudo mkdir -p /usr/src/alsa
cd /usr/src/alsa
sudo cp ~/alsa* .

Unpack the 3 tar files :
sudo tar xjf alsa-driver*
sudo tar xjf alsa-lib*
sudo tar xjf alsa-utils*

We compile and install alsa-driver :
cd alsa-driver*
sudo ./configure
sudo make
sudo make install

We compile and install alsa-lib :
cd ../alsa-lib*
sudo ./configure
sudo make
sudo make install

We compile and install alsa-utils :
cd ../alsa-utils*
sudo ./configure
sudo make
sudo make install

If like me, you got this error during the last “sudo ./configure” :
checking form.h presence... yes
checking for form.h... yes
checking for new_panel in -lpanelw... no
configure: error: panelw library not found

You will need to add those symbolics links (only if you got the error) and restart the installation from the last “sudo ./configure” :
sudo ln -s /usr/lib/
sudo ln -s /usr/lib/
sudo ln -s /usr/lib/
sudo ln -s /lib/

Then, we remove the 3 tar files in our personal folder that are not anymore necessary :
rm -f ~/alsa-driver*
rm -f ~/alsa-lib*
rm -f ~/alsa-utils*

Then, just restart your computer and your alsa version should be 1.0.22!

You can verify that you have now indeed have this version of alsa :
cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.22.
Compiled on Dec 17 2009 for kernel 2.6.31-16-generic (SMP).

Just to be sure everything is well configured, execute this command :
sudo alsaconf

and reboot again!
Install backport-alsa

Previous procedure sometimes ends with audio not working.
aplay -l

It shows only
**** List of PLAYBACK Hardware Devices ****

instead of the list of available sound cards (but these are correctly listed by cat /proc/asound/cards command). Meawhile, executing:

we can see this in the middle of alsamixer window:
This sound device does not have any controls.

It seems you can correct this wrong behaviour by installing backports alsa driver:
sudo apt-get install linux-backports-modules-alsa-2.6.31-17-generic

Install: audio tray icon and sound control center (without pulesaudio)

We previously removed pulseaudio from our system, unfortunately doing so we loose sound control tray icon and System-Preferences-Sound application.

Thanks to Josh Green and his post at

Josh Green created gnome-applets .deb packages which include the mixer applet. To get back the old mixer, and other gstreamer based gnome Media tools, just install the gnome-media package from Ubuntu Jaunty. This will make the "Volume Control" button work with the mixer applet.

i386 gnome-applets binary packages:

Links to Ubuntu Jaunty 9.04 gnome-media packages, download the appropriate ones for your CPU architecture:


In case you want to build your own gnome-applets packages, for other non i386 architectures or to incorporate newer changes, here are the sources and a patch of changes that I made. Note that this is not required if you are simply using the i386 binary package above. Extract the gnome-applets archive somewhere and then apply the gnome-applets Ubuntu patch followed by the mixer revival patch. Build as you would any debian package.

gnome-applets_mixer_revival_patch1.diff (MIRROR)

There's another solution to this problem withi no need to compile sources for 64bit architecture:

Install: audio tray icon hotkeys configuration for mute, volume up, volume down

Thanks to richie2.0 and his post at

You have to download THIS ARCHIVE.

It has two dependencies to manually install on your system: python-alsaaudio and python-gnome2-extras.

To control volume with dedicated hardware keys on my laptop I made a script myself. A simpler solution would be to call amixer directly, but I really want libnotify OSD.

I have put the files in the attachment into /usr/local/bin (need to sudo or become root)

Add and in "system - settings - startup programs".

Open "system - settings - keyboard shortcuts" and add a custom shortcut key named "alsa mute" and command "/usr/local/bin/alsa_master_mute".
Now assign the mute key to this command.

Repeat for "down" and "up".

There may be prettier solutions, but this one works. This is an ugly hack, and it's my first pythonscript, which I didn't put more effort in than necessary for it to work.

Sidenote: Totem seems to be patched to not function with alsa. Audio is muted and grayed out. Other than that the pulse-free experience is pleasant.

Install: sound control center (without pulesaudio)

If you followed second way to activate audio tray icon, you also have to re-activate the sound control center (because the Karmic one can work only with pulseaudio):

Extract his contents to any directory.
Copy the right application for your architecture (32 or 64 bit) in /usr/local/bin directory.
Copy file in /usr/share/gnome-control-center/glade directory.
Launch /usr/local/bin/gnome-sound-properties file to configure audio settings.
Here's my actual configuration:

Alsamixer settings: playback without headphones

Alsamixer settings: playback with headphones
("Front" line is automagically muted)

Alsamixer settings: capture
("Capture" line is headphone mic, "Capture 1" something else :)

Alsamixer settings: all


[Karmic] Get back Alsa Mixer Applet
Mixer applet for karmic that doesn't depend on pulse
Upgrade Alsa (1.0.22) on Ubuntu Karmic Koala 9.10
ALSA Gnome panel applet in Ubuntu 9.10 Karmic

Nessun commento: