Linux on the IBM ThinkPad R40 laptop

with the Mandrake 9.2 distribution

17 January 2004

NB: this page is outdated: see the page about the Mandriva 2006 installation instead



: works out of the box, without any configuration by hand or extra software installation

: works after some extra software installation
Status with Mandrake Linux 9.2
15" active matrix TFT, SXGA+ (1400 x 1050)
ATI Mobility Radeon 7500 AGP, 32 MB
OK : max. resol. 1400x1050 works fine; 3D acceleration works
Intel 82801DB AC'97 Audio Controller (Analog Devices chip) OK
Hard disk
IDE Hitachi DK23EA-40B, 40 GB OK : full support of DMA
Tracking  devices
IBM UltraNav: trackpoint + touchpad
OK : both touchpad and the trackpoint can be used
Intel PRO/100 VE OK
Audio Modem Riser (AMR) from Agere Systems (operates under the Intel AC'97 audio controller) OK, thanks to the Smart Link driver
Wireless (WiFi)
Intel PRO/Wireless LAN 2100 3B Mini PCI Adapter OK, thanks to ndiswrapper
CardBus controller Texas Instrument PCI-1520 OK
USB 2 ports, Intel 82801DB controller OK
1 port IEEE 1394, Open Host Controller Interface (OHCI) Texas Instrument TSB43AB21 OK ? (not fully tested)
1 port, Intel 82801 DBM LPC Interface Controller not tested
CD writing HL-DT-ST RW/DVD GCC-4240N, CDRW: 24x/10x/24x OK
DVD playing HL-DT-ST RW/DVD GCC-4240N, DVD: 8x OK
Power management

works partially
Control buttons (screen light, sound level)


Installation of the Mandrake 9.2

Immediately after switching on the power, when the screen with the IBM logo appears, press the blue button "Access IBM". In the menu on the left, select "Setup". Insert the CD-ROM 1 of the Mandrake 9.2 in the CD driver and double click on "ATAPI CD-ROM drive". The computer is now booting on the CD-ROM and the Mandrake Linux installation procedure starts.

The Mandrake Linux installation proceeds in a graphic mode and is really straightforward. At the end, a summary appears, in which only the graphical displays appears not to have been configured. Click on the red tag "configure" and select "Flat panel 1400 x 1050" for the monitor and "ATI Radeon" for the graphic card.

Graphics (X-window)

Hardware: 15" active matrix TFT, SXGA+ (1400 x 1050), ATI Mobility Radeon 7500 AGP, 32 MB
Linux software: XFree86 4.3

Works nicely (XFree86 4.3 configured by the install to use the driver radeon, here is the resulting XF86Config-4 file). The display uses the 1400 x 1050 resolution and is very nice on the high qualitify ThinkPad LCD screen.
Moreover 3D acceleration works, as shown by these pieces of the output of glxinfo command:
direct rendering: Yes
OpenGL version string: 1.2 Mesa 4.0.4

As a test, TuxRacer runs very smoothly, as well  as  glxgears.  Another sign of good behavior of 3D acceleration is provided by the impressive increase of performance when activating the "hardware rendering" option in the 3D visualization software OpenDX.


Hardware: SoundMax, Intel 82801DB AC'97 Audio Controller (Analog Devices chip)
Linux software: kernel 2.4.22 module snd-intel8x0 (ALSA sound driver)

Works without any trouble.
The loudspeaker buttons at the upper left of the keyboard can be used to control the sound level.

Hard disk

Hardware: Hitachi DK23EA-40B, 40 GB, IDE
Linux software: kernel 2.4.22

Works without any trouble; the DMA (Direct Memory Access) is used, which increases the speed of disk access to around 20 MB/s. To check wether DMA is on, type the command (being su):
hdparm /dev/hda
The output must contain the line
using_dma    =  1 (on)
To check the access speed, type
hdparm -t /dev/hda
The output is

 Timing buffered disk reads:   72 MB in  3.02 seconds =  23.84 MB/sec

Tracking devices

Hardware: touchpad, trackpoint (IBM UltraNav system)
Linux software: kernel 2.4.22

Works out of the box. Both the touchpad and the trackpoint can be used.


Hardware: Intel 82801BD PRO/100 VE (MOB) Ethernet Controller
Linux software: kernel 2.4.22 module eepro100

Works out of the box.


Hardware: Audio Modem Riser (AMR) system: Agere Systems modem working through the audio card Intel AC'97
Linux software: Smart Link Soft Modem for Linux slmdm 2.7.10; kppp

As for most (all ?) laptops, the internal modem of the ThinkPad R40 is not a real modem, but a "soft modem" (also called a "winmodem"), i.e. a device which depends on software to
perform the functions traditionally handled by modem hardware. For further details, see the Linmodem web page.

In the present case, the required software is provided by Smart Link as a module for the kernel. To install it, one has to downloaded the file slmdm-2.7.10.tar.gz from this link (NB: following Bill Giannikos' advice, one shall not use the slmdm-2.7.14 driver, but the  slmdm-2.7.10 one). It contains the sources for the Smart Link module and not any binary.  So  one  must  compile these sources to get the binary module to be loaded by the kernel. The compilation requires the sources of Linux kernel. These latter are not provided in the 3 CD-ROMs of the Mandrake 9.2 download edition. They can be downloaded from any Mandrake mirror site (package kernel-source-2.4.22-10mdk.i586.rpm), in the directory Mandrake/9.2/i586/Mandrake/RPMS/. The installation is performed by the command

rpm -Uvh

The compilation and installation of the Smart Link soft modem module can then proceed:

cp slmdm-2.7.10.tar.gz /usr/local/src copy the archive to /usr/local/src
cd !$
tar -zxvf slmdm-2.7.10.tar.gz unpack the archive
cd slmdm-2.7.10 enter the newly created directory
emacs amrmo_init.c
edit the file amrmo_init.c and, following the advice of Bill Giannikos, go to line 75 an replace 0x2486 at the end of this line by 0x24C6 (yes it should look like the line below it)
start the compilation of the module
make install-amr
install Smart Link module in the directory /lib/modules/2.4.22-10mdk/misc and modifies the file /etc/modules.conf
modprobe slmodem
load the module in the kernel

Then you can use kppp or DrakConnect to set up you modem connection. Note that in DrakConnect the modem must be declared as "modem" and not as "winmodem". Note also that the ethernet connection must be disabled prior to any modem connection: type the command

ifconfig eth0 down

before launching a modem connection through kppp.
Note that the kernel automatically load the module slmodem if kppp is launching a modem connection. Accordingly the command modprobe slmodem at the end of the above list is not necessary but was issued as a test.

Thanks to the Smart Link driver, the modem works very well !

Wireless (WiFi)

Hardware: Intel PRO/Wireless LAN 2100 3B Mini PCI Adapter
Linux software: NdisWrapper 0.3; wireless-tools 26

Intel says that the linux driver for the PRO/Wireless LAN 2100 card is in preparation.
Hopefully a solution is provided by NdisWrapper project which has devised a kernel module that can load Ndis (Windows network driver API) drivers.
To install NdisWrapper, the following components must be downloaded:
Then follow these steps (see also the README file in ndiswrapper):

1/ Extract the Windows XP driver files and put them in /usr/local/ndiswrapper:
mkdir /usr/local/ndiswrapper

cp V1.2.0.56_LOOG_XP/W70N51.SYS /usr/local/ndiswrapper/w70n51.sys
cp V1.2.0.56_LOOG_XP/W70N51.INF /usr/local/ndiswrapper/w70n51.inf

2/ Compile the NdisWrapper module and loader:
cp ndiswrapper-0.3.tar.gz /usr/local/src
cd !$
tar -zxvf ndiswrapper-0.3.tar.gz
cd ndiswrapper/driver
cp ndiswrapper.o /lib/modules/2.4.22-10mdk/misc
(if the above misc subdirectory does not exist, create it first)
depmod -aq
cd ../utils
cp loaddriver /usr/local/bin

3/ Configure the NdisWrapper loader:
3a/ Find out the vendor ID and device ID of your wireless card:
lspci | grep Wireless
This should produce an output similar to this one:
02:02.0 Network controller: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
       You should note the 02:02.0 at the begining (it might be different on your computer) and type the command
lspci -n | grep 02:02.0
the output of which must look like
02:02.0 Class 0280: 8086:1043 (rev 04)
The two important numbers here are 8086 (vendor ID) and 1043 (device ID).

3b/ Create the script file /usr/local/bin/wifiup:
emacs  /usr/local/bin/wifiup
write the following lines in this file:
modprobe ndiswrapper
/usr/local/bin/loaddriver 8086 1043 \
/usr/local/ndiswrapper/w70n51.sys \
where the numbers 8086 and 1043 must be replaced by respectively the vendor ID and the device ID found in step 3a. Then make this file executable:
chmod +x /usr/local/bin/wifiup

4/ ndiswrapper is then ready; you can launch it with the command
or (if you are not root):
su -c wifiup
There remains to configure the wireless network interface. This is done through the iwconfig command, which is provided by the rpm package wireless-tools which comes along with the Mandrake 9.2 distribution.

An alternative to ndiswrapper might be provided by Linuxant DriverLoader.


Hardware: CardBus controler Texas Instrument PCI-1520
Linux software: kernel 2.4.22 modules yenta_socket, pcmcia_core

Works out of the box. Tested on a MultiTech MultiMobile modem card.


Hardware: Intel 82801BD USB
Linux software: kernel 2.4.22 modules usbcore, usb-uhci

Works out of the box. Tested with a digital camera Canon PowerShot A40: once the camera had been plugged in, a new icon appeared on the desktop: FLPhoto. Clicking on it opened the flPhoto application and selecting Album->Import->Camera resulted in an automatic detection of the Canon PowerShot A40. The photos could be transfered without any trouble.

FireWire (IEEE 1394)

Hardware: Open Host Controller Interface (OHCI) Texas Instrument TSB43AB21
Linux software: kernel 2.4.22 module ohci1394

Seems to work, as shown by the following lines in /var/log/messages:
ohci1394: $Rev$ Ben Collins <>
kernel: PCI: Found IRQ 11 for device 02:07.0
kernel: PCI: Sharing IRQ 11 with 00:1d.0
kernel: PCI: Sharing IRQ 11 with 01:00.0
kernel: ohci1394_0: OHCI-1394 1.1 (PCI): IRQ=[11]  MMIO=[c0206000-c02067ff]  Max Packet=[2048]
rc.sysinit: Remise à zéro du controlleur firewire (ohci1394): succeeded
but I have no device to test it further.

CD writing

Hardware: HL-DT-ST RW/DVD GCC-4240N, CDRW: 24x/10x/24x
Linux software: cdrecord 2.01, k3b 0.9

Works out of the box. In particular, the SCSI emulation is automatically activated by  the Mandrake 9.2  installation. Moreover, k3b (which comes along with KDE 3.1.3) is a very nice tool for burning CDs.

DVD playing

Hardware: HL-DT-ST RW/DVD GCC-4240N, DVD: 8x
Linux software: totem 0.99.4

Works out of the box. totem is a wonderfull application !

Power management

Linux software: apmd 3.1.0

ACPI (Advanced Configuration and Power Interface) does not seem to work.
APM (Advanced Power Management) works.
Battery level indicator in the KDE panel: works.

The following problem appeared in switching the computer off: after a shutdown, the screen automatically switched off but the computer stayed on. One had to press the I/O button for a few seconds to power off the computer.
Following the advice of Ethan Brown and Sebastian Kapfer, the solution is to disable the Local APIC (Advanced Programmable Interrupt Controller). This functionality can be disabled safely since it is essentially usefull for multiprocessor computers. The Local APIC desabling is performed via the kernel option nolapic in the append line in /etc/lilo.conf, so that it becomes:
append="devfs=mount hdc=ide-scsi splash=silent acpi=off apm=on nolapic"
For more details, here is my complete /etc/lilo.conf file.
Note that after having edited the /etc/lilo.conf file, one has to run the command /sbin/lilo to make the change effective and reboot the computer. Then the laptop will be switched off automatically at each shutdown.

Control keys:
Before disabling the Local APIC, the BIOS pre-configured screen blanking after some timeout suffered from the same trouble than the key Fn-F3 switch off: the screen stayed black after the resume. In order to fix this, one has to change the BIOS parameters to disable screen blanking: at power switch on, when the screen with the IBM logo appears, press the "Access IBM" blue key. Then double-click on "Start Setup Utility", select
"Config", and then "Power". Set the various parameters to these values:

Power Mode for AC [Customized]
Power Mode for Battery [Customized]
Processor Speed [Fixed Max]
Suspend timer [Disabled]
LCD off timer [Disabled]
HDD off timer [5 Minutes]
Hibernate by timer [Disable]
Low battery action [Suspend]
Suspend when LCD is closed [No suspend]

Control buttons


The IBM ThinkPad R40 is a very nice laptop for Linux: every piece of hardware is supported, including the modem and the wireless card. Moreover the machine is very quiet and the SXGA+ (1400 x 1050) LCD screen is of very good quality. Regarding the Linux distribution, it has been found that the Mandrake 9.2 automatically recognized and configured all hardware during the install (except for the wireless card and the modem which must have been set up by manually installing ndiswrapper and the Smart Link driver), leaving the user with an immediately functional laptop.

Usefull links

I have benefited from these previous Linux on ThinkPad R40 pages:
Other links:

Eric Gourgoulhon <>, LUTH, CNRS, Observatoire de Paris, 92195 Meudon, France.
Last modified on 19 January 2004.