====== Linux on Laptops: Debian on the IBM ThinkPad x41 ====== This page is horribly out of date ===== Hardware ===== [[http://www.thinkwiki.org/wiki/Category:X41|Hardware Details at ThinkWiki.org]] {{ linux:thinkpad_x41:thinkpad_x41.jpg }} ===== Installation Methods ===== ==== Booting ==== === From a USB Stick === Didn't work for me. === From an USB CD/DVD Drive === Works fine, since I had one nearby I used this method. === Over network using DHCP/TFTP === Works fine. === Boot Media === * Since the normal Debian Releases didn't support the SATA chipset nor the ethernet adapter of this notebook when I wanted to install Debian on it (12.08.2005 & 1.12.2005), I had to use one of the less stable snapshots. * [[http://www.debian.org/devel/debian-installer/ports-status|Snapshot overview]] * [[http://cdimage.debian.org/pub/cdimage-testing/daily/i386/current/debian-testing-i386-netinst.iso|The newest i386-netinst.iso]] ==== Booting & Installing ==== Note: As said above, I used the newest snapshot images available at the time I was installing Debian on my x41 (~12.08.2005), so it is very likely that the problems that I had will be fixed in future versions. === using the right LILO images === I had to use the kernel 2.6 LILO image named "linux26" or "expert26" to get the onboard network card, the SATA controller and my USB DVD drive working. ===== Making the Hardware work ===== ==== CPU ==== === Frequency Scaling === CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y plus # apt-get install cpufreqd and it worked just fine. ==== ACPI ==== * Battery- and thermal sensors work without problems (''acpi -V'') * Suspend-to-Disk works fine as well (I used the implementation included in kernel 2.6.14.2, not Software Suspend 2) * For detailed instructions on getting the acpi keyevents working (and some scripts to handle them), take a look at the [[http://stefan.desire.ch/howto/x41debian/|X41 page of Stefan Ott]] === Suspend-to-Ram === Suspends, but without kernel patches it refuses to unsuspend (2.6.12) or the system crashes afer unsuspending (2.6.{12,13,14}). To fix this I applied the [[http://wiki.foosel.net/media/linux/t43/sata_pm.2.6.14.diff.txt|sata_pm patch]] by Jens Axboe and passed the following parameter to my kernel acpi_sleep=s3_bios More information on [[http://www.thinkwiki.org/wiki/How_to_make_ACPI_work|ThinkWiki: How to make ACPI work]]. ==== Ethernet ==== It appears to be a Broadcom Tigon3 and works without problems with the tg3 module (CONFIG_TIGON3=y). ==== Audio ==== It appears to be an Intel/SiS/nVidia/AMD/ALi AC97 Controller and works with the snd_intel8x0 + snd_ac97_codec modules (''CONFIG_SND_INTEL8X0=Y''). ==== X.org ==== The on-board Intel i915gm Card is supported by the i810 driver of X.org and runs without problems, but to get DRI working you will have to download the right modules from [[http://dri.freedesktop.org/snapshots/|dri.freedesktop.org/snapshots]] (the ones I used: [[http://dri.freedesktop.org/snapshots/common-20050718-linux.i386.tar.bz2|common-20050718-linux.i386]] and [[http://dri.freedesktop.org/snapshots/i915-20050718-linux.i386.tar.bz2|i915-20050718-linux.i386]]). Also, don't forget to add DRI support to your kernel. CONFIG_DRM=y My /etc/X11/xorg.conf: {{linux:thinkpad_x41:xorg.conf}} the framerates i get with ''glxgears'' 3978 frames in 5.0 seconds = 795.600 FPS 4623 frames in 5.0 seconds = 924.600 FPS 4623 frames in 5.0 seconds = 924.600 FPS 4622 frames in 5.0 seconds = 924.400 FPS ==== VGA Port ==== Only works with a [[http://sourceforge.net/tracker/index.php?func=detail&aid=1212045&group_id=107484&atid=647739|patched]] version of [[http://i855crt.sourceforge.net/|i855crt]]. Once you've patched it just use the following command to enable the vga port. # i855crt on 1024x768@60 ==== USB ==== Works fine with "EHCI HCD (USB 2.0) support" (''CONFIG_USB_EHCI_HCD''). ==== SD Card Reader ==== lspci identifies it as a 0000:04:00.1 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 13) the [[http://mmc.drzeus.cx/wiki/Linux/Drivers/sdhci|sdhci]] project should provides a kernel driver/patch for these, but i haven't tested it yet. ==== Wireless Lan ==== Works fine with the [[http://ipw2200.sourceforge.net/|ipw2200 module]] (>= v1.0.6). ==== Bluetooth ==== Not tested yet. ==== Modem ==== Not tested yet. ===== Miscellaneous ===== ==== Data ==== === lspci output === 0000:00:00.0 Host bridge: Intel Corp. Mobile Memory Controller Hub (rev 03) 0000:00:02.0 VGA compatible controller: Intel Corp. Mobile Graphics Controller (rev 03) 0000:00:02.1 Display controller: Intel Corp. Mobile Graphics Controller (rev 03) 0000:00:1c.0 PCI bridge: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03) 0000:00:1d.0 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03) 0000:00:1d.1 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03) 0000:00:1d.2 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03) 0000:00:1d.3 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03) 0000:00:1d.7 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) 0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev d3) 0000:00:1e.2 Multimedia audio controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03) 0000:00:1e.3 Modem: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03) 0000:00:1f.0 ISA bridge: Intel Corp. 82801FBM (ICH6M) LPC Interface Bridge (rev 03) 0000:00:1f.2 IDE interface: Intel Corp. 82801FBM (ICH6M) SATA Controller (rev 03) 0000:00:1f.3 SMBus: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03) 0000:02:00.0 Ethernet controller: Broadcom Corporation: Unknown device 167d (rev 11) 0000:04:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d) 0000:04:00.1 0805: Ricoh Co Ltd: Unknown device 0822 (rev 13) 0000:04:02.0 Network controller: Intel Corp. PRO/Wireless 2200BG (rev 05) ==== Making Fn and the other ~special~ Buttons work ==== All of the special buttons (except the "Access IBM" one) produce normal keycodes which you can capture using ''xev(1x)''. If you don't feel like mapping them all on your own, just # apt-get install tpb && tpb --daemon ==== high pitch noises(TM) ==== A lot of ThinkPads appear to produce strange high pitch noises when not under load, I was able to fix that by passing the following kernel parameter in my /boot/grub/menu.lst kernel /boot/bzImage processor.max_cstate=2 for more information on possible reasons for those noises have a look at [[http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises|ThinkWiki: Problem with high pitch noises]] or the [[http://sourceforge.net/mailarchive/forum.php?forum_id=6102|acpi-devel mailing list archive]]. ==== clicking noises from the harddrive ==== My x41 kept emitting some strange clicking noises out of the air vent on its left side, which appear to be caused by the Hitachi harddisk (DK13FA, 40GB) trying to save power by parking its heads. Note: In order to apply this workaround you will first need to patch your kernel with [[http://linux.yyz.us/|Jeff Garzik's]] [[http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/|libata/passthru patch]] ([[http://wiki.foosel.net/media/linux/t43/libata_passthru.2.6.14.diff.txt|the version i used]]), because ''hdparm'' won't be able to handle SATA drives without. I was able to reduce the problem by lessening the power management for this drive, using: # turns it almost off hdparm -B 254 /dev/hda or # turns it off hdparm -B 255 /dev/hda More information on [[http://www.thinkwiki.org/wiki/Problem_with_hard_drive_clicking|ThinkWiki: Problem with hard drive clicking]]. Sadly this alone didn't really solve the problem for me, the clicking occurs less often but is still very annoying. Using the laptop-mode (''apt-get install laptop-mode-tools'', more about it: [[http://www.xs4all.nl/~bsamwel/laptop_mode/index.html|1]],[[file:///usr/src/linux/Documentation/laptop-mode.txt|2]]) I was able to more or less stop any clicking, at the cost of a lot of disk performance (why did they have to use crappy Hitachi harddrives in a 1.700€ laptop?). If you don't want to put up with this, Andreas Bartel reported that he got a replacement drive from IBM, free of charge. ==== Files ===== * My current 2.6.17.5 ''.config'': {{linux:thinkpad_x41:config.txt}} * My ''xorg.conf'': {{linux:thinkpad_x41:xorg.conf}} ===== Other Resources ===== * [[http://www.thinkwiki.org/wiki/Category:X41|ThinkWiki.org: ThinkPad X41]] * [[http://www.net-track.ch/opensource/articles/x41.php|Linux on the IBM ThinkPad X41 Laptop]] * [[http://stefan.desire.ch/howto/x41debian/|Debian GNU/Linux on the IBM Thinkpad X41]] * [[http://tuxmobil.org/ibm.html|TuxMobil: IBM]] * [[http://www.linux-on-laptops.com/ibm.html|Linux on Laptops: IBM]] ===== Contact ===== Should you find any errors or have any ideas on how to improve this page please [[about:contact|contact me]].