Mobile Computing with Linux
The perfect laptop is energy-efficient, lightweight, fast and upgradeable. These features are addressed in product reviews which abound in popular PC magazines. The product reviews are geared towards DOS/Windows users, and they tend to ignore hardware support issues which would arise in other environments. A valuable source of information for users about to purchase a Linux-capable laptop is the Linux Laptop Survey, which can be found in tsx-11:/pub/linux/ packages/laptops/laptop-survey. You will find over fifty entries describing make and model, disk size, processor, battery, screen types and general comments that come in handy. One highly overlooked issue addressed by the survey is that some laptops employ proprietary components, such as RAM modules which can only be upgraded by the original manufacturer. Other proprietary components to look out for are PCMCIA adaptor chips, sound support, and special displays.
There are many factors that determine how long your laptop will run tetherless, but probably the most important is the type of battery your laptop uses. A few years back NiCd (Nickel-Cadmium) batteries were the battery of choice for laptops. However, NiCd batteries do not recharge properly unless they are completely discharged, a behavior known as the memory problem.
Current generation laptops use batteries composed of NiMH (Nickel Metal Hydride) which do not have the NiCd memory problem and provide more energy. The next-generation battery beyond NiMH uses lithium-ion as its power source which provides even more energy.
Most modern laptops have a hot battery swapping feature, which allows you to replace a drained battery with a charged one while you are working without having to shutdown your system or lose data. If your laptop supports battery swapping, then it has a small internal battery that provides enough power to refresh the DRAM.
Some laptops can even replace their floppy drive with an additional battery, allowing you to operate your laptop for extended tetherless periods. Others allow you to add extra battery packs on the back, which have the added benefit of stabilizing your system when you try to hold it on your lap.
Advanced power management (APM) is a specification from Microsoft that allows the system software and the system BIOS to cooperate in reducing overall power consumption. Laptops that conform to the APM specification (i.e., their BIOS has APM) may use software support to increase battery life by reducing the power consumption of the system without degrading performance.
There are a myriad of x86 processors made by different vendors for laptops, marked with the SL acronym. These processors implement a set of system management mode (SMM) features to assist in power management, but Linux does not yet take advantage of them. Are these features worth their price, or are they simply a marketing ploy by the processor manufacturer? One argument in their favor is that the SL processors use 3.3-volt circuitry, which consumes less than half the power of traditional 5-volt systems. However, newer DX models (e.g., DX-4) also use 3.3-volt logic, so the value of a SL processor is questionable.
Hard disk storage capacity ranges between 80 and 340MB. Most modern laptops use second generation IDE drives which support various power management features such as spinning down and turning off unused components. By default, many laptops will automatically spin down the disk after some idle period when running off of the battery.
Flat panel displays drive the overall price of the laptop. There are different types of flat panel displays: active-matrix color, dual-scan passive-matrix color, and passive-matrix monochrome. Active matrix has the best color display, with immediate refreshes that yield a crisp picture. The down side of active matrix displays is that they are expensive, require more battery power, and add to the overall weight and size of the system. Also, unlike monochrome displays, active matrix displays are barely viewable in direct sunlight. The opposite extreme is passive matrix monochrome, with its low cost and low power requirements. However, it doesn't refresh the screen as nicely, is harder to read at an angle, and leaves streaks of former images (known as “ghosting”). If cost is a limiting factor, but color is required for your application, then dual-scan passive-matrix is a reasonable alternative.
There are a few potential problems with laptop displays. Some laptops may use new display chip sets that XFree86 does not fully support, resulting in very low resolution and/or unacceptably low speeds. Also, even more so than on desktop systems, the X-Windows setup of Xconfig has to be done with extreme care to avoid possible damage to LCD pixels. Pointing devices such as an external mouse, trackball, or EZ-point (IBM mini-joystick in the middle of the keyboard) are generally supported by Linux, since they usually emulate one of the popular mouse types. At the moment there is no support for pen input used on machines like the Compaq Concerto.
Personal Computer Memory Card International Association (PCMCIA) is a standards body for an IC card standard. The PCMCIA standard is becoming the form factor of choice in laptops and the PCMCIA devices released include modems, ethernet adaptors, radio LAN adaptors, radio alphanumeric pagers, hard drives, SCSI adaptors, multimedia, serial, parallel, GPS, and various types of memory cards.
Most modern laptops have PCMCIA support and use a PCMCIA adaptor chip provided by one of several vendors. The most commonly found adaptor chips are the Intel 82365 and Databook TCIC/2. There are others from Cirrus, Motorola, HP, IBM, Databook, Toshiba, etc. Think of the PCMCIA adaptor chip as a built-in adapter for the PCMCIA bus, just as there are various SCSI adapters. Unfortunately, each chip requires a special driver.
Power management is not really supported under Linux. Based on the Linux Laptop Survey results, a laptop running Linux will typically last for two hours on batteries. Although an APM support package does exist, it only provides the initial hooks into the APM BIOS for power management. At this point the APM support just recognizes when the system returns from sleep mode and updates the internal clock, which is important to keep the system sane. APM applications that display the current battery level and execute the “shutdown” command when the battery runs low are also available. This software may be retrieved from tsx-11:/pub/linux/ packages/laptops/apm.
As mentioned earlier, the SL processor series has SMM features to power manage the processor. However, a portable power management solution that doesn't require SMM support is to halt the processor in the scheduler's idle loop. The x86 asm(hlt) instruction suspends the processor until there is an interrupt from the system (e.g. a key stroke). Linux versions above v1.1.10 implement this simple and effective solution, which does not degrade performance at all. It has the added benefit (even to non-laptop users) of increasing the expected life of your CPU.
PCMCIA provides plug-and-play capabilities to the laptop. Currently support exists for the Intel 82365 adaptor chip, PCMCIA modems (Megahertz, IBM, Intel, AT&T, and others), and ethernet cards (D-Link 650, Linksys, IBM credit card, and 3COM 3c589). The PCMCIA support in Linux is still in its alpha stages and is available from tsx-11:/pub/linux/packages/laptops/pcmcia. PCMCIA support that meets the PCMCIA Unix specification is in the works and you may expect it to be part of the standard Linux distribution by the end of the year.
F. Douglis and B. Marsh, Low-Power Disk Management for Mobile Computers, Matsushita Information Technology Lab, 2 Research Way, Third Floor, Princeton, NJ, 1993, MITL-TR-53-93
Fred Douglis and P. Krishnan and Brian Marsh, Thwarting the Power-Hungry Disk, Proceedings of the 1994 Winter USENIX Conference, January 1994, (Also Matsushita Information Technology Lab Technical Report MITL-TR-61-93)
Proceedings of the 1994 Winter USENIX Conference, January 1994
Marc E. Fiuczynski (firstname.lastname@example.org) is a computer science graduate student at the University of Washington in Seattle. His research interests are distributed systems, communications, operating systems, and mobile computing.