Linux on T40p

Table of Contents


I recently obtained a new toy: a T40p laptop, model 2373-G1U. Here are some notes I've assembled on making it work with Linux. (Debian Linux/unstable, to be precise.)

I started with a hard disk that I had previously had in my previous laptop, a T21. So I removed the original laptop disk in the T40p, containing Windows XP and the IBM "predesktop" installation area, and set it aside. This way I could guarantee not damaging the existing Windows install. If you don't have an extra disk, make sure you take a look at Klaus Weidner's Linux on T40 document before you attempt to install Linux on your laptop. Otherwise, you will very likely end up blowing away pre-installed T40 laptop utilities, and the T40 does not come with a recovery CD so you can set things right again! (Rumor has it that if you tell IBM Support that you've purchased a new disk and you need a recovery CD, they will ship one to you; I haven't tried this yet, though.)

(Note: The disk that I'm using is a Toshiba MK6022GAX 2.5 inch laptop drive. It is a high speed (5400rpm) 60GB disk; IBM only sells a 40GB high speed drive. I purchased the disk for for $325.00. I happened to have an extra caddie available from previously dead hard disk, but if you don't have one handy, has them available for $23.00.)

Reinstalling Windows XP with a FAT filesystem

(Note: this only works if the IBM predesktop area has not been damaged. If your laptop was preloaded with software from a corporate I/T help desk, or from a Linux laptop provider who was careless, the IBM predesktop area may have been removed or damaged. In that case, you will need to get the recovery CD from IBM support.)

A very useful thing to do is to reinstall Windows XP using a FAT filesystem. This way, you can mount the Windows XP partition under Linux. The way to do this is to enter the reinstall utility by hitting the "Access IBM" button while the system is booting up, and then selecting the reinstall option. The laptop will warn you that this will destroy all of the data on your hard drive, as it will reformat your Windows partition before reinstalling the standard IBM software load onto the disk. Make sure you've backed up all of your data before you do this!!!.

Once the predesktop utility has reloaded your hard drive, it will ask you to remove all floppies, cd-rom's, etc., before rebooting. At this point, power down your machine and do not boot into Windows XP. Instead boot into a Linux system. This can be done via a "Linux on a business card cdrom, or some other rescue floppy/cdrom, etc. At this point the Windows partition is still a FAT filesystem, and we just need to prevent it from being coverted into NTFS during the initial bootstrapping process. To do this, mount the windows partition as /mnt, and cd to /mnt/windows/system32. Then rename convert.exe to convert_.exe. Now when you boot the Windows XP partition, it will go through the normal installing and unpacking, but it will keep the filesystem as a FAT filesystem, thus allowing Linux to be able to read/write it easily. This will slightly degrade the performance of the Windows XP system, but I considered this a worthwhile tradeoff, since I do most of my work that needs Windows applications using Crossover Office, and so I rarely need to boot into Windows XP anyway.

The X11 Windowing System

The T40p laptop has a ATI Radeon Mobility FireGL 9000 video card. Unfortunately, this card is not supported by the XFree86 4.2, and Debian does not yet support XFree86 4.3, even in unstable. (I've never understood why Debian has to do so much work before they can support a version of XFree86. Sigh.)

A quick workaround to this problem is to download the binary distribution for the X server and its run-time modules from, and install them in /usr/local. To use them, download Xxserv.tgz and Xmod.tgz. Create the directory /usr/local/XFree86-4.3, change directory to it, and unpack these two files. Then change the symlink /etc/X11/X to point to /usr/local/XFree86-4.3/bin/XFree86. The XFree86 configuration file set module loading path to point at /usr/local/XFree86-4.3/lib/modules. Here is the XFree86 configuration file which I used.


The i810_audio driver from the Linux 2.4.21-rc1 distribution works just fine. Enable it via CONFIG_SOUND_ICH. I haven't had any problems with lockups when suspending and resuming, as some as reported, but nevertheless, I would recommend compiling it as a module so you can unload and reload it when necessary.

Built-in Modem

Unfortunately, the built-in modem is a winmodem (software modem). There is a driver (for Linux 2.4 only) that appears to mostly work, although it is not guaranteed to be bug-free, because it is intended for another manufacturer's modem. Still, it seems to work, and it's better than nothing. In order to use it, download this package, and then apply this patch. You will also need to modify the makefile to point at your current kernel's include files. Then just run the commands make, and make install.

Note that newer versions of the slmdm package do not work correctly. This driver was apparently meant for a Toshiba laptop; maybe hopefully at some point the manufacturer of the modem used in the T40p can be convinced to support this wireless modem directly.

Built-in Ethernet

The built-in Ethernet card in the t40p is the Intel PRO/1000 gigabyte ethernet card. It should be compiled into the kernel directly or as a module via the configuration option CONFIG_E1000.

Built-in Wireless

The IBM 802.11 a/b wireless card isn't supported under Linux, as far as I know. So I ordered a Cisco mini-PCI card, because I needed the LEAP authentication feature. Installing the Cisco card is a little complicated, in that it requires removing the keyboard and the palm rest in order to get at the mini-pci slot. For more information on handling the installation, see the T40 Hardware Maintenance Manual.

One word of warning: although the Cisco Aironet 340 and 350 PCMCIA card is one of the better supported and most functional wireless cards in Linux world, the Cisco mini-pci version of the card has apprently very different interfaces and is so its support is perhaps the most primitive. This will hopefully change in the near future.

To get the driver for the mpx350, download the driver distribution Linux-ACU-Driver-v2.0.tar.gz from the Cisco web site. The pre-packaged rpm's are for Red Hat 7.1, which is a rather out-of-date distribution. If you don't mind building your own kernel, the mpi350 driver builds relatively easy in a 2.4.21 kernel. Just copy the following files to /usr/src/linux/drivers/net/wireless: aes.h, aestab.h, mpi350.c, mpi350.h. Then apply the following patch to drivers/net/wireless/Makefile so it will compile the mpi350 module.

Very Important: The Linux drivers only work with a very specific version of the firmware: 5b00.08, which is not available on the Cisco website. The real problem though is that if you try upgrading the Windows drivers, or try installing the wrong version of the Windows driver, it will update the firmware on your wireless card. Without asking you first. At that point, attempts to use the Linux drivers will cause your system to crash instantly. There are some reports that version 5.003 of the firmware will work as well, but that hasn't been my experience. If it works for you, let me know.

Unfortunately, the mpi350 from Cisco driver doesn't support the standard Linux wireless tools API, so the standard iwconfig, iwlist, et. al, won't work. Instead only the propietary Cisco ioctl's are supported, so you have to use the binary-only GUI tools supplied by Cisco. Limited command-line management and status information can be accomplished via the proc interface, available via /proc/driver/mpi350/SSID and /proc/driver/mpi350/Status.


The T40's bluetooth support is located on a daughter card near the left hinge on the motherboard. The daughter card contains the electronics for the modem as well as the Bluetooth radio. The anntenna for the Bluetooth radio is located on the lower left hand side of the screed.

Logically the Bluetooth device sits on the USB bus, and appears to have been built by Actiontec Electronics. The HCI USB (CONFIG_BLUEZ_HCIUSB) driver has no problem driving the bluetooth radio. You will probably the following kernel configuration options: CONFIG_BLUEZ, CONFIG_BLUEZ_L2CAP, CONFIG_BLUEZ_RFCOMM, CONFIG_BLUEZ_RFCOMM_TTY, CONFIG_BLUEZ_BNEP, CONFIG_BLUEZ_HCIUSB. You will also need the BlueZ user-space Linux Bluetooth protocol stack. If you are using Debian, install the following dpkg's: bluez-utils, bluez-sdl, bluez-pan, bluez-hcidump


I have not been able to make the fast infrared (FIR) support to work. However, the much more straightforward (albeit slower) serial infrared (SIR) works just fine. On Debian, just load the irda-common and irda-tools packages, and then configure the appropriate /dev/ttyS? device.

Spare Parts and Do-It-Yourself Maintenance

One really cool thing about the Thinkpads is that IBM makes the Hardware Maintenance Manuals available. The T40p's is no exception; it can be found here. The manual gives detailed information which are used by service technicians to replace a failed CPU fan, a gunked up keyboard, etc. Of course, these procedures are not designed for customers to do, so if you try taking apart your brand-new toy, and screw it up, you will have undoubtedly voided your warranty. On the other hand, following the procedures really isn't rocket science; it just requires some basic skills dealing with electronics (i.e., use of static straps when necessary, etc.), and basic common sense.

It is possible to order spare parts for the T40p from the IBM web site. So after your thinkpad goes off warranty, you may decide that it's not worthwhile to extend the service contract, but instead rely on "self-service". Even before it goes off warranty, you might find it useful to order one or two extra screw packs, or an extra HDD-cover. (Technically, every time you open up the guts of the Thinkpad, you're supposed to use new screws, since they are covered with a nylon coating to prevent the screws from loosening.) Personally, I've ordered an extra keyboard for $30, so in case my keyboard loses a confrontation with a cup of coffee, I can replace it much more quickly than having to ship it to IBM service and waiting for it to come back --- I depend on my laptop so much I don't want to lose it for a few days, and $30 is pretty cheap as insurance!

Other useful links

Klaus Weidner has many useful tips on his Linux on T40 page.

Fabrice Bellet also has a very good, in-depth page about the T40.

The Linux Thinkpad mailing list has a lot of discussions about the T40 and T40p laptops, and many discoveries about how to make the T40 work better with Linux are first discussed on that mailing list.

Another good web resource is Alexander Wagner's T41 web page.

Theodore Ts'o, last modified 2003-Aug-22