Wednesday, January 24, 2007

Linux on a Lenovo T60

(Link to webpage)

So, work is letting me use a Lenovo T60. I put Gentoo GNU/Linux (2006.0) on it and decided to create a small page detailing the results.

If you're planning on using Debian External Content on model 2007-63g, I highly recommend Marco Kraus' installation guide External Content .

Specifications
  • Make/Model: Lenovo T60 (Model 2008-CTO)
  • Processor: Intel Core Duo (Centrino Duo) T2400 @ 1.83GHz, 2048 KiB L2 Cache
  • Graphics: ATI X1400 w/64MiB DDR-1 Video RAM
  • Memory: 1024MB
  • Storage: Hitachi 60GB 5400RPM SATA Disk Drive
  • Optical Drive: CDRW/DVD Drive (HL-DT-STCD-RW/DVD DRI)
  • Audio: Intel HD Audio Chipset
  • Wireless Networking: Intel PRO/Wireless 3945ABG
  • Wired Networking: Intel 82573L Gigabit Ethernet
  • Peripheral Networking: Bluetooth

All the goodies (lspci, dmesg, etc.) can be found here.

Hardware Table

Here's a list of the hardware in the laptop:

Component Model Status/Support Notes
Processor(s) Intel Core Duo (Centrino Duo) T2400 @ 1.83GHz, 2048 KiB L2 Cache Excellent Add CONFIG_X86_SMP and CONFIG_MTRR to your kernel, and you should be fine.
Memory 1024MB DDR2 Excellent Add CONFIG_HIGHMEM to your kernel config, otherwise you'll be capped at 896MB.
Graphics ATI X1400, 64MiB DDR-1 RAM Fair Well, this works fine with the VESA driver. However, ATI has some binary drivers External Content that seem to do the trick, too. Xvideo only started working in the 8.26.18 release, though.
IDE Controller Intel 82801GBM/GHM SATA Controller Excellent Works fine. Add CONFIG_SCSI_SATA, CONFIG_SCSI_SATA_AHCI, and CONFIG_SCSI_ATA_PIIX to your kernel. Probably beats the heck out of the Silicon Image junk in my Athlon64 box ...
Hard Disk Hitachi 60GB 5400RPM SATA Disk Drive Excellent Just.. works, like it should.
Optical Drive H-L Data Storage (Hitachi-LG) CD-RW/DVD GCC-4246N Bad libata.atapi_enabled still seems to have problems with AHCI, so disable it in the BIOS if you want to use the drive. Anyway, I burned an ISO image of the T60 BIOS, and the drive does work fine.
Audio Intel HD Audio Chipset Good Works fine w/ALSA. Use CONFIG_SND_HDA_INTEL in the kernel, and remember to run alsaconf, otherwise you won't get any sound. Use the PCM and Front volume controls to tweak the sound. I don't know what the Headphone volume control does, because it certainly doesn't modify the headphone output.
Wireless Networking Intel PRO/Wireless 8945ABG (802.11a/b/g) Fair Well, it works (tried w/802.11a), but Intel External Content needs to be whipped for requiring a binary-only regulatory daemon in addition to the binary-only firmware. The Gentoo package is somewhat brain-dead, too, since it requires net-wireless/ieee80211, which doesn't work if CONFIG_IEEE80211 is enabled. If you end up going this route, you'll have to disable CONFIG_IPW2100, CONFIG_IPW2200, CONFIG_PRISM54, and CONFIG_HOSTAP, since they require CONFIG_IEEE80211. (I suggest unpacking this in your home directory, and then just run ./load and ./unload manually)
Wired Networking Intel 82573L Gigabit Ethernet Good Works fine, enable CONFIG_E1000. The firmware on this seems to be buggy or something, because if I do a warm boot without a link (eg, no cable plugged in), I get "e1000_probe: The EEPROM Checksum Is Not Valid" when the e1000 module is loaded. This works on a cold boot, and when a cable is plugged in during a warm boot. Huh?
Peripheral Networking Broadcom BCM2045B Bluetooth 2.0 Receiver Excellent Works well w/my Logitech MX900 mouse. I suggest modularizing most (or all) of the Bluetooth options in the kernel, and emerging bluez-utils. Then, configure hidd to run at startup in /etc/conf.d/bluetooth, and rc-update -a bluetooth default. Gentoo's net.ppp scripts make jumping on the Internet via Bluetooth DUN a walk in the park.
Log

[Update 20060729] Updated most of the old stuff on the page. The kernel timing issue is in fact fixed in the released 2.6.17 kernel, and in distribution specific kernels, like Ubuntu External Content 's 2.6.15-26 patch. You don't need to do any hacking for ATI's drivers anymore, they build fine against 2.6.17 kernels.

[Update 20060422] I just realized that the optical drive hasn't ever worked. Correction, it hasn't ever been able to read media. I burned an ISO just fine w/cdrecord, since it uses its own SCSI library. Apparently with AHCI enabled, libata.atapi_enabled=1 does nothing, and there is no way of accessing this drive via /dev. So, disable AHCI to use your optical drive =(

[Update 20060418] There's an official (erm, hard-masked) ebuild for the 8.24.8 drivers, now. You still need to hack your kernel and change that line in firegl_public.c, though :)

[Update 20060417] I got the ATI video drivers to work, today. First, I hacked my kernel via the following:

  • Adding intermodule.o to the obj-y list in kernel/Makefile
  • Adding CONFIG_OBSOLETE_INTERMODULE=y to the end of my .config

That adds (yes, you can guess it) obselete inter_module functions to the kernel, since ATI's drivers are brain-dead and use them. Now, get an unofficial Gentoo ebuild from from this post External Content . Grab ati-driver-installer-8.24.8-x86.run and ati-driver-installer-8.24.8-x86_64.run from ATI External Content , and place them in /usr/portage/distfiles. Place the ebuild in /usr/portage/x11-drivers/ati-drivers (YES, this is bad, I know I should use PORTAGE_OVERLAY, but hopefully we'll see an official driver, soon, and won't have to worry) and run "ebuild ati-drivers-8.24.8.ebuild digest" to generate a digest. Next, go ahead and compile it, but interrupt the build right after it starts building the DRM module, and edit /var/tmp/portage/ati-drivers-8.24.8/work/common/lib/modules/fglrx/build_mod/firegl_public.c. Change MODULE_PARAM(firegl, "s"); to module_param(firegl, charp, 0);, then continue the build. If it works, awesome, if not - please wait for an official ebuild. Grab my dual-head xorg.conf below, if you want an example.

[Update 20060415] The first big problem I hit was a timer/clock issue, starting with a 2.6.15-gentoo-r1 kernel. Networking was just dog slow, and the system was dropping packets to hosts on the local LAN, along with some really weird latency. According to the kernel printk timestamps, only 30 seconds had gone by, when the system had been up for over 4 minutes. Also, not a good sign when keyboard repeat rate slows down and speeds up when you're just holding down a key.

The initial fix for this was to disable ACPI. Unfortunately, doing so prevented the SATA contoller to be detected. Disabling AHCI in the BIOS fixed this. However, the Intel audio module wouldn't load, and the Intel NIC didn't feel like transmitting or receiving any frames.

So, I jumped on the bleeding edge and got 2.6.17-rc1, then patched to -git9. I also set the timer frequency to 1000Hz (shouldn't have to do this, since 250Hz works perfectly on my IBM T42). I also made sure to enable the following:

CONFIG_IRQBALANCE=y
CONFIG_REGPARM=y

Maybe it was a combination of a couple things, but stuff started working. Every once and awhile I notice a small jitter here and there, which I don't think is normal, but the system feels much better, and SSH sessions are usable. wmnd External Content doesn't seem too happy, but I don't care right now. Grab my kernel .config here.