ACPI4Linux
Valid XHTML 1.0!
Valid CSS!
SourceForge.net Logo

Last update:
2003-07-07.

Documentation: The /proc/acpi/sleep File

To conserve energy while remaining quickly available, ACPI-compatible PCs may enter system sleep states. The ACPI specification defines 5 of these states, known as S-states. Unlike the processor sleep states described later, no work is done by the system under S-states. Each state introduces greater power savings but requires commensurately more time to awaken and begin performing work. These are patterned on system states from the APM standard, a predecessor of ACPI.

Usage

Read

Using cat should reveal something like this:

S0 S1 S3 S4 S5
                    

Write

Writes to this file should be done in the following form:

echo x > sleep
                    

with x being replaced by the sleep state number.

Sleep States

S1 - "Stopgrant"

Power to cpu is maintained, but no instructions are executed. The CPU halts itself and may shut down many of its internal components. In Microsoft Windows, the "Standby" command is associated with this state by default.

S2

While defined in the spec, this state is not currently in use. It resembles S3 with the qualification that some devices are permitted to remain on.

S3 - "Suspend to RAM"

All power to the cpu is shut off, and the contents of its registers are flushed to RAM, which remains on. In Microsoft Windows, the "Standby" command can be associated with this state if enabled in the BIOS. Because it requires a high degree of coordination between the cpu, chipset, devices, OS, BIOS, and OS device drivers, this system state is the most prone to errors and instability.
S3 is currently _not_ supported by the 2.4.x kernel series in Linux.

S4 - "Suspend to Disk"

CPU power shut off as in S3, but RAM is written to disk and shut off as well. In Microsoft Windows, the "Hibernate" command is associated with this state. A variation called S4BIOS is most prevalent, where the system image is stored and loaded by the BIOS instead of the OS. Because the contents of RAM are written out to disk, system context is maintained. For example, unsaved files would not be lost following an S4 transition.
S4 is currently _not_ supported by the 2.4.x kernel series in Linux, but you might have good luck with SWSUSP. Some machines offer S4_BIOS whose support is considered to be experimental within ACPI4Linux.

S5 - "Soft Off"

System is shut down, however some power may be supplied to certain devices to generate a wake event, for example to support automatic startup from a LAN or USB device. In Microsoft Windows, the "Shut down" command is associated with this state. Mechanical power can usually be removed or restored with no ill effects.

Processor "C" power states

Processor "C" power states are also defined. These are typically implemented in laptop platforms only. Here the cpu consumes less power while still doing work, and the tradeoff comes between power and performance, rather than power and latency. Please consult the ACPI specification for more information on C states, or see here.