Installing Debian 4.0 (Etch) on a ThinkPad T42

From ThinkWiki
Jump to: navigation, search

The machine

Got a used T42 from craigslist:

  • Intel Pentium M 1.70GHz
  • 500M RAM
  • Fujitsu MHT 2040AH HD (35G)
  • 1024x768 LCD panel
  • CDRW/DVD combo: HL-DT-ST RW/DVD
  • ATI Mobility Radeon 7500
  • Intel PRO/Wireless 2200BG
  • BIOS version 3.23

Installation

I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version). I had to do the install over ethernet, as the wireless driver needs some extra work (see below). It went very smoothly -- only had to answer one relevant question:

  • uswsusp didn't find active swap partition -> I told it not to continue, and did # aptitude reinstall uswsusp after installation and it worked fine.

Post-install, gnome automatically popped up an kernel update, which applied fine.

... and with this, most everything works! This is much easier than it used to be. There were enough remaining issues to consume some hours, though:

Wireless

Different T42 models have different wireless cards -- but this card, the Intel PRO/Wireless 2200BG, needs the ipw2200 driver, and the associated firmware. So:

   # aptitude install ipw2200-modules-2.6-686

Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to /lib/firmware -- crossing my fingers a bit, since nowhere could I find confirmation that the ipw2200 driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.

NetworkManager, which installed by default, is taking care of all the networking whatnot just fine. I added two files to make it work with sleep and hibernate:

in /etc/acpi/suspend.d/07-network-manager.sh:

   #!/bin/sh
   /etc/dbus-1/event.d/25NetworkManager stop

and in /etc/acpi/suspend.d/63-network-manager.sh:

   #!/bin/sh
   /etc/dbus-1/event.d/25NetworkManager start
TODO
although I haven't tested if creating these files is necessary. You could try without.

Sleep and Hibernate

Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line. As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything. So, this is what I did, hope it helps. First, installed tpb; and then added the ibm_acpi and nvram to the list of modules to be loaded at boot time:

  # aptitude install tpb
  # echo "ibm_acpi" >>/etc/modules
  # echo "nvram" >>/etc/modules

... at which point neither sleep nor hibernate did anything. As others have found, this is because both /etc/acpi/events/ibm-sleepbtn and /etc/acpi/events/ibm-hibernatebtn use acpi_fakekey, which isn't set up to do anything. The easy fix is to change /etc/acpi/events/ibm-sleepbtn to:

   event=ibm/hotkey HKEY 00000080 00001004
   action=/etc/acpi/sleep.sh force

and to change /etc/acpi/events/ibm-hibernatebtn to:

   event=ibm/hotkey HKEY 00000080 00001004
   action=/etc/acpi/hibernate.sh

The force option in ibm-sleepbtn is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.

At this point the sleep button worked, and the hibernate button did something -- namely, induced a kernel panic. After some investigation, it turned out that this was coming from the modules-unload script in /etc/acpi/suspend.d -- and, indeed, doing simply # modprobe -r e1000 caused the machine to hang. Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload e1000 and ipw2200, even if they are added to MODULES_WHITELIST in /etc/default/acpi-support.

Help needed
Any ideas why MODULES_WHITELIST doesn't work?

Perhaps the best thing to do about this would be to compile a new kernel with the newest version of e1000? Instead, since everything seems to work fine without unloading any modules, I just turned off the modules-unload script by doing this:

   # mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off

Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.

CPU Frequency Scaling

I've found the gnome CPU frequency scaling monitor to be useful, to see if things are working. This was installed by default; to view it, right-click on the panel and follow Add to panel.... To get it to work, it needs to be installed SUID root. I had to do:

  # dpkg-reconfigure gnome-applets

and answer *yes*. (*note:* you should probably pay attention to the warning it gives!)

This page says that the acpi-cpufreq module is the best one. This doesn't work on my system; rather, I've used the speedstep-centrino module. So, if the following modules aren't already loaded by default, the /etc/modules file should also have the following lines:

  battery
  ac
  thermal
  processor
  speedstep-centrino
  cpufreq_conservative
  cpufreq_ondemand
  cpufreq_userspace
  cpufreq_powersave
  cpufreq_stats

To set your default, you can edit /etc/default/cpufreq. Mine looks like:

  ENABLE="true"
  GOVERNOR="conservative"
  MAX_SPEED=1700000
  MIN_SPEED=600000

As mentioned in this page, I also changed my BIOS settings to "maximum performance".

The CRT/LCD hotkey and a Projector

Initially, the Fn-F7 key did nothing -- and neither did # echo -n 'video_switch' > /proc/acpi/ibm/video. However, adding the line

   Option "BIOSHotkeys" "on"

to the Device section of /etc/X11/xorg.conf seems to have done the trick -- after a hard reboot. I need to use this for a bit longer, but it seems like it'll keep working.

To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back. It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen. To fix this, I did the easiest thing, which was to add the line

   Option          "MonitorLayout" "LVDS,NONE"

also to the Device section of /etc/X11/xorg.conf.