Installing Ubuntu 7.04 (Feisty Fawn) on a ThinkPad X40

From ThinkWiki
Revision as of 16:34, 26 June 2007 by Benjamin Pineau (Talk | contribs) (Executive summary)

Jump to: navigation, search

Executive summary

Ubuntu Linux 7.04 -and probably any modern distro- "just works" out-of-the-box on this machine.

No manual configuration was required. Even network, wifi, xorg, sound and suspend-to-ram were properly configured and functional at the end of the default Ubuntu installation, all with opensource drivers only. I've no problem with fan noises either.

But there's still some room for fine tuning:

  • To improve energy efficiency and battery life (8 cell bat gives 4h with default install, 6h after tuning)
  • To access some special features (like some Thinkpad special keys)
  • To better use resources (memory, CPU, power, ...)

The machine

This an "all Intel" machine: differing from most other Thinkpad models because even the network, wireless and graphic controllers uses Intel chipsets. Note that some X40 models use atheros for wifi, or tg3 for ethernet (but not mine). That's why I choosed this one (beside the 1.2 Kg ultraportable form factor).

  • IBM Thinkpad X40 (model 2371Y29), Centrino platform
  • 1 Go DDR SDRAM (333MHz PC2700)
  • CPU: Intel Pentium M (Dothan) 738 at 1.4 GHz -32KB L1 - 2Mo cache L2 - 90 nm - LV (low voltage) - 400MHz FSB (4 x 100) - MMX - SSE - SSE2 - no NX/XD bit, no hyperthreading, no 64bits - socket 479 - (Enhanced) EIST SpeedStep - CPUID : 6D6 (cpu family: 6 / model: 13 / stepping: 6)
  • Southbridge chipset ICH4-M (Intel 82801DBM) : PCI, USB, IDE
  • Intel gigabit ethernet controller (linux kernel module: e1000) 82541GI MT mobile (support PXE boot :)
  • Wifi controller: Intel PRO/Wireless 2200BG Mini-PCI Adapter on a MiniPCI slot
  • Northbridge / Graphic chipset : Intel Extreme Graphics 2 (Intel 855GME)
  • Ricoh R5C511 PCMCIA controller (CardBus slot)
  • IrDA
  • TFT display: 12" screen, @1024x768 nominal resolution
  • Hard Drive : 1.8" - 40 Go - 4200 RPM - Hitachi DK13FA-40B
  • ATA controler : Intel 82801DBM Ultra ATA storage controller 24CA
  • Audio controller: AD1981B AC'97 (linux kernel module: i810_audio)
  • Weigth / size: 1.24 Kg / 26.8 cm x 23.7 cm x 2.4 cm
  • UltraBase X4 with broken DVDROM
  • Batteries :
    • default small one: 4 cells, Li-Ion, 1900mAh (about 27.4W) ~ 3h00
    • new one : 8 cells, Li-Ion, 4400 mAh (about 63W), 0.4 kg, ref (FRU) : IBM-92P1083 ~5h30
  • BIOS version : 1UETD3WW (2.08 ), built on 2006-12-21, released on 2007/01/31
  • IBM ThinkPad Embedded Controller version : 1UHTA6WW (1.56)
  • FW model : TP-1U


The X40 doesn't have builtin CDROM or floppy drive. I own an IBM UltraBase X4 dock station, but her DVDrom is dead. So I went for PXE (network boot) installation for the first time ; I just applied instructions from this web page : this was unexpectedly simple and worked flawlessly. Everything got installed from network, "over the air".

I kept the 4Go IBM recovery partition at the end of the drive, by superstition ;) and for Rescue and Recovery. Afterwards, I compiled my own 2.6.22 kernel, patched with high resolution timers, to improve the battery life, and applied tips from the How to reduce power consumption.

Small glitches

Distribution (Ubuntu Feisty Fawn 7.04)

Even if everything was supported, there was some small things where Ubuntu (or Gnome, or Linux kernel) could have done better:

  • Suspend-to-ram works out-of-the-box, no special tricks are needed. But sometimes, not always, for an unknown reason, the Gnome "logout" screen hides the s2ram option. Whatever, we still can suspend thanks to the thinkpad's special keys (or just with an "echo mem > /sys/power/state").
  • Ubuntu installs the "special keys" handler from the "hotkey-setup" package. This is suboptimal, since hotkey-setup supports less special keys than tpb, and consumes a lot of battery (see for instance this bug report).
  • More generally, the whole Ubuntu system needs work to become efficient on laptop: switch to a 2.6.21 or more kernel, use in kernel "ondemand" governor rather than userland powernowd+hald-addon-cpufreq, activate AC97 power saving features when on battery, etc.
  • The default Ubuntu install left me with a lot processes related to printing (cupsd, gnome-cups-icon, hpiod, hpssd (that's a python script!)) while I have no printer configured nor attached. Bad. They shouldn't start this until hald find something plugged or until I try to configure a printer. It also left the bluetooth "hcid" daemon, while I've no bluetooth controller.

Hardware and BIOS limitations

The hardware is fine for me, even if a bit old by nowadays standards (I'd prefer have an Intel AHCI chipset with SATA drive on it, for power efficiency reason, and I'd prefer a Core2Duo CPU....). It lacks also some options available on some other Thinkpads models, like the fingerprint reader (but seriously, I prefer give this up to keep my "all Intel" chipsets). It lacks a Firewire controler. The BIOS is also somehow suboptimal, in some aspects.

For an unknown reason, the BIOS disable by default the deeper power saving c-states (C3 and C4). There's two option for this that you need to turn on, despite the the misleading BIOS online help that says "usualy not needed". Type "F1" during boot to access the BIOS, then enable:

CPU power management
PCI bus power management

The BIOS, as in many laptops, hides the HPET hardware timer to the system. Windows XP don't support HPET and when enabled, it displays a yellow shebang on his device manager list, hence the common vendor choice to disable it. That's a bit odd since Linux can make a great use of it: other available timers (PIC/LAPIC) can't schedule timer events more than a few miliseconds away, so they causes about 20 to 40 CPU wakeups per second. This impact the power consumption greatly. Yet, thanks to the Udo A. Steinberg and Venki Pallipadi, we have a way to force enable HPET on chipsets known to support it (this include ICH3-M, ICH4-M, ICH5-M etc.). So I applied their patch, part of the Resolution Timer patchset on top of my hand compiled 2.6.22-rc5 kernel, and all worked fine: dmesg | grep hpet:

[    3.740522] hpet clockevent registered
[    3.740527] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    3.740532] hpet0: 3 64-bit timers, 14318180 Hz
[    5.080000] Time: hpet clocksource has been installed.

Not tested yet

  • TCPA chipset: Trusted Computing controller. Should be supported by tpm and tpmdd but who need this, really ?
  • HDAPS (Hard Drive protection mechanism): this should work out of the box, we have a kernel module for that but I disable it because it's know to suck power
  • IrDA (Infrared controller) : is know to work too, and looks supported by my kernel, but I've no other IrDA device to test with
  • SD Card slot : I've no SD cards to test this
  • 56K Modem: I've no use of this

System informations

dmesg | grep states

[    5.280003] ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3] C4[C4])
[    5.280009] ACPI: Processor [CPU] (supports 8 throttling states)

lspci :

00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
02:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d)
02:00.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 13)
02:01.0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet Controller
02:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)

cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Pentium(R) M processor 1.40GHz
stepping        : 6
cpu MHz         : 600.000
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe up est  tm2 
bogomips        : 1196.93
clflush size    : 64

Other Linux installation reports on Thinkpad X40

Don't forget that the X40 line included different ethernet (tg3 or e1000) and wireless (atheros or Intel) chipsets, and that Linux support involved over time. So there may be some difference between your experience with X40 and others reports.

Thinkwiki internal notes about installing Linux on X40

Exernal links to notes about installing linux on X40