Merge tag 'nfs-for-3.10-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / Documentation / power / states.txt
CommitLineData
1da177e4
LT
1
2System Power Management States
3
4
dc5aeae4
ZR
5The 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
1da177e4
LT
9commonly called, what ACPI state they map to, and what string to write
10to /sys/power/state to enter that state
11
dc5aeae4
ZR
12state: 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
1da177e4
LT
25
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
1da177e4
LT
39
40State: Suspend-to-RAM
41ACPI State: S3
42String: "mem"
43
44This state offers significant power savings as everything in the
45system is put into a low-power state, except for memory, which is
46placed in self-refresh mode to retain its contents.
47
48System and device state is saved and kept in memory. All devices are
49suspended and put into D3. In many cases, all peripheral buses lose
50power when entering STR, so devices must be able to handle the
51transition back to the On state.
52
53For at least ACPI, STR requires some minimal boot-strapping code to
54resume the system from STR. This may be true on other platforms.
55
1da177e4
LT
56
57State: Suspend-to-disk
58ACPI State: S4
59String: "disk"
60
61This state offers the greatest power savings, and can be used even in
62the absence of low-level platform support for power management. This
63state operates similarly to Suspend-to-RAM, but includes a final step
64of writing memory contents to disk. On resume, this is read and memory
65is restored to its pre-suspend state.
66
67STD can be handled by the firmware or the kernel. If it is handled by
68the firmware, it usually requires a dedicated partition that must be
69setup via another operating system for it to use. Despite the
70inconvenience, this method requires minimal work by the kernel, since
71the firmware will also handle restoring memory contents on resume.
72
a8b7228c
AC
73For suspend-to-disk, a mechanism called 'swsusp' (Swap Suspend) is used
74to write memory contents to free swap space. swsusp has some restrictive
75requirements, but should work in most cases. Some, albeit outdated,
76documentation can be found in Documentation/power/swsusp.txt.
77Alternatively, userspace can do most of the actual suspend to disk work,
78see userland-swsusp.txt.
1da177e4
LT
79
80Once memory state is written to disk, the system may either enter a
81low-power state (like ACPI S4), or it may simply power down. Powering
82down offers greater savings, and allows this mechanism to work on any
83system. However, entering a real low-power state allows the user to
11d77d0c 84trigger wake up events (e.g. pressing a key or opening a laptop lid).