FreeBSD on the IBM ThinkPad X40
In this document, I will try to give a comprehensive report on installing FreeBSD on an IBM ThinkPad X40 – what I got to work, and how, and what still does not work for me. I provide this information in the hope that it might be useful, but without any implied warranty whatsoever. If you have corrections, additional insight or feedback regarding FreeBSD on the IBM ThinkPad X40 to share, please drop me a line.
I own two IBM ThinkPad X40 models with type 2371-8NG
and
2372-GG0
respectively. In the beginning, they ran
RELENG_5_X
with an almost GENERIC
kernel; these days they
run RELENG_7_X
with a GENERIC
kernel.
Parts of this document might (in the future? :) ) also contain
useful bits of information for running NetBSD, OpenBSD, or any
of the GNU/Linux flavours on the X40 series ThinkPad.
Remaining Showstoppers
- The integrated winmodem has not worked with
ltmdm
last time I tried (2005) - There is no driver for the integrated SD card reader (2005)
The i915 graphics chipset has no DRM support in the kernel yet
DRM works as of FreeBSD 7.0
DRM broken again as of FreeBSD 7.1 due to AGP failing to allocate physically addressed memory for hardware cursors:
http://bugs.freedesktop.org/show_bug.cgi?id=13845
http://www.freebsd.org/cgi/query-pr.cgi?pr=123775
Hardware Gotchas / BIOS Settings
Make sure you turn off the secondary IDE unit in the BIOS or
using TP98.exe
if the BIOS does not have the option.
With the secondary IDE unit enabled, the X40 hangs on ATA
device probe (FreeBSD 7.0) or crash randomly shortly after
booting (earlier releases).
The cd drive in the docking station still works perfectly fine
even when the secondary IDE unit is turned off.
The following BIOS error message is referring to the built-in Atheros miniPCI NIC:
ERROR
Resource Conflict - PCI Network Controller in slot 01 Bus:02, Device:02, Function:00
Press <F1> to Setup
Removing and reinserting the miniPCI card made the error disappear.
The older of these machines does not boot sometimes, displaying:
ERROR
0211: Keyboard error
ERROR
0260: System timer error
Press <F1> to Setup
I have no cure. Replacing the RTC battery (FRU 92P1004) did not help. I suspect a hardware defect.
Power Managment / ACPI & APM
It generally runs fine with ACPI enabled, suspend/resume does work. Sometimes closing and re-opening the lid just garbles the screen (which can be fixed by switching console, but that seems to lock up the machine for some people sometimes).
Try to remove APIC from the kernel configuration if your disk fails upon resuming:
device apic
Additionally, selecting a different scheduler may prevent from crashing upon suspending:
options SCHED_ULE
options PREEMPTION
If that doesn’t help, try with the following sysctl
values:
hw.pci.do_power_resume: 3
hw.pci.do_power_nodriver: 1
Enhanced SpeedStep runs fine. I used to run sysutils/est and have later migrated to the base system cpufreq framework.
Internal NICs
Both the integrated 10/100/1000 Mbps ethernet NIC and the integrated Atheros 802.11 a/b/g NIC work fine.
em0: <Intel(R) PRO/1000 Network Connection, Version - 1.7.35> port 0x7000-0x703f mem 0xd0220000-0xd023ffff irq 20 at device 1.0 on pci2
em0: Ethernet address: 00:0a:xx:xx:xx:xx
em0: Speed:N/A Duplex:N/A
ath0: <Atheros 5212> mem 0xd0200000-0xd020ffff irq 21 at device 2.0 on pci2
ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
ath0: Ethernet address: 00:05:xx:xx:xx:xx
ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Some models have an integrated Intel PRO/Wireless 2200 BG which works with the if_iwi kernel module (tested with FreeBSD 7.0).
Internal Modem
Doesn’t work.
Xorg
Used to work with classic dual head setup and DRM (Xorg 7.3 and FreeBSD 7.0). As of Xorg 7.4 and FreeBSD 7.1, DRM is utterly broken again.
With Xorg 7.4, the i810
driver does not work anymore and the
intel
driver needs the following in its device config in order to work:
Option "NoAccel" "true"
On the other hand, XRandR works perfectly fine with the intel
driver.
To set the keyboard, hald
is now used. Create /usr/local/etc/hal/fdi/policy/x11-input.fdi
containing something like the following to set the keyboard layout and options:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.xkb.layout" type="string">ch</merge>
<merge key="input.xkb.options" type="string">ctrl:nocaps</merge>
</match>
</device>
</deviceinfo>
PCMCIA / CardBus / PC Card
The slot is detected correctly:
cbb0: <RF5C476 PCI-CardBus Bridge> mem 0xb0000000-0xb0000fff irq 16 at device 0.0 on pci2
cardbus0: [CardBus bus](CardBus_bus) on cbb0
pccard0: <16-bit PCCard bus> on cbb0
All my old PCMCIA NICs work fine:
an0: <Cisco Systems 340 Series Wireless LAN Adapter> at port 0x100-0x13f irq 11
an0: got RSSI <-> dBM map
an0: Ethernet address: 00:40:xx:xx:xx:xx
an0: supported rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wi0: <D-Link D-Link Air DWL-660 Wireless PC Card> at port 0x100-0x13f irq 11 function 0 config 1 on pccard1
wi0: 802.11 address: 00:05:xx:xx:xx:xx
wi0: using Lucent Technologies, WaveLAN/IEEE
wi0: Lucent Firmware: Station (8.10.1)
wi0: supported rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wi0: <D Link DRC-650 11Mbps WLAN Card> at port 0x100-0x13f irq 11 function 0 config 1 on pccard1
wi0: 802.11 address: 00:05:xx:xx:xx:xx
wi0: using RF:PRISM2.5 MAC:ISL3873
wi0: Intersil Firmware: Primary (1.0.5), Station (1.3.4)
wi0: supported rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ed1: <Ethernet Adapter> at port 0x100-0x11f irq 11 function 0 config 0 on pccard
ed1: address 00:e0:xx:xx:xx:xx, type NE2000 (16 bit)
Universal Serial Bus
Works.
Integrated Bluetooth Adapter
/boot/loader.conf
:
ng_ubt_load="YES"
Console Mouse
Works.
Sound
/boot/loader.conf
:
snd_ich_load="YES"
DVD Playback
Works.
Serial
Works.
Other Devices
These modules add ThinkPad and Intel chipset specific support for various things.
/boot/loader.conf
:
acpi_ibm_load=“YES”
ichsmb_load=“YES”
ichwd_load=“YES”
I haven’t tested parallel and firewire ports.