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.
Here’s the fix process in detail:
- Remove the running Intel sound module from the kernel:
sudo modprobe -r snd_hda_intel
- Remove the existing Ubuntu sound modules:
sudo rm -R /lib/modules/2.6.24-16-generic/ubuntu/sound/
- Stop the running ALSA services:
sudo /etc/init.d/alsa-utils stop
- 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:
FATAL: Error inserting snd (/lib/modules/2.6.24-16-generic/kernel/sound/acore/snd.ko): Unknown symbol in module, or unknown parameter (see dmesg)
it may be because you’re running a 32 bit kernel and soundcore.ko is omitted (Launchpad bug here). If that’s the case, proceed to the next step.
- We’re going to need to build a soundcore.ko and copy it to our kernel. Here’s how that’s done (credit to MsTiFtS for the original procedure).
Bring down the Linux source code:
sudo apt-get install linux-source-2.6.24
- Extract that:
sudo tar xvzf /usr/src/linux-source-2.6.24.tar.bz2
- 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 asudo 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.
The community really is what makes the software.