Debian GNU/Linux on the IBM ThinkPad X41
Hardware
PCI
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03) 00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03) 00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03) 00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3) 00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03) 00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03) 00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03) 00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03) 00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03) 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 11) 04:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d) 04:00.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 13) 04:02.0 Network controller: Intel Corporation PRO/Wireless 2915ABG [Calexico2] Network Connection (rev 05)
USB
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 004: ID 0a5c:201e Broadcom Corp. IBM Integrated Bluetooth IV Bus 003 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Software
I’m using Debian GNU/Linux “lenny” (stable).
Things that work out-of-the-box
- Bluetooth: Works with hci_usb (successfully transferred files to some Nokia phone)
- Card reader: Works just fine with the sdhci driver
- Fingerprint reader: Worked last time I checked, follow these instructions
- Network: The Broadcom NetXtreme BCM5751M chip works with the Tigon3 (tg3) driver.
- Sound: The integrated audio chip works with the snd_intel8x0 driver
- USB: Use the EHCI (USB 2) and UHCI (USB 1.1) drivers (ehci_hcd and uhci_hcd)
ACPI
The various ACPI features appear to work just fine, including the IBM ThinkPad Laptop Extras (thinkpad_acpi module). I can suspend the system to memory and to disk (see hibernate) and it wakes up reliably.
To get it working, start by installing acpid. This will allow you to customize the actions to be taken when Fn-Fx, the power button or any other special keys are pressed and when the lid is closed. You can find a tarball containing my ACPI scripts in the configuration section – just uncompress it into /etc (and customize).
In order to have control over the Fn-F7 key combination I had to activate ThinkPad hotkey support and set the correct mask:
# /etc/rc.boot/hotkeys # # Prepare the ThinkPad hotkeys (the ibm_acpi module needs to be loaded first!) echo enable > /proc/acpi/ibm/hotkey echo 0x084c > /proc/acpi/ibm/hotkey
Each bit masks one hotkey, starting with Fn-F1, thus this mask enables Fn-F3, Fn-F4, Fn-F7 and Fn-F12, leaving the other combinations alone (you could mask it with ffff, but then you’d have to manually intercept bluetooth activation).
Notes:
- In order to be able to resume from suspend, you’ll need to append acpi_sleep=s3_bios to the kernel options (i.e. in /etc/lilo.conf or /boot/grub/menu.lst).
- If you installed the modem drivers, the X41 won’t suspend until they are disabled (/etc/init.d/hsf stop).
Graphics
The laptop uses an Intel 915GM chip which works with x.org’s i810 driver (configuration). For presentations, I want to be able to have a clone of my desktop on the external monitor. To do so, I use xrandr:
xrandr --output VGA --same-as LVDS
Or, to get a proper dual-monitor setup, use
xrandr --output VGA --right-of LVDS
To disable the external screen, use the command
xrandr --output VGA --off
I’m slightly abusing acpid to toggle the external monitor with Fn-F7. You can find the scripts required for this in the ACPI config file package.
Notes:
- I disabled the “TV” output in xorg.conf because the X41 doesn’t actually have one of those (see configuration)
Hibernate
If your swap partition is large enough (which mine isn’t, because I don’t like the general idea of swapping), hibernate (“suspend to disk”) works out of the box.
Note: If you installed the modem drivers, the laptop won’t hibernate until they are disabled (/etc/init.d/hsf stop).
IrDA
(I haven’t used this in years, no idea whether it still works as described)
The infrared port is supported by the nsc_ircc driver.
You will need to have the irda-utils package installed in order to do anything useful with the port (during the installation, choose type “native“, FIR chip type “nsc-ircc” and module options “dongle_id=0x09“.
I can transfer files via IrDA using irxfer (for win9x, AFAIK) and irobex_palm3 from the openobex apps.
I also managed to sync my PDA (Sony Clié PEG-S300/E, PalmOS 3.5.2) via IrDA with J-Pilot:
- Install pilot-link, make sure the /dev/pilot symlink points to /dev/ircomm0 or tell J-Pilot directly to use /dev/ircomm0.
- Load the kernel modules: In addition to irda being activated, the ircomm-tty, irtty-sir and sir-dev modules need to be loaded.
Notes:
- The nsc_ircc module can’t be loaded when the serial port modules (serial_core, 8250, 8250_pci – required for the modem) are active – make sure to unload them first.
- To prevent IrDA and/or serial port initialization on bootup, create a file /etc/hotplug/blacklist.d/irda with the following content:
# /etc/hotplug/blacklist.d/irda # # Prevent the IrDA and serial port drivers from being loaded by hotplug irtty_sir sir_dev nsc_ircc irda 8250_pci 8250
You can then use my IrDA control script (see configuration) to enable / disable the infrared port.
Keyboard
In order to get the NumLock key to work, I had to add the following command to my X startup script (eg. ~/.xsession):
xmodmap -e "keycode 77 = Num_Lock"
The following lines assign some useful values to the forward/backward buttons. You should then be able to get your favourite programs to listen to them (I’m using them to switch workspaces on Xfce).
xmodmap -e "keycode 233 = XF86Forward" xmodmap -e "keycode 234 = XF86Back"
Also, since I have to occasionally type weird characters, I use my right alt key as a compose key:
xmodmap -e "keycode 113 = Multi_key"
(don’t forget to start your actual x-session in that script, eg. by adding a line “exec /usr/bin/xfce4-session” at the end)
Modem
(I haven’t used this in years, no idea whether it still works as described)
The integrated modem works with the free as in beer (14.4 only) version of linuxant’s HSF drivers if you include the following kernel options:
Device Drivers -> Character devices -> Serial drivers -> 8250/16550 and compatible serial support [CONFIG_SERIAL_8250] Device Drivers -> Network device support -> PPP (point-to-point protocol) support [CONFIG_PPP] Device Drivers -> Network device support -> PPP support for async serial ports [CONFIG_PPP_ASYNC]
Note: This driver interferes with the rest of the system in unfortunate ways (see ACPI, Hibernate and IrDA), thus I recommend not to compile the serial port support directly into the kernel but to compile it as a kernel module instead.
Mouse
Device /dev/input/mice and protocol ImPS/2. In order to use the middle button + trackpoint for scrolling, modify xorg.conf to contain
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ImPS/2" Option "EmulateWheel" "True" Option "EmulateWheelButton" "2" Option "EmulateWheelTimeout" "200" EndSection
PCMCIA
I’m using the kernel’s PCMCIA drivers (yenta_socket and pcmcia).
Don’t forget to install pcmciautils. You might want to prevent PCMCIA from using IRQ 3 to avoid IRQ conflicts with IrDA:
# /etc/pcmcia/config.opts # ... # Second built-in serial port exclude irq 3 ...
ThinkPad buttons
The tpb program has support for the ThinkPad X41: It displays the current state on a cute little OSD whenever you toggle the external screen, change volume or brightness or toggle the ThinkLight. Furthermore, it allows you to assign scripts to certain keys. I’m currently using the “Access IBM” button to toggle whether the notebook should suspend when I close the lid or not.
Using tpb’s callback feature and a little script (see configuration), I can use the “zoom” button (fn-space) to switch my X resolution from 1024×768 to 800×600 (and back).
WLAN
The integrated Intel PRO/Wireless 2915ABG WLAN chip works well with the ipw2200 driver, provided you install the corresponding firmware (use version 3.1, unpack it to /lib/firmware). The slightly older (but also well-working version 3.0 is provided by the firmware-ipw2x00 debian package).
Note: To prevent the WLAN driver from being automatically loaded on bootup, create a file /etc/hotplug/blacklist.d/ipw2200 with the following content:
# /etc/hotplug/blacklist.d/ipw2200 # # Prevent the ipw2200 driver from being loaded by hotplug ipw2200
Configuration files
- X configuration
- TBP config file, put into /etc
- TBP callback script, put into /usr/local/share/tpb
- ACPI scripts, uncompress into /etc
- IrDA control script