Slackware GNU/Linux on a Lenovo Thinkpad Z60m

Geoffrey Buchan, 7 January 2006
geoffrey dot buchan at gmail dot com

As a Christmas present for my wife, I picked up a Thinkpad Z60m, a wide-screen laptop from Lenovo (formerly IBM). I've owned other Thinkpads before and been quite pleased with their overall quality and GNU/Linux friendliness, and I hoped that would continue under Lenovo.

Hardware

The model number is 2529E3U. Some of the relevant specifications:

Repartitioning the Hard Drive

Out of the box, this laptop was divided into two partitions, a 35 GB one holding Windows XP Professional, and a 4.5 GB recovery partition. I was originally planning on trying out Ubuntu on this laptop, and I downloaded a CD and tried to burn it.  Things seemed okay - I was able to use the partitioning utility to repartition the hard drive, leaving over 10 GB for Windows, and dividing the rest up for Linux. This was easy enough for me, but the CD I burned apparently had some bad sectors, as the Ubuntu install kept stalling. So I abandoned trying to install Ubuntu and loaded Slackware 10.2 instead. When I had installed older versions of Slackware, I booted in Windows and used Partition Magic to repartition. That step was no longer necessary!

Slackware 10.2 Installation

I like the simplicity of Slackware's installer. It may not be graphical, but I find it quite simple and straightforward. I answered a few simple questions, let it rip, and then about a half hour later I had a working install. The Slackware install does not directly repartition, but luckily I had done that already with my broken Ubuntu disk.

Adding A Gnome Desktop

I like using Gnome on the desktop, so my next step was to install Freerock Gnome. I had an ISO downloaded already, so I simply copied that to the new machine and mounted it locally as a loop device. The Freerock installer is quite simple also, leaving me with a functional Gnome desktop after about 15 more minutes of installing.

Customizing the Kernel

Because I love watching compiles speed by on my computer, I like to build my own kernels. So I downloaded kernel 2.6.14.4 and built my own. My kernel configuration is here. Some particular options for my hardware:
Device
Kernel Flag
Notes
Gigabit Ethernet
CONFIG_TIGON3

Wireless Ethernet
CONFIG_IPW2200
Must enable CONFIG_IEEE80211
Audio Controller
CONFIG_SND_HDA_INTEL

Video
CONFIG_DRM_I915
Must enable CONFIG_DRM
Audio
CONFIG_SND_HDA_INTEL


ACPI Power Management

ACPI works well enough, too. I had previously used just APM on older laptops and found that worked well. But the Z60 wanted to use ACPI, so I read up a little on how to set it up to suspend, resume, etc.

Like many thinkpads, the Z60 needs a special kernel option at boot time so that it resumes properly, so I added this line to my lilo.conf file just after the image: append="acpi_sleep=s3_bios"

To get suspend to RAM to work, you need a sleep.sh script and you need to create event files to kick off the sleep script. That proved simple enough to do. My sleep.sh script is kicked off either by the sleep event or the lid event. The event files live in /etc/acpi/events, and sleep.sh lives in /etc/acpi/actions.

ALSA Sound Configuration

The modules load happily with the kernel configuration. I'm still a novice with ALSA, though, so I'm a little slow on how to get it working. I found this page useful to remind me not to unmute everything in alsamixer. I do here a little crackling in the audio sometimes, so I may not have things configured perfectly yet. But the basic sounds work, so I'm happy enough for now...

Wireless Ethernet

This Z60m has the Intel ProWireless 2915 a/b/g device, which is supported by the ipw2200 driver.  Version 1.0.0 of this driver is now part of the main kernel source tree, too, which is nice. I used to have to manually recompile the driver after every kernel build, and now that's not necessary if you use the kernel driver instead of the latest from sourceforge. To get either driver to work, you need to install the appropriate firmware in (on Slackware) /lib/firmware. As of this writing, the kernel driver uses firmware v2.2, whereas the 1.0.8 version from sourceforge, the latest as of this writing, uses the firmware v2.4. If you don't have the matching firmware, the modules will load, but you won't see an ethernet device with iwconfig or ifconfig.
Other versions of this laptop apparently have the Atheros a/b/g card, for which you would need the madwifi driver. lspci should identify which one you have.

Note: Version 1.0.0 of the ipw2200 driver driver does not support monitoring mode or capture, so if you use Kismet or some similar program to scan for wireless networks, you should use the latest driver from sourceforge instead of the kernel driver included in kernel 2.6.14.

Warning: there is actually a physical hardware off button for the wireless radio, located on the lower left of the front of the machine. I inadvertantly switched this off (perhaps confusing it for a second lid latch, as used to be the standard for older thinkpads), and then my wireless didn't work. I spent quite some time trying to configure my wireless settings before I realized why I was not getting any connection.

Wide Screen Resolution - i915 Driver at 1280x800

This is what I found hardest to get working. Initially I had a workable X configuration, but at 1024x768 resolution, the same as on my 12" X40. Since I spent an extra money to get a model that supported higher resolution, I needed to get this working. I kept trying variants of other xorg.conf files I found on the web, but with no success. Every time I tried to use the i810 driver instead of the vesa driver in my xorg.conf, X would not start, giving me an error like this:
"No matching Device section for instance (BusID PCI:0:2:1) found"
And if I used the vesa driver, the best I could get was 1024x768 resolution.

What eventually got this working for me was compiling and building the Direct Rendering Infrastructure from freedesktop.org. I downloaded their drivers, both the common-20051220 and the i915-20051220 links from here and built them. This time, rather than seeing the "No matching Device..." error, I got an error about a driver minor version mismatch. The error was a little confusing (it said something about a 7 minor  version with an 8 server, or vice-versa), but the solution to that was to upgrade my Xorg server from 6.8.2 to 6.9 RC1. I followed the instructions here, and I then had a nicely working X server at wide screen resolution. At last! This is my xorg.conf file.

Wide Screen Console

Special thanks to Mario Pascucci, whose page was the first I saw about running GNU/Linux on the Z60. There I found the nice trick to getting a 160x48 text console: setting vga = 0x368 in my lilo.conf file. Mario's page is in Italian. I took a year of Italian in college 15 years ago, so I'm a little rusty there. But I was able to read enough to find some useful pointers. The wide console is great for comparing files with vimdiff when you don't have an X server running.

USB

USB worked without any additional configuration. I plugged in a memory stick, and Gnome auto-mounted it and opened a Nautilus window of its contents. One thing to be aware of: if the USB modules stay loaded when you suspend to RAM, they don't work properly after a resume. The simple solution to this is to unload the modules in your sleep.sh script, and then reload them on wakeup.

Not Yet Tested

Other Z60 Pages

I found few pages on the web specifically about installing Linux on the Z60. They are:
I also stumbled across www.thinkwiki.org, which looks like it may become quite a nice resource for Thinkpad users.

Version History


Version
Date
Comment
1.0
1 January 2006
Initial version
1.1
7 January 2006
Noted that the 2.6.14.4 kernel version of the ipw2200 driver does not support monitor mode.
Added reminder about wireless radio hardware switch on front left of the laptop.
1.2
12 January 2006
Added contact e-mail

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones2006-01-12