Debian/GNU Linux on IBM X30

Everything I've tested works, or can be made to work. The internal 802.11b NIC has a firmware bug, but the wlan-ng driver can compensate if configured correctly. I haven't tried the modem or IR.

Also see these other pages about Linux on the X30:

What follows are some notes from my experiences setting up Debian/GNU Linux on an IBM X30 laptop. In many cases, this won't be a full tutorial on how to install linux, nor specific to Debian, but it should give you the information you need that's specific to this laptop. I built a 2.4.20 kernel because I already had the source lying around, but it's possible that everything you need exists in older versions.

Getting started [link to here]

One of the challenges of installing Linux on an IBM X30 is that it doesn't come with a floppy drive or a CD drive. If you bought one, by all means go ahead and use it. If you have access to a USB CD drive, you can boot off that, and that's probably the easiest way to get going. You may also be able to boot off PCMCIA or CF.

I didn't have any of those things when I started, but I did have a USB hard drive enclosure and other machines already running Linux, so I removed the hard drive from the laptop, put it in the enclosure, and did most of the install from my desktop machine, following the instructions from the Debian Installation Manual. I eventually did boot from a CD in order to run lilo while the disk was /dev/hda instead of /dev/sda (which is what USB makes it show up as).

Partitions [link to here]

Partitions as shipped

As shipped by IBM, the disk has two partitions: a FAT32 partition that contains everything you see when you run windows, and a hidden FAT32 partition that you can use to repair and reinstall windows if anything goes wrong with the main partition. (Handy for people who don't have a CD drive.)

Disk /dev/hda: 240 heads, 63 sectors, 6201 cylinders
Units = cylinders of 15120 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      4983  37671448+   c  Win95 FAT32 (LBA)
/dev/hda2          4984      5168   1398600   1c  Hidden Win95 FAT32 (LBA)

For some reason, fdisk reported the number of cylinders incorrectly. There are really 5168, not 6201. I don't know what caused the error. At first, I thought there was some unused space on the disk for some reason, and fdisk happily let me create partitions that extended to cylinder 6201. Reality kicked in when I tried to format it.

Leave the second partition intact if you want to be able to reinstall everything without using a CD. I'm told that IBM will send you a free floppy and CD that contains the same stuff, so if you don't need to recover from that hidden partition, you can use that space for something else.


Hibernation is when the laptop saves its state to disk, shuts off completely, and can restore the state later from disk. Here's how I'm told hibernation works on this laptop: the BIOS searches for a Win95 partition with a certain file in a certain place, and saves the state in that file. If there is no Win95 partition with the right file, the laptop will just beep when you press the hibernate button.

I decided not to bother setting up hibernation.

Partitions as I made them

Disk /dev/hda: 240 heads, 63 sectors, 6201 cylinders
Units = cylinders of 15120 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        70    529168+  83  Linux
/dev/hda2            71       140    529200   82  Linux swap
/dev/hda3           141      6201  45821160   83  Linux

Ethernet [link to here]

I built the eepro100 driver into the kernel with these options:


The alternate e100 driver (from Intel) might also work, but I haven't tried it.

802.11b wireless NIC [link to here]

There are a few different configurations of the X30 ThinkPad, and I got the one with Intel 802.11b built in. Setting it up was a bit of a pain, mostly because I didn't know what I was doing. Hopefully you'll be able to avoid some of the hassle.

The orinoco_pci driver in the 2.4.20 kernel supports the Prism2 chipset, but not well enough. I was able to use it for low bandwidth activity (ssh, typing), but it choked badly on file transfers. (Perhaps this is due to the WEP firmware bug.) Instead, I'm using the wlan-ng prism2_pci driver, which works much better.

The configuration notes are for linux-wlan-ng 0.1.15. 0.2.0 is out (and in Sarge), and, according to the change list, the configuration scripts have changed significantly, so be careful in applying anything you learn from my notes. I'm told it just works now (though you'll definitely want to enable host-based WEP, as described below).

You can use the linux-wlan-ng Debian package for the utility programs, but don't count on being able to use the scripts in /etc/network. They didn't work for me. I deleted those, and instead installed the rc and conf files that the Debian package included in /usr/share/doc/linux-wlan-ng/examples. I have this script in /etc/network/if-pre-up.d/wlan:

case $IFACE in
	/etc/init.d/wlan start

And I have the complementary stop script in /etc/network/if-post-down.d/wlan. With those in place, I can ifup wlan0 and ifdown wlan0 and all the right things happen.

All the right things except surviving sleep, but that's fixed by stopping the wlan device just a bit before sleep and bringing it back up after. I have the following script at /etc/apm/suspend.d/wlan, and its complement at /etc/apm/resume.d/wlan:

if `grep -q wlan0 /etc/network/ifstate`; then
  echo "Stopping wlan0"
  /etc/init.d/wlan stop

There's a WEP handling bug in the firmware, and IBM hasn't released an update yet. (It causes the wireless NIC to freeze up during heavy use. The only way I've found to recover is to restart the interface.) Presumably, IBM will release an update eventually, but in the meantime, the driver can do WEP itself in softwar. Just set these variables in your configuration:


USB [link to here]

Nothing tricky here. Be sure to enable the appropriate SCSI support if you want to be able to use USB storage devices.


Bluetooth [link to here]

Bluetooth is an option with the X30, so you may not have it. I do, and, and it works just fine with Linux. It works via USB, so at the very least, you'll need:


There's a Bluetooth button (just below the screen), and when you press it, Linux registers (or deregisters) new USB devices.

Audio [link to here]

The audio chipset is supported by the AC97 driver (which in turn uses i810). The kernel coniguration in question:


The module to load is ac97_codec.

The built in speaker is surprisingly decent for something that small. The volume control buttons (up, down, mute) work independently of the OS.

APM [link to here]

Works fine. No surprises.

X Windows [link to here]

This chipset (Intel 82830) is supported in XFree86 4.2, but is not supported by 4.1. Make sure you have version 4.2 or later.

The goofy extra cursor keys generate unique keycodes, so you can map them to whatever you like. The ThinkPad button doesn't generate an X event, but it does change the state of nvram. The tpb package provides a convenient way of binding a command to that button. Be sure to enable kernel support for the nvram character device.

Eventually I'll stick my XF86Config-4 file up here, but I'd rather just get this posted quickly. If you're having trouble with the configuration, feel free to drop me a line.

Getting or Building XFree86 4.2

Debian Woody (the stable version as I'm writing this) has 4.1, so if you want to stick with Woody, you'll need to either grab the packages from Sarge (and their dependencies) or build it yourself. To build the full installation yourself, you'll need the following packages (some of which are unnecessary if you can figure out how to avoid building modules you know you don't need):

It's probably easier to grab the packages from Sarge, since they don't depend on much. I built them myself, but I'm funny that way.

Modem [link to here]

I haven't actually tried to get the modem working, but from a little digging around and talking to someone else who is working on this more than I am, I did learn a few things about it:

Raw Data [link to here]


00:00.0 Host bridge: Intel Corp.: Unknown device 3575 (rev 04)
00:02.0 VGA compatible controller: Intel Corp.: Unknown device 3577 (rev 04)
00:02.1 Display controller: Intel Corp.: Unknown device 3577
00:1d.0 USB Controller: Intel Corp.: Unknown device 2482 (rev 02)
00:1d.1 USB Controller: Intel Corp.: Unknown device 2484 (rev 02)
00:1d.2 USB Controller: Intel Corp.: Unknown device 2487 (rev 02)
00:1e.0 PCI bridge: Intel Corp. 82820 820 (Camino 2) Chipset PCI (-M) (rev 42)
00:1f.0 ISA bridge: Intel Corp.: Unknown device 248c (rev 02)
00:1f.1 IDE interface: Intel Corp.: Unknown device 248a (rev 02)
00:1f.3 SMBus: Intel Corp.: Unknown device 2483 (rev 02)
00:1f.5 Multimedia audio controller: Intel Corp. AC'97 Audio Controller (rev 02)
00:1f.6 Modem: Intel Corp.: Unknown device 2486 (rev 02)
01:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev a8)
01:00.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev a8)
01:00.2 FireWire (IEEE 1394): Ricoh Co Ltd: Unknown device 0552
01:02.0 Network controller: Harris Semiconductor: Unknown device 3873 (rev 01)
01:08.0 Ethernet controller: Intel Corp. 82801CAM (ICH3) Chipset Ethernet Controller (rev 42)

Lingering Problems, Updates [link to here]