blob: 42f28b7aaf6b4b4bf5221ef815875ebd475a40b5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2System Power Management States
3
4
Zhang Ruidc5aeae2013-05-13 02:42:11 +00005The kernel supports four power management states generically, though
6one is generic and the other three are dependent on platform support
7code to implement the low-level details for each state.
8This file describes each state, what they are
Linus Torvalds1da177e2005-04-16 15:20:36 -07009commonly called, what ACPI state they map to, and what string to write
10to /sys/power/state to enter that state
11
Zhang Ruidc5aeae2013-05-13 02:42:11 +000012state: Freeze / Low-Power Idle
13ACPI state: S0
14String: "freeze"
15
16This state is a generic, pure software, light-weight, low-power state.
17It allows more energy to be saved relative to idle by freezing user
18space and putting all I/O devices into low-power states (possibly
19lower-power than available at run time), such that the processors can
20spend more time in their idle states.
21This state can be used for platforms without Standby/Suspend-to-RAM
22support, or it can be used in addition to Suspend-to-RAM (memory sleep)
23to provide reduced resume latency.
24
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
26State: Standby / Power-On Suspend
27ACPI State: S1
28String: "standby"
29
30This state offers minimal, though real, power savings, while providing
31a very low-latency transition back to a working system. No operating
32state is lost (the CPU retains power), so the system easily starts up
33again where it left off.
34
35We try to put devices in a low-power state equivalent to D1, which
36also offers low power savings, but low resume latency. Not all devices
37support D1, and those that don't are left on.
38
39A transition from Standby to the On state should take about 1-2
40seconds.
41
42
43State: Suspend-to-RAM
44ACPI State: S3
45String: "mem"
46
47This state offers significant power savings as everything in the
48system is put into a low-power state, except for memory, which is
49placed in self-refresh mode to retain its contents.
50
51System and device state is saved and kept in memory. All devices are
52suspended and put into D3. In many cases, all peripheral buses lose
53power when entering STR, so devices must be able to handle the
54transition back to the On state.
55
56For at least ACPI, STR requires some minimal boot-strapping code to
57resume the system from STR. This may be true on other platforms.
58
59A transition from Suspend-to-RAM to the On state should take about
603-5 seconds.
61
62
63State: Suspend-to-disk
64ACPI State: S4
65String: "disk"
66
67This state offers the greatest power savings, and can be used even in
68the absence of low-level platform support for power management. This
69state operates similarly to Suspend-to-RAM, but includes a final step
70of writing memory contents to disk. On resume, this is read and memory
71is restored to its pre-suspend state.
72
73STD can be handled by the firmware or the kernel. If it is handled by
74the firmware, it usually requires a dedicated partition that must be
75setup via another operating system for it to use. Despite the
76inconvenience, this method requires minimal work by the kernel, since
77the firmware will also handle restoring memory contents on resume.
78
Alexandre Courbota8b72282011-02-24 20:48:56 +010079For suspend-to-disk, a mechanism called 'swsusp' (Swap Suspend) is used
80to write memory contents to free swap space. swsusp has some restrictive
81requirements, but should work in most cases. Some, albeit outdated,
82documentation can be found in Documentation/power/swsusp.txt.
83Alternatively, userspace can do most of the actual suspend to disk work,
84see userland-swsusp.txt.
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
86Once memory state is written to disk, the system may either enter a
87low-power state (like ACPI S4), or it may simply power down. Powering
88down offers greater savings, and allows this mechanism to work on any
89system. However, entering a real low-power state allows the user to
Johannes Berg11d77d02007-04-30 15:09:53 -070090trigger wake up events (e.g. pressing a key or opening a laptop lid).
Linus Torvalds1da177e2005-04-16 15:20:36 -070091
92A transition from Suspend-to-Disk to the On state should take about 30
93seconds, though it's typically a bit more with the current
94implementation.