Linux Ecology-HOWTO
Prev |  | Next

# Chapter 1. Reduction of Power Consumption

There are some means to save power when using a computer which are supported by Linux: Advanced Power Management, certain harddisk settings, working without monitor and others.

# Advanced Power Management (APM/ACPI)

## Linux Compatibility Check

From the Battery-Powered-mini-HOWTO " .. 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." You may get information about the APM version with the dmesg command and in the `/proc/apm` file.

## Introduction

When you first install Linux, you will probably have to recompile the kernel. The kernel that came with your distribution probably does not have APM enabled.

APM support consists of two parts: kernel support and user-land support.

For kernel support, enable the parameters in the corresponding kernel section. AFAIK not all features work with laptops. AFAIK the feature CONFIG_APM_POWER_OFF works with most laptops.

The utilities for userland support may be found at WorldVisions. APMD is a set of programs that control the Advanced Power Management system found in most modern laptop computers. If you run a 2.2.x kernel and want to experiment, Gabor Kuti <seasons at falcon.sch.bme.hu> has made a kernel patch that allows you to hibernate any Linux system to disk, even if your computers APM BIOS doesn't support it directly.

## Caveats

If you have another operating system preinstalled or use another operating system at the same disk, make sure there is no "hibernation" or "suspend" tool installed, which could severely interfere with Linux, e.g. it might use disk space which is occupied by Linux or vice versa.

## Troubleshooting

If your machine worked with 2.0.x kernels but not with the 2.2.x series, take this advice from Klaus Franken kfr at klaus.franken.de : "The default changed in 2.2. Search in the init-scripts for halt and change it to halt -p or poweroff. See man halt , if you don't have this option you need a newer version of halt." You may find it in the SysVinit package.

Sometimes X windows and APM don't work smoothly together, the machine might even hang. A recommendation from Steve Rader: Some Linux systems have their X server hang when doing apm -s. Folks with this affliction might want switch to the console virtual terminal then suspend chvt 1; apm -s as root, or, more appropiately.sudo chvt 1; sudo apm -s. I have these commands in a script, say, my-suspend and then do xapmload --click-command my-suspend .

On some new machines (for instance HP Omnibook 4150 - 366 MHz model) when accessing `/proc/apm`, you may get a kernel fault general protection fault: f000. Stephen Rothwell <Stephen.Rothwell at canb.auug.org.au> http://www.canb.auug.org.au/~sfr/ explaines: "This is your APM BIOS attempting to use a real mode segment while in protected mode, i.e. it is a bug in your BIOS. .. We have seen a few of these recently, except all the others are in the power off code in the BIOS wher we can work around it by returning to real mode before attempting to power off. Here we cannot do this."

## ACPI

The latest standard is ACPI. The ACPI4Linux project is a kernel driver project aimed at implementing full ACPI support for Linux, including fan control, dock/undock detection and a WindowMaker dockable temperature meter.

- hdparm hdparm is a Linux IDE disk utility that lets you set spin-down timeouts and other disk parameters. It works also for some SCSI features.

- Mobile Update Daemon This is a drop-in replacement for the standard update daemon, mobile-update minimizes disk spin ups and reduces disk uptime. It flushes buffers only when other disk activity is present. To ensure a consistent file system call sync manually. Otherwise files may be lost on power failure. mobile-update does not use APM. So it works also on older systems.

- Toshiba Linux Utilities: This is a set of Linux utilities for controlling the fan, supervisor passwords, and hot key functions of Toshiba Pentium notebooks. There is a KDE package Klibreta, too.

- LCDproc . "LCDproc is a small piece of software that will enable your Linux box to display live system information on a 20x4 line backlit LCD display. AFAIK it connects only to the external Matrix-Orbital 20x4 LCD display MatrixOrbital, which is a LCD display connected to a serial port.

- Dial Daemon . The Diald daemon provides on demand Internet connectivity using the SLIP or PPP protocols. Diald can automatically dial in to a remote host when needed or bring down dial-up connections that are inactive.

Prev | Home | Next
About the Document and the Authors |  | Power Management Unit - PMU (Apple PowerBook)