wakelift / posts /

My experiences with OSS4 on Debian sid


For some reason I can't quite remember, I decided to give OSS4 another try. Probably because it has, as far as I've heard on the 'nets, the superior API and is crossplatform and yadda yadda. Or maybe because I want to pretend I'm cool and up to date and such.

Installing it

Reading the OSS4 Wiki, I decided to build OSS4 from source. Using the directions on the wiki, it was quite easy. Just hg clone the source, building it in a separate directory, etc. etc. Part of the installation was to completely remove ALSA, which was completely fine at the beginning, as there's a fairly competent ALSA compatibility built in, but there turned out to be a problem.

Thinkpad Extra-Keys

The module thinkpad_acpi has been very useful to me, as it allowed me to use the blue thinkvantage button for locking my screen and other things. However, after removing ALSA from my system, it stopped working. The cause of the problem was, that thinkpad_acpi has a setting that allows the ALSA mixer to be manipulated with the volume keys directly. Since ALSA was completely removed from my system, it could no longer be loaded, because it could not find the symbols needed. Fortunately, the module offers a config switch to completely remove the ALSA-related code from the module.

Rebuilding thinkpad_acpi

Following the instructions to build a complete debian kernel, with slight variations, allowed me to easily rebuild thinkpad_acpi as needed for my running kernel.

The first step was to get the source code for the debian kernel, like so:

apt-get source linux-2.6
cd linux-2.6*(/)

Then, the debian patches needed to be applied.

fakeroot debian/rules source

After that, the configuration had to be done.

make menuconfig
(select Device Drivers)
(select X86 Platform Specific Device Drivers)
(make sure Thinkpad ACPI Laptop Extras is set to <M>)
(set Console audio control ALSA interface to [ ])
(set Video output control support to [ ] for good measure)
(exit a couple of times, then save the config)

The next step was to prepare the build.

make prepare
make scripts
cp /usr/src/linux-headers-$(uname -r)/Module.symvers .

This allowed us to run make modules for the platform drivers, like this:

make SUBDIRS=drivers/platform/x86 modules

The result is a shiny new thinkpad_acpi.ko in drivers/platform/x86/, which we can finally copy over to our modules folder:

(as root):
cp drivers/platform/x86/thinkpad_acpi.ko /lib/modules/$(uname -r)/kernel/drivers/platform/x86/thinkpad_acpi.ko
modprobe thinkpad_acpi