Betriebssysteme · Institut für Systemarchitektur · Fakultät Informatik · TU Dresden

Dipl.-Inf. Alexander Warg

Linux on IBM ThinkPad T40p

This page is for all those that like to have some sophisticated features of the IBM ThinkPad T40p under Linux.

The patches and code on this page may also work on other hardware but are tested by me on an IBM T40p.

Dual Head DVI Support

The T40p itself has no external DVI connector, however if used with a port replicator from IBM an external DVI connector is available. Nevertheless the Radeon driver currently in XOrg is not capable of driving the internal LCD and an external TFT (connected via DVI) in a multi-head configuration.

This patch (should apply to XOrg 6.8.1) in conjunction with this xorg.conf make LCD + TFT running as a dual head configuration in MergedFB mode.

Even more interesting, you can switch modes and resolutions with xrandr and xvidtune at runtime. This feature makes it easy to use the Laptop with a projector capable of only 1024x768 and on my desktop with a secondary TFT without restarting X.

In the case of runtime switching of the resolution, where the dual-head configuration switches from Xinerama to Clone mode some X applications get confused by the resolution returned by X. To circumvent this problem I patched the RandR extension.

Linux 2.6 on T40p

Expansion-Bay Hotplugging

The ThinkPad T40p has a couple of neat features, such as a hotpluggable bay. The Linux 2.6.11 kernels have already some basic support for this features if IBM ACPI Driver is configured. This driver is not working very well. For example, it does not recognize my CD-ROM drive any more if it was not installed while booting, the other way round if an extra battery is used and plugged after booting this battery will never be recognized by the ACPI drivers in the Linux kernel.

I have a collection of patches that solve the aforementioned problems for the T40p and handle the complete CD-ROM drive hotplugging without any user-level support scripts.

Linux 2.6.11.x Patches

  • ACPI Scan + Eject Don't throw away devices that are not present at boot time. Provide an API for calling eject (_EJx) methods of devices.
  • ACPI Battery Eject Register callback for eject and device check events and call the appropriate eject method via the new API.
  • IDE Hotplug Export the function 'ata_attach' for scanning for new drives.
  • IBM ACPI 0.10 + Kernel IDE Hotplug Use version 0.10 of the ibm_acpi module and added proper eject and hot insertion of a CD-ROM drive into the expansion bay.

These patches are disjoint. However, there are compile-time dependecies among the patches. The IBM ACPI patch depends on the ACPI Scan + Eject patch and on the IDE Hotplug patch. The ACPI Battery Eject patch depends on the ACPI Scan + Eject patch.

Linux 2.6.12.x Patches. --- The IDE Hotplug Patch is no longer necessary.

Suspend to RAM Power Consumtion

A disadvantage with the original Linux kernel is the power consumption during Suspend to RAM. Which is basically cause by not disabling the Radeon graphics chip. I have a small patch ( patch) that solves this problem on my T40p. However, be careful on some laptops it might be the case that the graphics chip is not correctly resumed and you may not see anythin after resume (than you are out of luck and connot use this patch).

To make this patch effective you must use the radeon frame-buffer driver.

Alexander Warg
5. Jul 2005
· Copyright © 2001-2019 Operating Systems Group, TU Dresden | Impressum ·