Chapter 17. Power Management

Table of Contents

17.1. Power Saving Functions
17.2. APM
17.3. ACPI
17.4. Rest for the Hard Disk
17.5. powersave
17.6. The YaST Power Management Module
17.7. WOL — Wake on LAN

Abstract

This chapter provides an overview of the various power management technologies in Linux. The configuration of all available APM (advanced power management), ACPI (advanced configuration and power interface), and CPU frequency scaling settings are described in detail.

▪ s390;zseries
The features and hardware described in this chapter do not exist on IBM S/390 and zSeries, rendering this chapter irrelevant for these platforms. ▪

Unlike APM, which was previously used on laptops for power management only, the hardware information and configuration tool ACPI is available on all modern computers (laptops, desktops, and servers). On many types of modern hardware, the CPU frequency can be adapted to the situation, which helps save valuable battery time especially on mobile devices (CPU frequency scaling).

All power management technologies require suitable hardware and BIOS routines. Most laptops and many modern desktops and servers meet these requirements. APM had been used in many older computers. As APM largely consists of a function set implemented in the BIOS, the level of APM support may vary depending on the hardware. This is even more true of ACPI, which is even more complex. For this reason, it is virtually impossible to recommend one over the other. Simply test the various procedures on your hardware then select the technology that is best supported.

[Important]Power Management for AMD64 Processors

AMD64 processors with a 64-bit kernel only support ACPI.

17.1. Power Saving Functions

Although many of these functions are of general interest, they are especially important for mobile deployment. The following paragraphs describe the functions and which systems offer them.

Standby

This operating mode merely turns off the display. On some computers, the processor performance is throttled. This function is not available in all APM implementations. The corresponding ACPI state is S1.

Suspend (to memory)

This mode writes the entire system state to the RAM. Subsequently, the entire system except the RAM is put to sleep. As the computer consumes very little power in this state, the battery may last anywhere from twelve hours to several days, depending on the device. The advantage of this state is the possibility to resume work at the same point within a few seconds without having to boot and restart applications. Most modern devices can be suspended by closing the lid and activated by opening it. The corresponding ACPI state is S3. Support of this state largely depends on the hardware.

Hibernation (suspend to disk)

This operating mode enables the computer to hibernate, as the entire system state is written to the hard disk and the system is powered off. The reactivation from the state of hibernation takes about thirty to ninety seconds. The state prior to the suspend will be restored. Some manufacturers offer useful hybrid variants of this mode in their APM (such as RediSafe in IBM Thinkpads). The corresponding ACPI state is S4.

Battery monitor

In addition to monitoring the battery charge level, something must be done when power reserves are low. This control function is handled by ACPI or APM.

Automatic power-off

Following a shutdown, the computer is powered off. This is especially important when an automatic shutdown is performed shortly before the battery is empty.

Shutdown of system components

The most important component for saving power is the hard disk. Depending on the reliability of the overall system, the hard disk can be put to sleep for some time. However, the risk of losing data increases with the duration of the sleep periods. Other components can be deactivated via ACPI (at least theoretically) or permanently in the BIOS setup.

Processor speed control

AMD PowerNow! and Intel SpeedStep are two concepts designed for reducing the power consumption of the overall system. For this purpose, the power consumption of the most power-hungry component — the processor — is reduced. A pleasant side-effect of the reduced processor speed is the reduced generation of heat. Thus, adjustable fans will also make less noise. This feature is controlled by the CPU frequency scaling functions of the Linux kernel. Basically, three different processor speed levels are available:

performance

Maximum processor performance for AC operation.

powersave

Minimum processor performance for battery operation.

dynamic

Dynamic adaption of the processor performance to the current processor load — this is the recommended setting for battery operation and AC operation to save battery power, reduce noise, and achieve optimum performance. Switching between the speed levels usually takes place seamlessly, unnoticed by the user.

See Section 17.5. “powersave” for more information about controlling the processor speed.