Getting sound to work on a Thinkpad R60e

2008-04-15 (permalink tags: , )

At job, we have a huge stack of laptops. Those are mostly used for training but when we go out for consulting, we get to pick from the stack. Since we let student rip the OS to shreds, the stack is always freshly installed with a recent GNU/Linux distribution. There is lot of hardware diversity in the stack; last time I went for a Thinkpad R60e, and sound didn't work.

Since I'm out for a few weeks, no sound would be a major hit on my moral. Here is how I got the sound to work on Kubuntu Gutsy Gibbon (7.10). There might be an easier way to do it but the following worked.

First, a word on the problem. The sound card is an Intel ICH7.

   $ lspci | grep Audio
   00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
  

With the default install, kmix will see all the channels but nothing will play. Some applications, like Amarok, will report that the device is busy, others like ogg123 will work perfectly fine with the progress bar and everything except that you will hear no sound.

At first, I suspected was that my kernel modules were too old. I upgraded to the latest kernel, without much luck:

   cd /usr/src
   wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.4.tar.bz2
   tar -xvf linux-2.6.24.4.tar.bz2
   cd linux-2.6.24.4
   cp /boot/config-2.6.22-14-generic .config
   make olconfig
   make; make module; make install; make modules_install
   mkinitramfs -o initrd.img-2.6.24.4 2.6.24.4
   emacs /boot/grub/menu.lst 
  

I mention the new kernel since I still run it so it might influence your success during the next step. After reboot, I was left without /dev/dsp. Talk about an improvement. Several forum posts pointed to alsa as the main culprit so I tried my hand at it. The instructions on the alsa wiki are good but I had to replace intel8x0 with intel8x0m to get the sound to work:

   mkdir /tmp/alsa
   cd /tmp/alsa
   wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.16.tar.bz2
   wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.16.tar.bz2
   wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.16.tar.bz2
   tar -xvf alsa-driver-1.0.16.tar.bz2
   cd alsa-driver-1.0.16 
   ./configure --with-cards=all --with-card-options=all --with-sequencer=yes
   make ; make install ; ./snddevices
   # compile alsa-lib and alsa-utils
   modprobe snd-intel8x0m; modprobe snd-pcm-oss 
   modprobe snd-mixer-oss; modprobe snd-seq-oss
   alsamixer

After that, crystal clear melodies poured into my headphones. I only needed to hack /etc/modutils/alsa, changing intel8x0 for intel8x0m. That's it. I hope that helps other Thinkpad owners.

Leave a comment