Free Agent: Linux on Your Lap

Today's Best Tech Deals

Picked by PCWorld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

It rained the other night. I sat in my living room, by the fire, with my feet up, eating Grandma's delicious Christmas krumkake and watching Groundhog Day, which I had not seen since it first came out. When Chris Elliott appeared on screen, I thought to myself, "This must be the best movie that weasel has been in." I pulled my Wi-Fi-enabled ThinkPad onto my lap, booted Linux, opened Galeon, called up the Internet Movie Database, and discovered that I was right. Isn't 21st-century technology a hoot?

Linux can be a dream to use on a laptop; but unless you're lucky enough to get a machine that has the OS preinstalled and preconfigured (like the units at Emperor Linux, which make me drool), you're probably in for some blood, sweat, and tears before you reach nirvana. In my case, everything worked out, due mainly to research I conducted before making a purchase, and more research after my new toy arrived. As I've said before, Google is a Linux user's best friend.

Choosing a Notebook

The story began when, as a holiday gift to myself, I purchased a refurbished IBM ThinkPad X30. (Shopping tip: IBM sells refurbished ThinkPads directly on EBay.) I didn't need top-notch performance, so I went with this year-old model rather than paying a premium for a brand-new machine. I chose a ThinkPad after a few hours of reading at Linux on Laptops, a site you should definitely check out before committing to any notebook you're hoping to run Linux on.

I discovered that ThinkPads tend to be very Linux-friendly, and if you choose a model that's a year out of date (like mine), then other folks have probably blazed a trail for you, doing all the hard work of figuring out how to get every last component of the system talking to Linux.

I'm a fan of the Mandrake Linux distribution, so I let Mandrake's installer have a go at everything first. Lo and behold, the installation went very well. The graphics and sound, the internal network adapter, the DVD drive in the docking station--the software detected and configured everything I needed to get up and running. (An exception: the machine's internal WinModem, which requires a third-party binary-only driver. That's okay; dial-up makes me feel sick anyhow.) Less than an hour after feeding Mandrake discs to my ThinkPad for the first time, I successfully logged into Linux.

And then I started noticing the things that didn't work.

The Real Work Begins

One of the great things about laptops is their ability to hibernate, meaning that the full contents of RAM are written out to the hard drive before the machine powers down. When power returns, the slumbering data is copied back into RAM, and you pick up where you left off, skipping the boot process. My ThinkPad came with Windows XP, which has its own hibernation routines built in. When you press the ThinkPad's magic Fn-F12 key combo, XP leaps into action, does a little dance, and the machine goes into hibernation.

Not so in Linux. I pressed Fn-F12 and the ThinkPad made a strange sort of beep that sounded sad. It didn't know what to do. Linux developers have been working on hibernation support for some time; it is stable for the 2.4 kernel series that the major distributions currently use. But because hibernation support isn't part of the standard kernel, your distribution of choice may not include it--mine doesn't, and I didn't feel like trying to compile and configure hibernation support myself. Then I noticed several postings at Linux on Laptops indicating my ThinkPad's BIOS has its own hibernation routines that can step in and do the job as long as things are set up right.

Alas, this took some trial and error; none of the walk-throughs I found online were entirely accurate. Turns out I had to create a small FAT16 partition (just large enough to store the contents of 256MB of RAM), set it as a hidden partition, and then use a tiny utility called tphdisk (tossed together by a very kind hacker) to create a hibernation file on that partition.

So I got all that done, rebooted, logged back in, and pressed Fn-F12. Bingo: A truly horrible, 1980s-era text-mode page appeared on the screen, informing me that hibernation was underway. A few seconds later, the machine powered off. When I turned it back on, there was the nasty BIOS hibernation screen again, letting me know it was cranking Linux back up. A few seconds later it was gone and there was my Gnome desktop again. Success! It's ugly, but it works like a charm.

Turning Up the Volume

I crossed hibernation off my get-these-things-working list and moved on to the next annoyance. The X30's keyboard is topped by volume and mute buttons, plus a special ThinkPad button that launches an IBM Help application if you're running XP. The former worked fine in Linux, but there was no on-screen indication that the volume level was changing. The ThinkPad button did nothing, of course. A keystroke-capturing app showed that Linux didn't even know it was there.

Sometimes these things are easy to fix. Searching Google with "thinkpad button linux" turned up a utility called TPB that not only activates the ThinkPad key but also provides on-screen indicators when volume or brightness controls are futzed with. A copy of TPB has already been compiled and made available for Mandrake 9.2, so issuing a simple

urpmi tpb
from the command line downloaded and installed the software automatically. (Mandrake's graphical Software Manager can do the job, too, but I like using the command line.) Once I had TPB installed, things started to feel comfy.

Going Wireless

Only one hurdle remained: I needed to teach Linux how to pull the Internet out of the air. My X30 does not have built-in Wi-Fi support, so I needed a Wi-Fi adapter. After more Google searches, I learned that Linux does not support all the snazzy new 802.11g wireless cards. I went with a Linksys WPC55AG, which is based on the Atheros Wi-Fi chip set. That chip set is supported under Linux by the Madwifi driver.

Mandrake doesn't provide a graphical user interface for configuring wireless adapters. A command-line tool provides information on current settings and lets you change those settings on the fly; editing a simple text file alters the default settings.
Mandrake doesn't provide a graphical user interface for configuring wireless adapters. A command-line tool provides information on current settings and lets you change those settings on the fly; editing a simple text file alters the default settings.
I downloaded and installed Madwifi without a hitch. Configuring the wireless card--telling it what to connect to and such--isn't a nice GUI-based walk in the park the way that it is under Windows: I had to use the
command to tell Linux what network the card should connect to, what my WEP key is, and so forth. Once I got the connection working, I made the magic settings my defaults by editing a text file called ifcfg-ath0. (One of the joys of Linux is that nearly all system configuration information is stored in simple text files, readable and editable by mere mortals.)

Sooner or later, GUI-based configurators for wireless devices will start appearing in the various distributions. Until then, the command line and a text editor get the job done. This is the way cutting-edge stuff tends to work in Linux: The hardcore programmer geeks get their hands on something and write a bunch of new code to support it. Folks start using that code. Those early adopters are also beta testers. Once the code is debugged and stable, then a completely different sort of geek--with any luck, a professional who understands good user-interface principles--comes along to write a friendly graphical front-end for the new code.

Windows XP offers configuration dialogs for wireless adapters. Someday, your Linux distribution of choice will probably follow suit.
Windows XP offers configuration dialogs for wireless adapters. Someday, your Linux distribution of choice will probably follow suit.
When I first started using Linux five years ago, there were no nice wizards for connecting to your ISP or setting up an Internet gateway. Now there are. We're not there yet on the Wi-Fi front; but we will be, all in good time.

Right now, the few hardware vendors that provide drivers and configuration utilities for Linux make you search for them on their support site. Perhaps someday vendors will instead bundle such niceties with their hardware, as they do for Windows users. Wouldn't that be something?

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon