Linux, Debian Woody, and the IBM Thinkpad 570

Contents


System Specs

The laptop I'm using isn't even mine, but is on loan from LBNL, for me to use as part of my work with the Supernova Cosmology Project. As such, I probably won't have this laptop for long, and this page will become completely unmaintained....

  • Intel PII 365MHz, 256KB cache (729 BogoMIPS)
  • 192MB RAM
  • 6GB Hard Drive
  • Two Type-II or one Type-III PCMCIA slot
  • Two USB ports
  • Special port for external floppy drive (which I do have)
  • Parallel, Serial, and VGA ports
  • WinModem/LinModem
  • NeoMagic 256AV Video with 2.5MB of Video RAM
  • 1024x768 16bit display on the internal screen (or 24-bit unaccelerated)
  • cs4614/22/24 sound controller
  • Pathetic battery life. (We're talking 20 minutes or so here. But this laptop is a few years old at this point, so the battery is probably not what it once was.)

Installing Woody

This went pretty much without a hitch. I first partitioned my system into four different partitions, including an 0.5GB swap partition, an 0.5GB / partition, a 3GB /usr partition, and a 2GB /home partition. This was more than sufficient; once I had most of what I wanted installed, the /usr partition only had about 1.8GB used. No space was left on the drive for any other less useful operating system.

Installation started through the six Debian floppies (I used the bf2.4 series), using the external floppy drive which is a separate unit that plugs into the back of the laptop. The Debian installer got itself a working PCMCIA system from those floppies, at which point I could do the rest of the install through my PCMCIA ethernet card. Everything went without trouble.


Performance

This is a mostly trouble-free laptop which supports Linux well.

Video/XFree86

I didn't use any Debian XFree86 config tool, because I already had a pre-existing XF86Config-4 file for this laptop left over from when I used to run RedHat 7.3 on it. Here is the XF86Config-4 file I'm currently using, if you want to mine it for relevant sections.

I frequently use this laptop for OpenOffice.org presentations in a class I teach, and in other talks. It pretty much works; Fn-F7 switches the screen display mode between the internal screen and an external VGA monitor. The projector I use supports a 1024x768 screen mode, so I don't have to do anything fancy. The one problem I have is that occasionally, when I've switched between X and the Linux console, the laptop gets into a mode where it refuses to switch monitor modes, and gets stuck in an internal screen only mode. The only solution I've found to this is to shutdown the system and power cycle the laptop; when the system comes back up, then I'm able to switch the monitor. This is annoying, of course, but I've learned to live with it.

I usually run a 16-bit display. The card will support a 24-bit display, but X doesn't have acceleration for it, so moving windows and so forth is slower. I have occasionally used this when I want nice smooth-looking gradients for backgrounds in my presentations. (Usually I just use a solid background, though.)

APM

This mostly works. I suspend manually by running apm -s as root; the system comes back up next time I open the laptop. It goes into some sort of lesser suspend mode automatically when I close the laptop.

Rarely, the machine refuses to come back from suspend mode. When that happens, I must power cycle. Even though this means all of the filesystems are "dirty", I've never had a serious problem from that. I use the ext3 journaling filesystem, so they recover themselves relatively quickly during reboot.

APM probes the battery level, but it's hopelessly optimistic. It starts telling me that there are more than 2 hours of power left, and that the battery is more than 80% full. That lasts for 20 minutes or so. Then, over the course of about a minute, the battery level that APM thinks it has drops from 80% to 5 or 10%, and the laptop starts beeping warnings. Mostly I just work with the thing plugged in. This laptop probably had better battery life when it was newer, but I wasn't using it myself back then.

Sound

No problem. The cs46xx.o driver in the standard kernel tree is all you need. I compile it in as a module. I haven't tried recording, but I can play samples and Ogg Vorbis files, which is all the more I've ever tried to do with sound on this laptop.

PCMCIA

Not much to say here; it started working early in the Woody install process, and hasn't stopped. The controller is an i82365.

USB

This also works without trouble (although I've only tried one device, a Compact Flash reader). I use the usb-uhci.o module, which is the one in the kernel that does not identify itself as the alternate driver.

(Other)

The IDE/ATA controller is an Intel PIIX4. If you build in the drivers, then DMA works. I don't know if it's something in the Debian startup, or merely that I told the kernel to use DMA by default when I built my kernel, but DMA seems to be enabled on this system without my having done anything fancy. Hard drive performance is acceptable if not impressive:

# /sbin/hdparm -T -t /dev/hda1

/dev/hda1:
 Timing buffer-cache reads:   128 MB in  1.46 seconds = 87.67 MB/sec
 Timing buffered disk reads:  64 MB in  6.77 seconds =  9.45 MB/sec
    

I think this laptop is also supposed to support IRDA, but to be honest I haven't even identified the location of the receiver.... I don't have any reason to use IRDA myself, and didn't even build it into my kernel. As such, I cannot comment on how well it works with Linux.


Compiling a Custom Kernel

I built a kernel from the standard linux-2.4.20 source, making a Debian package using the procedure described on this page. Note that in this case, I didn't need to compile ALSA into the kernel, as the standard cs46xx driver that comes with the kernel seems to work just fine for the sound card in this laptop.

Here is my kernel config file. It almost certainly won't work exactly as is for you, as I've just included the handful of PCMCIA and USB drivers that I care about; you may well have different cards and drivers that I didn't include into the kernel. Also, I didn't compile in any IRDA support, which you may want to try to play with. And, you may disagree with some of the other choices I made.

After the kernel was built, I grabbed the thinkpad-source deb:

apt-get -t stable install thinkpad-source

In /usr/src, I unpackaged (with tar zxvf) the file thinkpad.tar.gz. Then, back in the directory where I had compiled my kernel, I ran the command:

make-kpkg --revision 1 --append-to-version version modules_image

Where version was identical to what I used when building the kernel_image package. In the parent directory, this made me a thinkpad-modules....deb file. These modules are necessary to use the Thinkpad tools in the tpctl deb available as part of Woody. Once I'd made the kernel and the Thinkpad modules, I installed both debs on my Thinkpad 570. (I actually did the compilation on a slightly faster desktop machine, but could just as easily have done it on the TP570.)

For purposes of the (groan) LinModem, I also ran make-kpkg with the kernel_headers argument, getting myself a kernel-headers deb to install on my laptop. Once all the kernel packages were installed, I went to /lib/modules/VERSION (VERSION being 2.4.20whatever, where "whatever" was what I gave to --append-to-version). There, I ran:

ln -sf /usr/src/kernel-headers-VERSION build

so that the build link would be pointing to the right place to find the kernel headers on the laptop.

Reboot, and you should be running the new kernel.

The purpose of the Thinkpad modules was to be able to run the tpctl program (available from Debian in a package of that name). Maybe now I should read the docs on that to figure out just what power I've granted myself....


The LinModem

This laptop has a "WinModem" in it, identified as a Lucent/Agere DPS chipset modem (DEVICE 0x0448 – Mars 2 Global Board - data/fax/voice). (This information comes from the "scanmodem" program, part of the LinModem distribution discussed below.) While this modem is, sort of, supported under Linux, it's using the LinModem stuff which, alas, includes binary-only modules in addition to source modules. I really don't like having to resort to such things (and that is the reason I will buy ATI rather than NVidia video cards for desktops, since the former have open source 3D drivers). Indeed, in the past, I've used a PCMCIA hardware modem with this laptop. However, I decided to swallow my principles, sell out, kowtow to Bill Gates and the other sharks who would lock down all free thought into the offices of intellectual property lawyers, and try and get the stupid bloody binary-only modem driver to work.

This is for your edification, mind you. And think of it as a test. When this is working, will you still be principled enough to eschew this built in non-modem and go out and buy a PCMCIA modem which free software fully supports? I'm not sure I'm that pure myself, and it bothers me that I'm not....

Right. So once I'm done ranting and rationalizing, go to http://www.heby.de/ltmodem and download the ltmodem source archive. Unpack it, go into its top directory, and run "./build_deb". (Actually, I followed the recommendation and ran "./build_module" first, so I could see all of the verbose output.) When all is said and done, you should have a deb with the LinModem drivers in it (including the evil proprietary object modules). dpkg --install it, and then try that puppy out. Seems to work... seems faster than my 14.4K PCMCIA modem, too. Somewhere one of the packages linked /dev/modem to /dev/ttyLT0, the latter being the proper device for the LinModem. Well, there ya go. It works if you aren't a free software purist. If you are, then it's one more useless hole in the back of the laptop to be eschewed in favor of a PCMCIA modem. In any event, kudos to the LinModem people for getting this to work, even if it is unfortunate that there isn't a fully free solution.


Last modified: 2003-February-4, by Rob Knop