It took a little bit longer than I had expected, but I have conquered the demons that were possessing my sound card, and the last remaining (software) reason not to run Ubuntu on an X300 has been addressed. That’s the good news.

The bad news is that the fix may be a little bit involved, depending on which kernel you happen to be running.

Download a new ALSA snapshot from here. I can confirm that 0424 works for me, and requires no patching.

Extract that: tar xvjf alsa-driver-hg20080424.tar.bz2

Change to the extracted directory: cd alsa-driver-hg20080424

Configure the snapshop: ./configure

Make the package: make

Install the package: sudo make install

Restart the ALSA services: sudo /etc/init.d/alsa-utils start

Insert the newly built module: sudo modprobe snd_hda_intel

If that completes successfully, you’re probably done. Unmute the sound using something like alsamixergui (sudo apt-get install alsamixergui), and you’re all set. If you get an error like the following:

Copy over the current kernel configuration: sudo cp /boot/config-2.6.24-16-generic /usr/src/linux-source-2.6.24/source/.config

Copy over the current kernel configuration: sudo cp /boot/config-2.6.24-16-generic /usr/src/linux-source-2.6.24/source/.config

Change to the Linux source directory: cd /usr/src/linux-source-2.6.24

Run make oldconfig: sudo make oldconfig

Run make menuconfig: sudo make menuconfig If you get an error, you probably don’t have the right ncurses libraries installed. Do a sudo apt-get install libncurses5-dev libncursesw5-dev

In the resulting menu, go to device drivers:sound

Make sure sound card support is set to “m”

Exit, saving your new configuration

Run make scripts prepare: sudo make scripts prepare

Run make SUBDIRS=sound modules: sudo make SUBDIRS=sound modules

Copy the newly created soundcore.ko module over to the running kernel: sudo cp sound/soundcore.ko /lib/modules/2.6.24-16-generic

Create the modules.dep and map files: sudo depmod -a

Reload your soundcard module: modprobe snd-hda-intel

Voila: everything should work. If it doesn’t, well, you’re on your own.

Hopefully this helps someone who ran into the same issues that I did, as the model was released too late for the patches to make it into the initial Hardy release.

And before all of the anti-Linux folks – especially you Mac people – jump all over the above as proof that the Linux desktop is geek-only, remember that the laptop’s been shipping for about a month. Give it time, probably not even much, and none of the above will be necessary for any user. Much like all of the Thinkpad keys “just work,” so too will the sound. I promise.

I just didn’t feel like waiting.

Before I forget, my thanks to the ALSA developers, and all of the folks over at the original ALSA bug report, especially schweeb who spent an hour or two IM’ing with me last weekend trying to get sound working.

I’ve recently switched from a MacBook to an X300 (it was a close call btwn the MBA) – I’ve been using Ubuntu since it arrived about three weeks ago and am generally very impressed however it wasn’t until the alsa-driver-hg20080516.tar.bz2 release that I’ve managed to get the sound working (release 0424 had disappeared from the download list).