This article covers the installation and configuration of Arch Linux on an IBM/Lenovo T41 laptop. These laptops were very popular with corporate customers, and are now available reconditioned fairly cheaply. Typical spec is a 1.6GHz Pentium M, 512MB RAM, 32MB ATI Radeon graphics adapter and a 40GB hard drive. It is possible to get most if not all of the hardware to work in Arch.

This article covers the installation and configuration of Arch Linux on an IBM/Lenovo T41 laptop. These laptops were very popular with corporate customers, and are now available reconditioned fairly cheaply. Typical spec is a 1.6GHz Pentium M, 512MB RAM, 32MB ATI Radeon graphics adapter and a 40GB hard drive. It is possible to get most if not all of the hardware to work in Arch.

Introduction

This article covers the installation and configuration of Arch Linux on an IBM/Lenovo T41 laptop. These laptops were very popular with corporate customers, and are now available reconditioned fairly cheaply. Typical spec is a 1.6GHz Pentium M, 512MB RAM, 32MB ATI Radeon graphics adapter and a 40GB hard drive. It is possible to get most if not all of the hardware to work in Arch.

Preparation and Installation

This laptop has a hidden protected area (HPA) at the end of the hard drive, which can be used to restore the default OS (usually Windows XP Pro) to the factory state. If you do not want to use this feature, or have the recovery disks, you can reclaim about 3GB by disabling the "IBM Predesktop Area" in the BIOS.

If you have the recovery disks or an intact HPA, they are the best way to install Windows (if you want to dual boot). Do this first, as the recovery disks will overwrite your MBR, and possibly other things too. Then you can shrink down the partition it creates, and install Arch.

CPU Frequency Scaling

You need the cpufrequtils package, and either cpufreqd or cpudyn. The correct module for the Banias is acpi_cpufreq.

ACPI Events

Out of the box, Fn+F4, Fn+F12 and the power button generate ACPI events. The thinkpad_acpi module can generate more events, see "FnFx and Special Buttons" below.

Special Modules

The thinkpad_acpi module (which may or may not be loaded by udev) provides support for all hotkeys (see below) and a number of other features. It has a procfs interface at /proc/acpi/ibm/ which can be used to read out a number of thermal sensors, fan speed etc. and control volume, brightness, LEDs, beep codes and much more. Control of fan speed is possible if the driver is loaded with the experimental option, but if you use this keep an eye on the thermal sensors.

The tp_smapi module is available in the AUR. On this model of thinkpad it only provides extra battery information; Battery discharge control is not supported. Note that this module conflicts with the hdaps module in the kernel mainline, they cannot both be loaded at the same time.

APM

As an alternative to acpi, you can use apm. By default Arch Linux uses the much more modern acpi, so you have to boot your kernel with apm. The only reason to use apm is that with apm the ThinkPad keys work out of the box. apm is missing some features of acpi. To do so, append apm=on acpi=off to the kernel line in /boot/grub/menu.lst.

Hibernation

With apm enabled, all hotkeys work out of the box, but to use suspend to disk (Fn+F12), you have to prepare a "save2dsk.bin" file on a fat16 partition using the program [| tphdisk]. The Size of this file should be ramsize+videoramsize+few mb more. eg:

tphdisk 565 > save2dsk.bin

Do a cold reboot, so the bios can see the new file.

Speedstep

As per ACPI

Fn+FX Function Keys and Special Buttons

Volume, Brightness, Thinklight & Lid

The volume buttons, Fn+Home, Fn+End, Fn+PgUp and lid buttons are wired directly to the relevant piece of hardware, so do not need any configuration. With an appropriate mask (see below) they will still produce an acpi event, which can be used to display onscreen messages using xosd or libnotify.

Back and Forward

The two buttons next to the arrow keys generate normal keystrokes (233 and 234) when pressed, and can used in xbindkeys or xmodmap, or as shortcut keys. They can be used to change workspace in Metacity for example. If you want Windows-like back and forward in your browser, there are some instructions for most browsers on the Thinkwiki.

Other Keys and Buttons

If you are using APM most Fn+Fx keys just work.

If you are using ACPI without the thinkpad_acpi module, many work out of the box. If you want more/better/configurable keys, read on.

By default most of the keys and buttons produce an acpi event. You can test which using:

$ acpi_listen

Exactly which keys produce an event depends on the mask set in /proc/acpi/ibm/hotkey. You can read the mask using cat, and change it with something like:

# echo enable,0x00ffffff > /proc/acpi/ibm/hotkey

The hex value is a mask, which controls which keys are handled by the laptop firmware and which ones are handled by acpid. Exactly which bit effects which key/button is unknown, but 0x00000000 sends all events to the firmware, and 0x00ffffff send all events to acpid. The default is0 x008c7fff, which creates acpi events for most buttons, but not those listed above which are connected directly to the hardware. If you want to set the mask at every boot, just add the above command to /etc/rc.local.
If unsure, just leave it alone.

You must then set up acpid to handle the acpi events. In Arch this is done through /etc/acpi/handler.sh, which is a bash script, and uses case structures to decide what action to take for each event. With a mask of 0x00ffffff the following script handles most of the Fn+Fx keys according to the blue icons on them.

FIXME: If you know how to toggle the external display on this laptop (Fn+F7), please update the script

This may seem like a lot of work just to get the hotkeys working, but it is also very powerful and extensible. You can easily add more actions, and every Fn+Fx combo generates an event. To control mpd with Fn+{F9-F11} for example:

One word of warning: the script runs as root, so be careful. If you want to start firefox using the Access IBM button for example, use su or sudo to start it as your normal user, not root.

A complete list of buttons/keys and the events they produce is available on the Thinkwiki.

tpb

There is another method of getting these keys to work, using the nvram kernel module and a piece of software called tpb. This is quite complicated, and does not work as well. It is not recommended as thinkpad_acpi supports all the buttons on this laptop. For the curious, there is some information on the Thinkpad OSD page.

UltraPad and TrackPoint

Both the pad and TrackPoint are supported by the standard mouse driver, and by the synaptics package, which provides more functionality, such as scrolling using the edges of the pad.
The below code will give you windows like functionality. It'll let you scroll with the middle mouse button, and also use it as a third mouse button for pasting and such.
There are more details on how to configure more options on
Thinkwiki

All of which should work under linux, and more details can be found on the Wireless Setup page.

Atheros Cards

These cards are supported by the Madwifi driver. There is also the experimental ath5k driver, which will eventually replace the Madwifi project, and Ndiswrapper which has been reported to work better in some circumstances, but is considerably harder to set up.

Cisco Cards

FIXME: If you have a cisco card in your T41, please update this section
These should be supported by the open source airo module, or the closed source mpi350 module from cisco.

Intel Cards

First install the wireless_tools package if you haven't selected it during the installation. It contains the ipw2100 dirver:

pacman -S wireless_tools

All you need to do now is install the firmware:

pacman -S ipw2100-fw

Your wireless device should now show up if you do:

iwconfig

For network management the combination of netcfg and archassistant works well.

Display

The laptop has a ATI Radeon 7500 or 9000 graphics adapter, supported by the open source ATI driver. Note that as of fglrx 8.28.8 these chipsets are not supported, so stick with the open source drivers.
Most of the options on the radeon man page and on the ATI driver page can be used with this chip, but there are reports of crashes or blank screens when FastAGPWrites is enabled. On option of interest not on the ATI page is DynamicClocks, which can be used to reduce power consumption.

Hard drive Active Protection

The T41 has a built in accelerometer, which can be used to detect when the laptop is dropped, and park the hard drive heads. As of Kernel 2.6.29, you no longer need to patch the kernel to make it work. See the HDAPS page for a guide on setting this up.