Running Fedora Core 6 on the Lenovo T60

Linux On Laptops

This document describes how I installed and configured Fedora Core 6 on a Lenovo T60 (2623). Please send me an email at sam@tregar.com if you find a problem with these instructions or have some advice for me.

Changelog

System Configuration

My T60 came with:

  - Core Duo T2500 processor (2Ghz)
  - 1GB of RAM
  - 100GB SATA drive
  - CDRW/DVD drive
  - ATI X1400 video chip
  - Intel 3945ABG wifi

Repartition

I wanted to keep Windows accessible, so I needed to shrink the existing NTFS partition. First I uninstalled things I didn't want and ran the disk defragmenter from within Windows to clear out as much space as possible. Then I burned a CD from

  http://sysresccd.org

using whatever is setup to open .iso files in Windows by default (another T60 guide mentioned needing Nero, which I don't think is necessary). I rebooted with the new CD in the drive and Linux booted successfully.

I first tried resizing with parted but it lacks NTFS support. Despite its similar name it seems GParted doesn't share this limitation, but you need X-Windows to run it.

I hit a snag trying to start X-windows, which I solved by editing /etc/X11/xorg.conf, replacing the ``ati'' driver with ``vesa''. After that I loaded X with ``startx'' and used GParted to shrink NTFS down to 12GB and remove the 4GB hidden restore partition. NOTE: if you do this you won't be able to use the ThinkVantage restore option!

Fedora 6 Install

Graphical install loaded fine. Install finished with no problems.

Fix Your Kernel

Fedora 6 has a bug where it will sometimes install a kernel for the wrong architecture (i586 instead of i686). You can find out if this happened using:

  rpm -qa 'kernel*' --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n"|sort

If you see i586 there then follow these instructions to fix the problem:

  http://fedoraproject.org/wiki/Bugs/FC6Common#head-e0676100ebd965b92fbaa7111097983a3822f143

Yum Setup

After the install finished I setup yum with the instructions from the Unofficial Fedora FAQ (which is a great resource for all manner of Fedora questions):

  http://www.fedorafaq.org/#installsoftware

Then I did a ``yum update'' to get all the latest Fedora 6 updates. I have no idea why, but this took a lot of work to get running. I eventually had to rebuild my RPM DB:

  # rm /var/lib/rpm/__db*
  # rpm --rebuilddb
  # yum clean all

After that ``yum update'' cooperated, and after 850MB of updates I rebooted and all was well.

System Configuration

I used the Service Configuration app in Gnome (System -> Administration -> Server Settings -> Services) to trim things I don't need. I also enabled NetworkManager and NetworkManagerDispatcher, which I learned to love in FC5.

ATI Driver Installation

The default Fedora 6 install doesn't support the X1400 graphics chip and uses the fallback ``vesa'' X driver, which is very slow and lacks important features. To address this I installed the ATI drivers, following the instructions here:

  http://www.fedorafaq.org/#radeon

When I started the first step I noticed it wanted to do a kernel upgrade to switch to a non-Xen kernel, so I stopped it and did that step first:

  yum install kernel-2.6.20-1.2933.fc6

I then rebooted and resumed the driver install. I don't know that this was necessary but it seems wise - better to test the kernel upgrade in isolation first than to combine it with a driver change. I had to manually make the new kernel the default in grub.conf.

I found that step 7. didn't work for me - the program it says to run (ati-fglrx-config-display) didn't exist. But I did find that my xorg.conf was already modified, so perhaps it's not important. I did add the work-around for Intel motherboards, not sure if it's really needed or not.

X started up ok after that, but that didn't immediately give me 3D support. I had to add these sections to my xorg.conf:

    Section "Module"
            Load  "bitmap"
            Load  "dbe"
            Load  "ddc"
            Load  "dri"
            Load  "evdev"
            Load  "extmod"
            Load  "freetype"
            Load  "glx"
            Load  "int10"
            Load  "record"
            Load  "type1"
            Load  "vbe"
    EndSection
    Section "Extensions"
      Option "Composite" "Disable"
    EndSection

After that glxgears showed the expected improvement. It's a shame that I had to disable Composite since that means no fancy eye-candy, but perhaps it will work in a later ATI driver release.

Video played fine in Xine with the power connected, but running on battery playback would stutter. To fix this I edited:

  /etc/acpi/actions/ati-powermode.sh

Changing:

  su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"

To:

  su $user -c "/usr/bin/aticonfig --set-powerstate=2 --effective=now"

Wireless Driver Install

I was unable to find a ipw3945 RPM for my kernel (2.6.20-1.2933.fc6), but I've since been told that it is possible. Here's the trick, which makes yum pick the right kernel for the ieee80211 package:

  yum --enablerepo=atrpms install ieee80211-kmdl-`uname -r`
  yum --enablerepo=atrpms install ipw3945 ipw3945-ucode ieee80211

Since I haven't tried this myself, I'll keep my method in place in case this doesn't work for anyone.

I followed the (convoluted) instructions here to build the module from scratch:

  http://ipw3945.sourceforge.net/INSTALL

Then I needed to find a way to get the ipw3945d daemon to startup. The modprobe.conf lines in INSTALL didn't do it, but the /etc/init.d/wireless script here did:

  http://statgen.ncsu.edu/~jdstarme/fc5_on_t60.txt

After that NetworkManager worked fine.

As a side note - the wireless switch on the front of the laptop seems to work fine with Linux. The connection even comes back ok if you switch it off and then on again.

Thinkpad Buttons

I installed the tpb package to get the extra keys on the keyboard to work and display status on the screen:

  yum install tpb

Then rebooted. After the reboot the volume keys show their status on the screen.

Kill the Noise!

Like many Core Duo laptops, my T60 emits a high-pitched squeal when on battery power. Way more than you ever wanted to know:

  http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises

The fix is to simply disable the noisy power-saving modes:

  echo 2 > /sys/module/processor/parameters/max_cstate

Since this will cause the CPUs to use more power I decided not to set this up to run in /etc/rc.d/local. Instead I setup a button in Gnome I can push to quiet the beast when it bothers me. I'll only need to use it in exceptionally quiet rooms, I think.

Don't Stop The Beats

If you disable the modem in the BIOS, sound will stop working. So don't do that.

Tuning Up the TrackPoint

The trackpoint isn't fast enough for me by default and Gnome's mouse controls seem to only affect the trackpad. To speed it up I put these lines in /etc/rc.d/rc.local:

  echo "Setting TrackPoint parameters..."
  echo -n 190 > /sys/devices/platform/i8042/serio1/serio2/sensitivity
  echo -n 225 > /sys/devices/platform/i8042/serio1/serio2/speed

The allowed values are 1-255. There are more options, fully documented here:

  http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

Suspend

Rumor has it that suspend-to-memory works on the T60. It worked once for me and another time caused the machine to lockup when restoring. I haven't had time to play with it further.

External LCD Setup

I use an external LCD at work, so I needed a way to switch from the laptop's panel to the LCD. To make things interesting, the external LCD is a different resolution from the laptop - 1280x1024 versus 1400x1050. To make things really interesting, I use an external mouse when I'm at work and it needs its buttons remapped to be usable!

I started with the standard dual-head setup that aticonfig sets-up when you do:

  aticonfig --initial=dual-head

Then I wrote a script to do all the magic:

    #!/usr/bin/perl -w
    # figure out which state we're in
    $out = `aticonfig --query-monitor`;
    ($monitor) = $out =~ /Enabled monitors: (\S+)/;
    if ($monitor eq "crt1") {
        print "Switching to laptop panel...\n";
        system('aticonfig --enable-monitor=lvds');
        system('xrandr -s 1400x1050');
        system('xsetpointer "<default pointer>"');
        system('xmodmap -e "pointer = 1 2 3 4 5 6 7 8 9"');
    } else {
        print "Switching to external LCD...\n";
        system('aticonfig --enable-monitor=crt1');
        system('xrandr -s 1280x1024');
        system('xsetpointer "<default pointer>"');
        system('xmodmap -e "pointer = 1 6 2 7 8 4 5 3 9"');
    }

I bound script that to an icon in Gnome and now I can press a button and switch screens.