Linux and Advanced Power Management


Introduction | General Information | Files | Comments

Introduction

The Advanced Power Management specifications provide an industry standard for system-wide power management of PC computers. Drafted by Intel and Microsoft, the standard is operating system-independent. Thanks to the work of numerous Linux kernel hackers, an APM driver has been developed for the Linux operating system. This page is an attempt to document the Linux APM support and other power management issues.

Disclaimer When it comes to Linux and power management, the unfortunate truth is that even with an industry-wide standard for power management, results on specific hardware can vary widely. Some manufacturers do not implement their supporting hardware correctly or adequately, they may require certain specific BIOS settings, or other difficulties may affect the performance of a power management system under Linux. While many systems interoperate well with the Linux operating system, there is really no guarantee. Hopefully nothing on this page is inaccurate, and every effort will be made to keep the information up to date and as helpful as possible. There are a few general disclaimers about the information on this page.

Suggestions welcome! Mail your comments and ideas to the Linux and Advanced Power Management maintainer at kharker@cs.utexas.edu.

What's new? Any links marked with  **NEW** are new or changed as of the last update to this page (as reported at the bottom of this page).


General Information

System-wide power management under APM is accomplished through a cooperative connection between code in the system BIOS and an operating system driver that enables the operating system to respond to APM events. The APM specification designates how this connection is established and the protocol used.

Of course, for APM to work on any notebook or energy-conscious desktop, the system BIOS ROM in the machine must support the APM standard. Furthermore, for APM to work with the Linux operating system, the system BIOS ROM must support either the 1.0 or 1.1 version of the APM standard, and it must also support 32-bit protected mode connections. A system that supports APM 1.1 is preferred, as it provides more features that the device driver and supporting utilities can take advantage of.

A couple of notes: Technically, a notebook manufacturer can create an APM system that does not incorporate APM code in the system BIOS, a Read Only Memory chip that exists in all PC machines. Such systems will likely only work with DOS and Windoze. The APM standard, however, strongly encourages vendors to use a ROM-based implementation. Fortunately, almost all modern notebooks support APM in the ROM, and this enables different operating systems, like Linux, to access the APM support.

More Information


Utilities, Patches, and Files

The Linux APM driver was originally distributed in the form of a kernel patch, but has been integrated into the kernel as of version 1.3.46. The driver is based on code originally written by Stephen Rothwell and others, but is now being maintained and updated by Rik Faith (faith@cs.unc.edu). While kernel patches do exist for older kernels, including 1.2.13, they are no longer supported by the developers, and those wishing to use a kernel that supports APM are highly encouraged to migrate to a recent 1.3.x kernel. The APM utilities, including the xapm battery monitor, will not work with the older versions of the driver.

In addition to the actual APM driver, there are several utilities available that use the APM kernel driver and the /proc/apm directory. This package includes a daemon process called apmd that logs battery status, and a utility named apm that simply outputs the information available in /proc/apm including the current battery level. For those running X, a simple utility called xapm will display a simple graph of battery life. And for those interested in hacking, an ANSI C library libapm.a is provided so developers can write their own utilities.

For those notebooks that do not support APM, the hdparm hard disk utility will interface with an IDE hard disk controller to enable hard disk spin-down after a user-specified period of disk inactivity.


Comments

Please send any comments, suggestions, or updates about the information presented here to me at kharker@cs.utexas.edu. In particular, if you think you'd be willing to take over responsibility for this page and do a better job at keeping up to date on this information than I can, please let me know. There are also a few general disclaimers about this page for those interested in such things.


This page is optimized for Lynx! HTML 3.2 Validated!  **NEW** Marks new links as of 1 July 1998
Kenneth E. Harker kharker@cs.utexas.edu