Linux (RedHat 9) on the IBM ThinkPad R40
April 28, 2003; Updated: January 16, 2004
April 28, 2003
This document summarizes my experience (so far) of installing RedHat Linux 9 on an IBM Thinkpad R40 Laptop.
Summary
Subsystem
Information
Disk. IDE/(UDMA)
Needs Kernel patch for DMA. Update: updated kernel 2.4.20-27-7 solves the problem. Download it from www.redhat.com/updates
Audio
OK
Suspend/Resume
Does not work properly. Resuming from suspend is sometimes unstable.
Xserver
OK. The LCD can be configured at 1400x1050. There is a problem when turning LCD off
Update: New Radeon Modules allow to switch LCD Off.
Firewire
OK. Modules load well. Tester with a Sony MiniDV Video Camera. It works.
Ethernet
OK
Modem
Winmodem. Not working with RH9 software. Update: Working with slmodem drivers. It works with a recent version of slmodem . Download the one I used (slmodem-2.9.2.tar.gz)
USB
OK. Mouse and Flash disk tested. USB2.0 devices not tested
PCMCIA
OK. PCMCIA modem tested and working with default RH9 kernel. After patching the kernel, PCMCIA modules are not loaded properly, due to a bug in /etc/init.d/pcmcia script.
Machine description
The IBM ThinkPad R40 has these main components
The machine came with Professional Windows XP preinstalled, with all devices preconfigured, and a copy of the Windows XP CD on the hard disk.
- CPU: Intel Pentium IV Mobile at 1.9 Ghz.
- 256 Mb RAM
- 40Gb Hitachi ATA100 udma5 disk
- 1400x1050 active-TFT panel
- ATI Radeon Mobility 7500, 32 MB memory
- Combo CDRW -DVDROM drive
- PCMCIA slot (1x)
- mini-pci slot (1x)
- ieee1394a (firewire) port (1x)
- USB 2.0 ports (2x)
- Parallel, vga connectors
- winmodem
- 10/100 ethernet
- AC'97 soundcard
- S-video out
- mic in, stereo headphones out
The disk contains a hidden partition containing an image of the hard disk as shipped from factory. This is the reason why you can only see 35 Gb of disk capacity from windows.
Linux Preinstalation
Before installing Linux you must obtain room on the disk. At this point you have two options:
- Completely remove Windows XP and its backup partition: In this case, when booting you must press the Acess IBM key to acess the Predesktop Area. Then go to the BIOS section where you can go to the Security Menu. Once there disable the rescue partition. Then start normal RH9 installation.
- Keep Windows XP and its backup partition. In this case you will need to repartition the Windows partition. I have used Partition Magic leaving a total of 10 Gb for Windows XP and 25 Gb for Linux.
RedHat 9 Installation
Once that you have made room in the disk you simply have to boot from the first RH9 CD.
I have made the following partitions:
The graphical installation works well. I have done it using a USB external mouse, which was recognized. Once the install gets going, the first thing you notice is how slow it is. The explanation comes in a minute.
- boot: 100 Mb
- swap: 512 Mb
- / : 7Gb
- /home: 18 Gb
Remember to install kernel-sources. You will need this package in a minute!!
I chose grub as the boot loader.
When the installation finishes X are working fine and you will discover a very quiet machine. The CPU fan is very quiet and is on only from time to time.
Hard Disk - IDE
Update: updated kernel 2.4.20-27-7 solves the problem which is described below. Download it from www.redhat.com/updates
The first thing that can be noticed when you intall RH9 from the CDs is how slow the hard disk is. The explanation is that DMA is not on. This can be seen by typing
# /sbin/hdparm /dev/hda
The performance obtained at this condition can be seen using
# /sbin/hdparm -t /dev/hda
which in my case was about 2.5 MB/s. To solve this problem Ia have followed the indications of Graeme Widford for the same chipset on a Dell Inspiron 8500. You will have to patch the kernel and recompile it. Here is how I did it.
The following information assumes knowledge of how to patch, configure, compile and boot a new Linux kernel. See the Linux Kernel HOWTO for help. You may find precompiled kernels/modules here in the future but for now it's just patches and advice.
- obtain clean 2.4.20-8 kernel sources and cd to /usr/src/linux-2.4.
- Get the kernel patch
- cat ICH4M.diff | patch -p1
- make clean
- copy ./configs/kernel-2.4.20-i686.config to .config
- make oldconfig
- make dep
- make modules
- make modules_install
- make install
Once you've booted the custom kernel, I can see about 24 MB/s (hdparm -t /dev/hda).
The kernel source directory after patching and compilation can be obtained here.
You can also get the result of my compilation. To install it:
- cd /
- tar xvzf kernel-2.4.20-8custom.tar.gz
- Then, update the /boot/grub/grub.conf file to add a new entry for the new kernel. Here is how I did it:
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8custom)
root (hd0,1)
kernel /vmlinuz-2.4.20-8custom ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8custom.img
title Red Hat Linux (2.4.20-8)
root (hd0,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
title WinXP
rootnoverify (hd0,0)
chainloader +1
TouchPad
After the installation only the external USB mouse was working. By adding a few lines to XF86Config, you can manage to have both mice working, the external USB and the touchpad. My modified XF86Config is here. Please pay attention only to server layout and the mouse sections for this purpose.
LCD off
There is a problem when turning off the LCD. The LCD may switched off by:
In any case if you are in graphics mode (1400x1050) you will be unable to switch LCD on again. To solve this problem, you must.
- The BIOS after a certain timeout.
- The screen saver, if you choose "blank screen" as screen saver.
- Manually, by pressing Fn+F3.
If you want to manually switch LCD off, you still can do it:
- Disable screen blanking in BIOS.
- Choose a different screen saver, or disable screen saver.
- Change to a text console (i.e. CTRL-ALT-F5)
- Then press Fn+F3. The screen will be blankerd.
- To resume, press any key.
radeon-20031118-linux.i386.tar.bz2.
Execute (as root) install.shThe last step is to add a symbolic link libexpat.so.1
in /usr/lib that points to the installed libexpat.so.0.4.0.
cd /usr/lib
ln -s libexpat.so.0.4.0 libexpat.so.1
PCMCIA
With the patched kernel, you will need to apply this patch due to Graeme Wilford to /etc/init.d/pcmcia.
My patched file is this one.
Antonio Albiol. Universidad Politecnica de Valencia, Spain