Linux on the IBM Thinkpad T22
NOTE: This page is no longer being maintained. I have since upgraded to a newer Thinkpad and no longer have this machine. This page is being left up in the hopes that someone will find it useful, but I can no longer try things out or answer questions about this machine.
This document details installing and configuring Mandrake Linux 9.2 on my IBM Thinkpad T22. This laptop has excellent Linux compatibility; most everything works or can be made to work. This is somewhat disappointing, as it simplifies what would be a week-long adventure full of blood, sweat, and tears into a relatively uneventful hour or two.
This document is updated to reflect my current installation. Notes pertaining to older versions may still retain some historical or troubleshooting interest for other users. See the section on earlier versions at the end.
This is an IBM Thinkpad T22, model 2647-9EU. The base configuration is:
- Mobile Pentium III w/SpeedStep, 1GHz (NOT P3-M)
- 128MB PC100 CAS3 SDRAM (144-pin SO-DIMM) standard, 512MB max
- S3 SuperSavage IX-MV, 8MB video RAM
- Cirrus Logic CS46xx-series sound chip
- Intel 82557 (EthernetExpress Pro/100) 10/100 ethernet
- Lucent Microelectronics 56K winmodem
- 14.1" TFT at 1400x1050 resolution, true color
- 8x DVD in drive bay
- about 5.3 pounds
This is the top-end, fully loaded, "kitchen-sink" configuration of the T22 that was worth over $3,500 before the even more loaded and faster T23 and T30 came along. I was fortunate enough to be working at IBM when I got this, and the steep discount enabled me to buy it at a price normally associated with el-cheapo entry-level laptops. IBM used to do Caldera Linux preloads (with working DVD!) on other models in the T22 line, but stopped because nobody bought them.
The entire procedure was:
- Insert CD, reboot machine
- You are using whatever keyboard and a 3-button PS/2 mouse
- Pick your packages
- If you have the 1400x1050 screen, tell it you have a generic VESA device for your graphics. If you have the 1024x768 screen, leave it as the (autodetected) S3 Savage.
- Set up networking, if you like - the eepro100 is detected correctly
- Sound will magically be available upon reboot - cs42xx is detected correctly and loaded at boot.
This is significantly easier than any attempt to get Windows installed, especially with regards to automatic device detection and configuration. Funny how the world works.
They broke something in XFree86 4.3, and the savage driver shipped with it doesn't really work anymore. There are two easy solutions to this problem:
First, you can specify the VESA driver at install time and run at 16bpp. Things will just work. For some reason, 24bpp didn't work on the first try, and I have not bothered to investigate it further.
The second and far superior solution is to download Tim Roberts' Savage
driver (this will replace your existing
savage_drv.o). This runs at 1400x1050x24bpp just fine,
with full XVideo support.
There is no 3D acceleration or DRI support, nor is it likely that there ever will be. You will not be playing fancy games on this machine. Not that you could play fancy games with the S3 Savage on Windows, either. The 2D performance with Tim's driver is generally pretty zippy. fast.
You can enable simultaneous LCD/VGA/TV-out with Tim Roberts' s3switch utility, available on his S3 Savage on XFree86 page. This works great, but bear in mind that televisions like 640x480 resolution, and many external monitors and projectors don't like 1400x1050. Start up your X server accordingly. If you prefer to click your way through things, you can try the KS3Switch (dead link to http://code.bochatay.net/ks3switch/) graphical front-end for KDE.
If you are using KS3Switch 0.1, there's a tiny thing that prevents it
from compiling on a stock Mandrake 9.2 installation. Do the usual
make, and when that fails,
change the file
after the line that says
public: add a line
make again and proceed as normal.
The console screen can be garbled upon exiting X. There are two solutions to this problem:
- Disable the HV expansion option in the BIOS. This is easiest, but leaves you with a small-looking console
- Make your textmode console use the VESA framebuffer. Add "vga=768" to your lilo.conf. This is a slower textmode console, but fills the screen. You can play with other settings (like "vga=832") to get something other than 80x25.
I have found that the keyboard screen output toggle (Fn-F7) is not reliable and may garble the LCD display on occasion. This leaves you with an unresponsive console. Use the s3switch utility instead, which merely screws up the textmode console occasionally (it's still usable, but it definitely looks strange). If you spend your life inside X, this is not a major concern.
Mouse and Keyboard
If you didn't tell it otherwise, Mandrake sets you up with
Emulate3Buttons in XFree86. However, you have a real honest-to-God 3
button mouse, so in order to get it working properly, you should remove
any lines that refer to Emulate3Buttons in
The keyboard type also defaults to
en_US. This has the
unfortunate side effect of disabling the right Alt and Ctrl buttons.
To fix it, change your keyboard type to
us or just remove
that line entirely.
The "scroll button" is actually the Middle Mouse Button. Yes, this laptop has a genuine 3-button mouse, which is fantastic for Unix users. Under Windows, pressing this button and moving the Trackpoint stick scrolls the window. I've always found that to be an exceedingly awkward arrangement, but if you wish to have this behavior, modify your XF86Config-4 to include:
Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Device" "/dev/psaux" Option "Protocol" "PS/2" Option "EmulateWheel" "true" Option "EmulateWheelButton" "2" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection
This makes the button specified in EmulateWheelButton (button 2 is middle) perform scrolling. You can simulate a middle-click by pressing both the right and left mouse buttons (the Emulate3Buttons option). You need XFree86 4.2 or higher.
Some of the NumLock buttons work if you activate it with Shift-ScrLk, but the NumLock light does not come on. The numbers seem to do the corresponding arrows and other functions, and the operators seem to work. I'd still suggest avoiding it, as without the NumLock light it can get confusing.
The built-in ethernet works with the eepro100 kernel module.
The Mandrake 9.2 PowerPack comes with the LT Winmodem drivers (modules
lt_serial), and you have your
/dev/modem. It can dial the phone, but I
haven't tested it further as I don't use dialup. If you don't have
the PowerPack version, you can download the ltmodem driver (dead link to
http://www.heby.de/ltmodem) and build it
Sound automagically works. The module you're looking for is cs46xx, but the installer sets up and configures it correctly. You should check the sound volume in aumix, as it defaults to zero.
Sound seems to survive a suspend/resume cycle.
Works automagically after installation. Tested with an IBM Token-Ring card and a Netgear MA401 wireless card, both of which are supported out of the box automatically. You may want to use less aggressive firewall rules if you have problems with wireless; the default high security rules cause mysterious problems at the University of Texas.
Current builds of xine, mplayer, etc, will play unencrypted DVDs just fine. However, because the MPAA sucks, you will not be able to watch movies "out of the box." You will need to find a plugin for CSS descrambling to play DVD movies.
Since people have been sued for providing or linking to DeCSS code, I'm not going to do that. Instead, I refer you to the omniscient google to search for the appropriate plugins. Viva la Penguinistas!. Look for libdvdcss2; everything else is on the install CDs.
Installation is straightforward, and you can watch movies. You can even skip over the annoying intro junk and previews and FBI warning (which everyone knows and has seen hundreds of times). This lets you enjoy the movies you legally purchased that the MPAA doesn't think you have the right to watch.
For the most part, everything works. Suspend to RAM works. Battery status works. I have not attempted to hibernate the system as I don't find hibernation useful (the battery can keep the system suspended for several days), but it probably involves creating a hibernation file and some messiness. I am told that other people have gotten it to work on other T-series Thinkpads. Andrew Tridgell's tphdisk supposedly does hibernation, but I have not tried it.
I noticed that the kernel now has SpeedStep support and
/proc/cpufreq appears. I'll need to experiment with
XFree did not always come out of suspend correctly (maybe one time in
ten). This will leave a garbled screen and an unresponsive keyboard
and mouse. The machine is still running, but since the network
interface is taken down during suspend... This problem is easily
resolved by switching to a virtual console before suspending the
machine. You might be able to automate this process by doing
kill -STOP and
kill -CONT on X in the
appropriate scripts, but I haven't bothered. I should add that
current versions of XFree can automatically switch to a VT on a
suspend request (it certainly switches back on resume), so this is
probably not an issue anymore and I'm just being superstitious.
An undocumented limitation in the T22 is that the processor will only run at full speed if the battery is present (or so I'm told by some guys at IBM). This is independent of the operating system. I am not sure what happens if you boot the machine at 1GHz and then remove the battery while plugged into AC...
Battery life at 1GHz with screen at full brightness is slightly over 2 hours. Battery life at 700MHz with screen at minimum brightness is about 3 hours. Doing things like constant kernel compiles and watching DVDs will lower this figure significantly. Also, if the ambient temperature is low enough that the system fan does not need to run, your battery life will be longer. The system fan is controlled entirely by the BIOS.
Hot-swap in the removable drive bay is rather ill-advised. Warm-swap (swap while system is suspended) is fine. Be careful that you aren't doing something stupid, like attempting to warm-swap the DVD while you're watching a movie. Your computer will protest vigorously when the device suddenly vanishes.
Regardless of the device you normally use, you should boot the machine with the DVD if you intend to use it. This is so that the DVD is registered with the IDE bus and is available. In principle, you could do this on the fly by using hdparm to unregister and reregister the interface while the machine is running, but that requires more cojones than I have. You can remove the DVD after booting and all will be fine (as long as you don't attempt to access it while it is removed).
Parallel, Serial, IrDA
As I have nothing worthwhile to plug into any of these ports, I haven't tested it. But as Linux sees all the devices, I have no reason to believe they won't work.
USB works. Which specific devices work depend on whether the device is supported or not. Most devices, such as hubs, drives, media card readers, mice, and so on have at least baseline functionality. Many digital cameras are supported (including my Canon Powershot S400), and for virtually all recent unsupported cameras, you can just copy your pictures directly off the memory card with a card reader.
For what it's worth, my USB hub works fine, as well as my CompactFlash reader and digital camera (Canon PowerShot S400)
If you wish to use an external USB floppy as your primary floppy drive, you should make the following changes:
- Make sure
- Remove the existing line in
/mnt/floppyand replace it with
none /mnt/floppy supermount dev=/dev/sda,fs=auto,--,iocharset=iso8859-1,sync
You can mount and unmount now with
mount /mnt/floppy and
umount /mnt/floppy, respectively. The floppy icon will
automagically appear on your Gnome or KDE desktop as well. Oddly
enough it doesn't automatically mount like it used to with supermount,
but since I never actually use floppies I haven't bothered to
investigate it further.
If all you want is to use the floppy, though, you only need to modprobe scsi_mod and usb-storage. The floppy will show up as the first SCSI device /dev/sda, assuming you have no other USB storage devices plugged in. You can then mount it wherever is most convenient for you.
Note that Linux treats a USB floppy as a generic USB Mass Storage device, and some things like low-level formatting won't work.
There is nothing special about the IBM branded USB floppy; it's a rebranded Teac drive that is more color-coordinated with the Thinkpad and twice as expensive.
Special Buttons and Gadgets
There are four special buttons at the top of the keyboard: VolUp, VolDown, Mute, and ThinkPad. The sound buttons appear to be hardware controls and work with no special intervention from the OS.
The ThinkPad button, which launches some big config tool plus online help thingy in Windows, is not a normal key - it generates no scancode or key event. It appears to fiddle with something in nvram, so you will need /dev/nvram support in your kernel (you may have to load the nvram module and make the device node - the tpb package has instructions for doing this).
Download Markus Braun's tpb program to enable the use of the ThinkPad button. This will allow you to execute an arbitrary command upon button press, and to enable on-screen display for the volume, mute, and screen brightness buttons. You need to get xosd from Mandrake contribs to enable on-screen display. Follow the excellent instructions in his README to install.
The ThinkLight, which is a keyboard light mounted on the screen, works automagically with Fn-PgUp. The screen brightness controls (Fn-Home, Fn-End) are hardware controls and just work.
You may also want to get the Thinkpad Configuration Tools for Linux. These provide most of the functionality of the DOS-based PS2.EXE configuration tool, which let you change things like power and BIOS settings on the fly. You can use it to toggle the suspend behavior on lid-close, for example, without rebooting. They recently added a GTK2 GUI config tool, if the command line or ncurses interface scares you.
The tpctl package consists of a kernel driver and a config tool. Mandrake 9.2 includes the kernel driver already.
I'm extremely pleased with the physical characteristics of the machine. The construction appears very solid, the keyboard has excellent tactile feel and travel, and the mouse buttons can be felt easily and have excellent tactile response on click (something other manufacturers should strive to copy - most laptop mouse buttons are completely flat and have nearly no tactile feedback on click).
There is no Windows key (gives me a larger Ctrl and Alt), and we have a genuine 3-button mouse, both of which I consider to be features.
I always quibble about weight, but you're not going to find a laptop of this era with an internal optical drive that's lighter than this with a 14.1" screen. The S3 SuperSavage is also a rather underpowered video card on any OS, but that doesn't matter much if you don't intend to play games on the machine anyway.
In terms of usability and Linux compatibility, the T22 is excellent, and I can strongly recommend any current IBM Thinkpad (especially the T series) for anyone seeking a high-end Linux laptop. IBM is pretty much the last major brand name that still bothers to include both APM and ACPI support in the BIOS (and hence the only major brand that supports suspend-to-RAM in Linux), and they produce some of the most Linux-friendly machines.
They broke something in XFree86 4.3, and the savage driver doesn't work on my hardware at resolutions above 1024x768. Since I'm rather fond of my 1400x1050 screen, this is unacceptable. Fortunately, the vesa driver (vesa_drv.o) works flawlessly, and if you intend to run at this high resolution, you should select this driver instead of the autodetected Savage driver. You do lose some hardware accelerated stuff, but the graphics chip is sufficiently crummy that you're not losing much in practice. I haven't noticed any difference. Note that XVideo doesn't work reliably in the VESA driver, so you might have to use the XShm device in your video-playing apps (with resulting poor performance).
If you want to run at 1024x768, the Savage driver is fine.
Alternatively, you can download the newer S3 drivers on Tim Roberts' page. This will do 1400x1050, but XVideo is still funny, at least on my machine.
The XVideo (Xv) extension "doesn't work quite right" at a
24-bit color depth. X shared memory video (XShm) delivers acceptable
performance at 24-bit color if the player window is small, but if you
want to watch fullscreen video via Xv, you'll have to run X at 16-bit
color. This is not a major inconvenience as you can leave a second X
server running by typing (from a second virtual console)
-- :1 -depth 16
You won't be able to turn on NumLock via Shift-ScrollLock in X. You can change that by playing with X key bindings, but I haven't bothered to as I never use the embedded "numeric keypad" anyway.
Sound might not work correctly after a suspend/resume cycle. Ordinarily this is fixed by restarting ALSA, but if (for example) Galeon is running and using sound, ALSA cannot be restarted on resume since it believes Galeon is still using the sound device and will not relinquish control.
The normal solution is to modify
changing the appropriate line to read
RESTORE_SOUND="yes". Sound will then survive a
suspend/resume cycle. If you examine the script
/etc/sysconfic/suspend-scripts/sound it appears as if it
kills all processes that use sound (a bad thing!), but it only kills
processes that it thinks are actively using sound, so unless you're
playing sound while suspending, this isn't a problem - with one
If Mozilla (or Galeon, and some other programs) is running with Flash
(or possibly other plugins), it will be killed. I know of no
workaround that does not involve recompilation. If
RESTORE_SOUND is off, sound will not work upon resume
until you restart the ALSA service; however, the service cannot be
restarted until Mozilla is killed as it is "using" the sound
device. Note that Konqueror, which uses the same Flash
plugin, does not suffer from this problem.
SpeedStep does not work correctly. The system will always run at whatever speed it was running when the machine booted. While SpeedStep does work on the PIII-M (Tualatin) chip, this laptop uses a Mobile PIII Coppermine, which kernel 2.4.21 does not yet do SpeedStep for (I haven't tried to force it). I usually run it at reduced speed (700MHz) as I rarely need that much CPU power.
XFree86 4.2 works with the savage_drv.o driver. The mouse is a generic 3-button mouse. The installation gets everything right, so no special intervention is required on your part.
If you are using ALSA sound (default in 9.0), the sound system may be
hosed upon resume. To fix this, you can do
restart as root. You can modify the standard apm scripts to
attempt to stop and restart sound, but this is Not So Good because
these scripts are Dumb (they do rmmod and insmod without being
sensitive to the load order or specific modules, and they kill and
restart all processes using sound on suspend and resume).
A better way is to tweak the scripts slightly as follows:
- Change the appropriate line to read
- Inside the main
ifadd the lines
service sound stop
service alsa stop
and remove all other lines inside the conditional
- Inside the first
ifadd the lines
service alsa start
service sound start
and remove all other lines inside the conditional
Sound will be correctly stopped and restarted on a suspend/resume cycle without adversely affecting applications. Be aware that if you are playing sound while attempting a suspend, the application that is playing may be killed when the sound modules are unloaded. So don't do that, then - hit Stop in XMMS before suspending.
Supermount for the USB external floppy worked fine here. See above for details on setting it up.
When you do a
ls now, the drive blinks for a few seconds
and everything works. When you put a new disk in, just rescan the
drive and it'll be updated appropriately. You may want to sync the
disk before ejecting, just to be sure that everything has been
written. You can also do mount/unmounting by hand if you dislike or
distrust supermount, but I've found it mostly problem-free.