Linux on the ThinkPad X31

I'd recommend checking out at least one of the many other guides to installing Linux on ThinkPads at TuxMobil or Linux on Laptops. This page is mainly for my own benefit as it is tailored precisely to my setup.

The most thorough guide I've encountered is Henrik Brix Andersen's guide:

GNU/Linux on an IBM ThinkPad X31. [Update 9/12/06: can't seem to find it anymore.]
It contains many useful links, though it is geared towards a different network card and wireless card, and has unnecessary lines in Xorg.conf.

I also recommend taking a look at Mark's Wiki, mainly to get the graphics card working.

There's a mailing list dedicated to running Linux on this laptop.

Windows and the Predesktop Area

I recommend creating your own recovery CD, reinstalling XP and removing the "Predesktop Area". I found the instructions on a page written by Carlo Sogono which has since vanished. A brief summary of them follows:

Hit F1 soon after powering up to get to the BIOS. Here you can disable the "Predesktop Area", so that operating systems can now see the hidden partition.

There should be a copy of a WinXP CD on the hard drive somewhere. If I recall correctly it was called "C:\I386\". Burn the contents of this directory to create a WinXP recovery CD. Make sure the files go into an "I386" directory and that ISO Level 1 is used. Otherwise annoyances may arise. I needed to rename some files to get my installation working because I neglected to do this. This CD can be used to reinstall XP.

I also created an image of the Predesktop Area and burnt it to a DVD, in the unlikely event that I'd ever want to restore my laptop to its original condition. To do this, I created a partition out of the new free space after disabling the Predesktop Area, and used the dd command. I recommend splitting the image into two halves, because large files on DVDs are not supported yet.

For a fresh install of WinXP, I needed a few things from the IBM Thinkpad X31 support page:

Another way to remove the predesktop area is to use IBM's own Predesktop Administrator Utility


Compilation options for 2.4.x kernels: In addition, I recommend compiling the ACPI drivers and installing acpid, as well as the IBM ThinkPad ACPI Extras Driver. Once this is done, you can dock/undock the docking station without rebooting. Note that the docking station should be attached when Linux is first started, since hotplugging is not supported by the Linux ACPI framework yet.

Notes on 2.6.x kernels.

Originally I found the graphics driver (ATI Radeon) to be a bit flaky. I needed to set the environment variable MESA_NO_3DNOW=Y otherwise OpenGL (Mesa3D) wouldn't work.

This problem never arises anymore. However, it is important to remember to install ATI drivers for the kernel, X server and the Mesa library (xlibmesa-dri in Debian.)

I have the following somewhere in my XF86Config-4 file. [9/06 Update: I now use settings found here instead.]

Section "Device"
    Identifier      "ATI Technologies, Inc. Radeon Mobility M6 [LY]"
    Driver          "radeon"
    Option          "AGPMode" "4"
    Option          "AGPFastWrite" "on"
    Option          "EnablePageFlip" "on"

The official ATI drivers don't support the Mobility M6 LY.

The ThinkPad X31 has several extra keys. Four are hardware: "Access IBM", volume down, volume up and mute. The latter three control a hardware mixer.

The tpb program (there's a Debian package with this name), which relies on the IBM ACPI extensions, can handle hardware key events. By default, it displays the volume level every time a volume key is struck. The "Access IBM" button is the "ThinkPad" button according to tpb, and can be programmed by using the -t option.

There are three software keys, the Fn key and the forward and backward keys that are located above the left and right arrow keys. They generate keycodes 227, 234 and 233 respectively.

The tpb program handles the hardware and software buttons, and can be easily configured to perform various functions when they are pressed. Alternatively, one can use the xmodmap program to handle the software buttons e.g. xmodmap -e "keycode 234 = F19" in X. There is a tpb option XEVENTS that causes tpb to ignore software buttons so one could use tpb for hardware buttons and xmodmap for software buttons. It is possible to setup Firefox so that these buttons cause the browser to go forward and back , by first using xmodmap to remap them to function keys and then editing Mozilla XUL to cause those function keys to make the browser go forward and back. As stated on Ben Pfaff's IBM Thinkpad T30 under Linux guide, in the console, you can do something like

setkeycodes e063 125 e06a 126 e069 127
and then use
echo 'keycode 126 = Decr_Console' | loadkeys
echo 'keycode 127 = Incr_Console' | loadkeys
to remap the software keys.

The sound card does not do hardware mixing. If you want several programs to share the sound card, audio quality must be sacrificed and software mixing must be used. I prefer to do this at the lowest level possible and it seems using the ALSA dmix plugin is the best choice. Version 2.6.12 of the kernel does this by default. Otherwise, see one of the following references.


Overall I'm happy with Linux on this laptop, but...


Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.

Last Updated Oct 9 2006. I don't intend to update this page anymore. Instead, see all my blog posts related to Thinkpads

Valid HTML 4.01!