Next Previous Contents

2. 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.

2.1 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.

Richard Gooch wrote: I'have had a look at the beta version of apmd, and I still don't like it, because:

Though this topic was discussed controversly Richard Gooch has put together a package suspendd at http://www.atnf.csiro.au/~rgooch/linux/ .

Also, have a look at apmcd (apm based crontab) at ftp://ftp.binary9.net/pub/linux/ . A tool made by Nicolas J. Leon <nicholas at binary9.net> http://mrnick.binary9.net/.

Note: I didn't check wether this features are merged into one package (apmd eventually) already.

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 has started at the beginning of 1999. 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. You may reach it at http://phobos.fachschaften.tu-muenchen.de/acpi/ .

  1. 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.
  2. 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.
  3. 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.
  4. 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 Matrix-Orbital, which is a LCD display connected to a serial port.
  5. 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.

2.2 Power Management Unit - PMU (PowerBook)

PowerBooks don't support the APM specification, but they have a separate protocol for their PMU (Power Management Unit). There is a free (GPL) daemon called pmud that handles power management; it can monitor the battery level, put the machine to sleep, and set different levels of power consumption. It was written by Stephan Leemburg <stephan at jvc.nl>, and is available from PPC distribution ftp sites (e.g. ftp://ftp.linuxppc.com/contrib/software/Utilities/System/). There is also an older utility called snooze available from the same sites that just puts the PowerBook to sleep.

2.3 Turn Monitor off, use Keyboard LEDs

There are some tools which allow to get information from your computer without using the monitor:

2.4 Screensavers

Do they only prevent the screen from being burned in or do they save power, too?

Some recommendations from Wade W. Hampton:

Screensavers usually display graphics, look for ETI, or perform other tasks. When using your screensaver in this manner, you may actually consume MORE power. For example a computer using XSETI as a screensaver might get far warmer (hence use more power) than when it was being used to edit a document or perform a compile.

To really save power, and if your X server plus monitor supports it, use the dpms option of xset (see the manual page for xset). For example, to enable the DPMS (Energy Star) features of you X server: xset +dpms

You may also manually change the mode of your X display:


xset dpms force standby
xset dpms force suspend
xset dpms force off

AFAIK a CRT consumes on the order of 25 percent more power when displaying a plain white screen than displaying a plain black screen. So, a screensaver that's mostly black can help save power, even if it doesn't actually use DPMS to power down the screen. Of course, one that's very bright and colourful, or that keeps the CPU running fast is not much help.

Some screen saver programs:

2.5 Energy Star Label

Robert Horn <rjh at world.std.com> wrote: "

I had a chance to discuss Energy Star with the designers of desktop printers. They confirmed that the allowable stand-by power targets depend on the device, and they only knew their targets. But they made some other interesting comments:

  1. Energy Star ratings lead to significant operational power savings. Timer based power savings are the exception. Most savings come from designing in power on demand with low leakage drivers. For example, using stepper motors with low leakage current instead of high leakage.

    This savings is both from individual designs and from the resulting demand for low leakage products causing better and cheaper low leakage product designs. The old-style (e.g. typewriter) design with one motor (always on) and various clutches is no longer the least cost.

  2. Energy Star was good organizational engineering. It never required designers to compromise quality or performance, which made it much harder to argue against design changes to reduce power consumption while idle. Since most of the savings begin the millisecond that parts stop moving, these savings are considerable.
  3. The power ratings on PC's are a safety rating, not a usage rating. So the 235W and 300W power supplies that commonly found in PCs are specifying their safety limits. Actual full power usage is much less, typically 20-30 percent of the safe limit. The designers also noted that it is actually difficult to measure the power consumption of a switching power supply. You need to use specially designed power meters. The regular AC meters are designed for motors, and are rather inaccurate for switching power supplies.
..."

2.6 Miscellaneous Power Saving Techniques

Linux halts the CPU in the idle cycle to further reduce power consumption. Early reports of OS/2, Win3.1/95, NT, and Linux showed Linux to use far less power than DOS-based O/S's that spun in the idle loop and consumed power -- this may have changed hence it would need research to validate.

Most Linux-users tend to leave their computer on for years whenever possible. However, several modern BIOS's support an unattended powerup, and with cron you can even do an unattended shutdown. No need to leave the computer on night after night.


Next Previous Contents