RedHat Linux on an IBM Thinkpad T20

Preface

I am currently using RedHat 7.1 (as an upgrade from RedHat 7.0) so this document will be very RedHat specific. If you want would like me to include more information about other distributions of Linux, please email me at mark@grennan.com.

Thanks to those that came before for the start of this document and Nathan my son who has become a better Linux technician thin me. (He did most of the work.)



The Notebook

  • Processor: Mobile Pentium III with SpeedStep Technology 700 MHz
  • Memory: 128 MB (I upgraded to 512 MB)
  • Video: S3 Savage IX8 8 MB Ram
  • Disk: 12 GB
  • CD-ROM: DVD 2x - 6x
  • LCD: 14.1" 1024x768 TFT - active matrix
  • Sound: Crystal Semiconductor CS4624/CS4297a (aka Crystal SoundFusion PCI Audio)
  • Modem: Lucent Technology V.90 WinModem
  • Network: Integrated 10/100MBit (Intel PRO/100+ MiniPCI)
  • Misc.: Floppy, serial, parallel, PCMCIA, USB, IR, S-video, UltraPort (The thing on top of the LCD)
Thinkpad T20

The notebook comes pre installed with DOS and Microsoft Windows 2000. Because I wish to run only the best software available, at all times, I erased all that stuff and installed RedHat 7.0. I latter upgraded to RedHat 7.1.

Some of my friends (and my wife) use other operating systems. I like to help them with their problems so I also installed VMWare.

I have also created to kernels to boot into 2.2.16 (the one that comes with the distribution) and 2.4.0. I have upgraded to 2.4.3.

Primary Installation

Booting from floppy is not a choice. The floppy driver and CD-ROM drive share the same "hot swap" (Ultra Bay) port.

To get around this problem you need to change the boot order in the BIOS to boot from CD-ROM. You can then boot the CD and use the graphical installation.

NOTE: When I upgraded from 7.0 to 7.1 I found the DVD drive would not read the CDRW disk I was using. I have since found other people who have had this problem with the RedHat 7.1 image. To get around this, I copied the to ISO files to the root directory of my drive. I could then boot the CD and tell it the images where on the hard drive.

Create partitions as you wish. Creating a small 'boot' partition for the kernels to reside in is not nessary. The LILO that come with the system can read kernels past 1024 tracks.

Pay Attention to the X configuration.

Network card (mini-pci-card)

Like any real internet admin., making the net-work is priority one. Luckily, the integrated network card is detected (eepro100) and works at 10 and 100 MBit. All you need is to configure your network IPs at installation time. :-)

Fred Maciel has more information on his web page about problems with 3COM mini-pci cards.

Peripheral Management

A lot of common peripherals (cdrom, floppy, extra battary) are hot-swappable on the T20. This is nice (not as nice as pcmcia). It requires extra setup to make everything work.

First you need to tell Linux to not check for a drive in the UltraBay. Your laptop will boot faster this way if you have a UltraBay battery or another non-drive bay. You do this by adding append="hdc=cdrom hdc=noprobe" to boot parameter in /etc/lilo.conf.

You can warm swap your drives by going into suspend mode first. First un-mounting any disk you are currently using and then pressing Fn-F4 and wait. After the system is fully suspended, swap your devices. When the swap is complete, tap the Fn key to un-suppend.

To hot swap a drive you can use hdparm (this comes with RedHat) to register and un-register the IDE interface and swap drives (cdrom / floppy) in the bay. (I HAVE NOT GOT THIS WORKING YET!) There is a script call ultrabayd. I havn't got it to work either.

Another program you will want to get is tpctl (ThinkPad Control). This suite of programs allows you to enable and disable things like your infrared port. Version 1.x is required for kernel 2.2.x and version 2.x is required for kernel 2.4.x. After you download it follow the instructions in the README to compile and install it. On the T20, not all the commands work. For example, you can do a tpctl --all to display all the settings, but you can do a tpctl --pm-all to display all the power management settings. Or tpctl --Z will suspend (like closing the lid or Fn-F4) through program control.

Power Management

Several laptop HOWTOs tell you to turn off power management. DON'T

Most things seem to work fine. You need to be aware of how your programs will react to suspending. Some programs don't respond will to loosing a resource. For example, if you unplug the network cable and then plug it back into another network don't expect it to work. If you are using DHCP it might not work even if you plug it back into the same network. Someone may have obtained your IP number while you where gon.

This is also true of some network file systems. You should unmount them before the suspend.

All this can be solved by restarting the network after resumes.

I found the /etc/sysconfig/apmd script didn't do much for these problems. I fixed this by adding a /etc/sysconfig/apm-scripts/apmcontinue file.

#!/bin/sh -x
#
if [ $1 = 'suspend' ]; then
/sbin/rmmod cs46xx ac97_codec
/etc/rc.d/init.d/network stop
for M in `mount | grep smbfs | cut -f 3 -d \ ` ;
do
umount $M
done
fi
if [ $1 = 'resume' ]; then
/etc/rc.d/init.d/network start
fi
XFree86 version 4 seems to go through the suspend just fine.

Both suspend to RAM (Fn+F4) and suspend to disk (Fn+F12) will work if you create a hibernation file in a FAT32 partition.

To be able to stop the hard disk for some time to save power, you might want to use the noflusd.

X Window System XFree86 4.0

I didn't even attempt XFree86 3.x. I jumped straight into version 4.0. I haven't found any problems with it.

Tim Roberts is also working on a driver for XFree86 4.0. Thanks Tim. The newest versions (1.1.8a at this writing) work find. Older version don't work as well.

I was forced to use the SVGATextMode program to manage text mode display until I installed XFree86 4.0.2 Savage driver 1.1.8a. It fixed a problem with framebuffers (see below) that left the screen in graphics mode when you changed back to text mode. It also fixed some problems with DVD support,

Installation of the XFree86 4.0 Savage driver (as user root ):

  1. tar -xzvf xf40sav.tgz
  2. cp savage_drv.o /usr/X11R6/lib/modules/drivers/savage_drv.o
  3. cp libpcidata.a libscanpci.a /usr/X11R6/lib/modules/
  4. cp savage.4 /usr/X11R6/man/man4/savage.4
  5. make sure that /etc/X11/X points to /usr/X11R6/bin/XFree86 .
  6. run X -configure to create a new config file.
  7. test the new configuration with X -xf86config /root/XF86Config.new .
  8. install the new configuration: cp /root/XF86Config.new /etc/X11/XF86Config-4 .
Here is a copy of the (/etc/X11/XF86Config-4 ) file I'm using.

Text Mode

After installation you are left with a tiny little 80x25 screen. It just doesn't look right. You can change the text mode using the SVGATextMode. This program has a configuration file in /etc/TextMode. You will want to comment out all but:

DefaultMode "100x37_VGA"
Text ModeChipSet "S3"
Clocks 25.175 28.322 40.00 0.00 50.00 77.00 36.00 44.90
Clocks 130.00 120.00 80.00 31.50 110.00 65.00 75.00 94.50

These settings will give you a good looking character set and enough display to edit files easily.

To have your display change to this mode at boot time I put the command 'SVGATextMode >/dev/null 2>&1' just after the PATH is set in /etc/rc.sysinit.

NOTE: If you pick the wrong text mode and go into X, you may not be able to return to text mode. I found almost all except 100x37_VGA would cause the system to HANG!

Framebuffer Display

Even better then using text mode is Framebuffers. With this your system starts with good looking text and a graphics of Tux.

To turn on Framebuffer mode add vga=0x317 to your lilo.conf and re-lilo your system.

Like VGA text mode, this to can hang your system when you move from X to text mode. Framebuffers didn't work at all until I got the 1.1.8a display driver. (See above)

Sound card

The ALSA project has a driver for the cs461x chips which also supports the cs4624. With the power management script I haven't had any trouble with sound. The modules are automatically loaded when needed. This is why there is no insmod in the resume section of the script above.

As Mandrake GNU/Linux comes with the ALSA sound drivers, it detects a sound card and loads the cs461x driver. You should add the following lines into your /etc/modules.conf:

alias snd-card-0 cs461xx
options cs46xx thinkpad=1
Don't forget to check the mixer settings using aumix and the sound keys on the keyboard. Both of these effect the volume. I turn up the Volume and PCM levels to 75% and then use the keybord keys to control my volume.

DVD

The Open Media System (OMS ) DVD Player is the first place to start. I started with the OMS-HOWTO. This document is very complete and explains everything you need to know.

OMS is the program used to read and play your DVD. I'm using version 0.11.0 of OMS. You will also want to get a copy of GTK Open Media Interface (OMI). This is the user interface for OMS. I am using version 0.0.9d_dent.

After completing the compilation and installation, OMS will save it's configuration in your home directory in the .oms directory. If found if the audio plugin is not sys the sound didn't work.

I also found the frame rate was bad. I only get about eight frames per second. If I turn sound off (change it to null in the configuration file) I get a much better frame rate. About 37 frames per second.

Here is my .oms file

plugin_dir=/usr/local/lib/oms/plugins|
devices=dvd:/dev/dvd
skin=some
output_audio_device=/dev/dsp
output_audio_plugin=sys
output_video_device=/dev/null
output_video_plugin=x11
xpos=100
ypos=100

Modem (sort of)

This one is not a big deal to me. If I don't have a T1 to the Internet I'm hiking in the woods.

I found the ltmodem-5.78d worked great. I found this through the Linmodem-Mini-HOWTO (thanks to Martin Elsman). After download the driver, untaring it in the /usr/src directory I was able to run make and ltinst to install it. Then a simple insmod ltmodem loaded the driver.

SpeedStep

SpeedStep should be supported since kernel 2.2.15pre19.

I had some very strange problems with kernel 2.2.16 after changing the processor speed from low to high if Linux was booted in low speed mode. Rebooting solved this problem. This might be a problem with SpeedStep, but it might also be another problem, I don't know.

Another strange thing: When running at low speed, the processor should run with about 500MHz (?). But Linux then detects an 125MHz processor...

IrDa

I didn't test IrDA yet, but maybe the Linux on a Thinkpad 600X (2645-5EU) page can help. There is also yet another Linux on a Thinkpad T20 page which has some information about this topic.

USB

I haven't started on USB yet. It is coming. I'll be describing how I connect my IBM USB camera. Maybe even some network conferencing.

S-Video

This is another section I havn't started on. You should be able to capiture video through the S-Video port.

Kernel 2.4.x

I started with the standard 2.2.16-22 kernel that comes with RedHat 7.0. It worked fine.

However, As of this writing 2.4.2 is out and seems to be very stable.    RedHat 7.1 has been developed as a intermediate step between the  2.2.x and 2.4.x kernels so it works well with both.

I dual kernel my systems. Meaning, in lilo I set up two boot kernels. One is the "Stable" kernel and the other is my experimental kernel. I make the stable kernel (2.2.x) my default kernel. If a kernel compile goes wrong I can reboot with a known good kernel.

Here is my /etc/lilo.conf

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
default=linux
lba32
vga=0x317
append="hdc=cdrom hdc=noprobe"
image=/boot/vmlinuz-2.2.16-22
label=linux
read-only
root=/dev/hda2

image=/boot/vmlinuz-2.4.0
label=linuxdev
read-only
root=/dev/hda2
The compile of 2.4 was stright forward. Here is a copy of my .config in my /usr/src/linux directory. You should be able to download the 2.4.0 kernel, drop this file into the /usr/src/linux directory. You can then compile the kernel without having to go through the configuration menus. Just do the usual make dep clean vmlinux modules modules_install.

More Information

There are several other good sites where you can find more information:

Comments

Please send any and all comment/corrections/additions etc... to mark@grennan.com.

Revision History