Thinkpad R40e and Debian GNU/Linux

This page is was written in 2004 and much of it is now out of date. With Kubuntu ethernet works out the box, hiberation does too as does cpufreq. KMilo works for the buttons but you need to set up nvram, I'll try and fix that in Kubuntu Edgy.

I bought an IBM Thinkpad R40e in February 2004 after my R31 was quite impolitely stolen. It is a very cheap machine (<£600) and lacks several features that the R31 had.

What's changed

Installing Debian GNU/Linux using Knoppix

The ATI chipset (so Alan says) doesn't like talking to Linux <= 2.4.18 but newer 2.4 and Linux 2.2 and 2.6 should work. So for installing Debian the normal way you need Debian 2.4. Debian testing (sarge) with debain-installer seemed to freeze, not sure if this is due to the Linux version. So I just used Knoppix which works perfectly.

Thinkpads have the daft habit of not coming with Windows recovery CDs but instead taking up a 3Gig hard disk partition that you can't normally access. To get rid of this go into the fancy graphical "BIOS" by pressing Access IBM on startup then Setup Utility --> Security --> IBM Predesktop Area and set it to Disabled. You can order recovery CDs at no cost from your local IBM hardware support department. In the UK that number is 08705-500900. (Apparantly this is not the case in all countries.)

This gets rid of the fancy graphical "BIOS" utility as well as letting you access the extra 3Gigs with your favourite partitioning tool.

The ACPI power management junk gets confused with some versions of Knoppix. User the noacpi option when booting knoppix.

Run knoppix-install from the command line with knoppix to partition and install. On my 30Gig hard disk I gave 512Megs to swap, 4Gigs to /, 4 Gigs to /home and the rest to /data which contains my music, backups, videos etc and isn't mounted by default on startup (it would be a long fsck).

I also made a 512Meg partition which may get used for hibernation if I ever investigate that.

You can resize the NTFS partition with ntfsresize which is on the knoppix CD if you really want to keep your XP install. (Apparantly this will only resize it to 17GB, Windows defragger will not move data below this point.)


The biggest problem with installation is the Broadcom 5700 ethernet controller. Broadcom have been good people and made Free Software (GPL) drivers for this but they arn't part of the main Linux trees for some reason so you have to download them from Broadcoms site or from Debian packages burn to CD, copy them to your R40e and compile. I had no problems compiling them with the headers Knoppix has in /usr/src/linux.

Once compiled rmmod tg3 which Knoppix wrongly installs for you insmod bcm5700 then ifconfig eth0 up. Remove tg3 rmmod tg3 and add bcm5700 to /etc/modules.

Now you can install all the important software like KDE CVS packages or multimedia packages [deb unstable main].

Also try tpb to get the volume buttons working, or my port of tpb to KDE KMilo thinkpad plugin currently in KDE CVS. These require nvram Linux modules and /dev/nvram (10,144 major,minor numbers; Debian tpb package makes /dev/nvram for you).


There is a non-free driver available from Agere via IBM.

I've had problems downloading the sources so here they are however they didn't compile for me using 2.4.24 without modifying some stuff and then they just segfaulted when I ran insmod.

Other issues

Hard disk seems slow. Maybe it's just my imagination. The hard disk is too quiet, I like to be able to hear when it's doing something damnit.

3 button mouse is nice, keyboard feels nice and doesn't have nearly useless Windows keys. However the Escape key is too far away to comfortably reach so should be swapped with the ` key.

xmodmap -e 'keycode 9 = grave notsign'
xmodmap -e 'keycode 49 = Escape'

Add that to a script and make it start on boot (after xdm/kdm) or through ~/.kde/Autostart (add a link to application through konqueror).

The "Back" and "Forwards" buttons above the Left and Right arrows are mostly useless, on my keyboard xev doesn't pick them up with KeyCodes (I have an 2684-HVG) my 2684-QVG owning friend says they do have KeyCodes for him so can be remapped.

xmodmap -e 'keycode 234 = Left'
xmodmap -e 'keycode 233 = Right'

The Fn key is where you would expect the Control key to be, best thing to do it make the Caps Lock function as a Control key (once you get used to it you'll never go back).

Section "InputDevice"
        Identifier  "Keyboard0"
        Option          "XkbOptions"    "ctrl:nocaps"

The volume keys work find but pressing Fn and any other function key stops the keyboard responding (including the useful Brightness keys). You can fix this by pressing Fn-Shift which lets the keyboard work again. Quite random.

Sounds crackles when hard disk usage stops it reading enough in time. This could be the fault of kde/artsd but it just caused silence on my old machine.

Cisco Aironet 350 wifi PCMCIA card works fine (mostly). hotplug picks it up and inserts the right Linux modules. kismet talks to it with source=cisco_cvs,eth1:wifi0,ciscocvs *or for newer versions of kismet source=cisco_wifix,eth1:wifi0,ciscosource) in kismet.conf.

Daf has Linux 2.6 Debian packages for R40e including the Broadcom ethernet driver. Have to play around a bit to get the right modules. ACPI seems to work except it hangs on cpu ACPI and I couldn't get the Linux console to show anything. ACPI power management stuff stops the volume keys working.

You can get support from IBM through filling in the support request form on their website. Answers take three or four days but they can usually answer any technical question.

To investigate:

Please contact me with comments.


ACPI instead of APM is a disapointment, most other things can be worked around. Good value for money but you may do better buying an R31 or T20/21/22 or similar from ebay for about 400UKP.