Merge remote-tracking branch 'ipsec/master'
[deliverable/linux.git] / Documentation / power / states.txt
CommitLineData
0399d4db 1System Power Management Sleep States
1da177e4 2
0399d4db 3(C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1da177e4 4
0399d4db
RW
5The kernel supports up to four system sleep states generically, although three
6of them depend on the platform support code to implement the low-level details
7for each state.
1da177e4 8
0399d4db
RW
9The states are represented by strings that can be read or written to the
10/sys/power/state file. Those strings may be "mem", "standby", "freeze" and
11"disk", where the last one always represents hibernation (Suspend-To-Disk) and
12the meaning of the remaining ones depends on the relative_sleep_states command
13line argument.
1da177e4 14
0399d4db
RW
15For relative_sleep_states=1, the strings "mem", "standby" and "freeze" label the
16available non-hibernation sleep states from the deepest to the shallowest,
17respectively. In that case, "mem" is always present in /sys/power/state,
18because there is at least one non-hibernation sleep state in every system. If
19the given system supports two non-hibernation sleep states, "standby" is present
20in /sys/power/state in addition to "mem". If the system supports three
21non-hibernation sleep states, "freeze" will be present in /sys/power/state in
22addition to "mem" and "standby".
23
24For relative_sleep_states=0, which is the default, the following descriptions
25apply.
26
27state: Suspend-To-Idle
dc5aeae4 28ACPI state: S0
0399d4db 29Label: "freeze"
dc5aeae4 30
0399d4db
RW
31This state is a generic, pure software, light-weight, system sleep state.
32It allows more energy to be saved relative to runtime idle by freezing user
dc5aeae4
ZR
33space and putting all I/O devices into low-power states (possibly
34lower-power than available at run time), such that the processors can
35spend more time in their idle states.
0399d4db
RW
36
37This state can be used for platforms without Power-On Suspend/Suspend-to-RAM
dc5aeae4 38support, or it can be used in addition to Suspend-to-RAM (memory sleep)
0399d4db 39to provide reduced resume latency. It is always supported.
dc5aeae4 40
1da177e4
LT
41
42State: Standby / Power-On Suspend
43ACPI State: S1
0399d4db 44Label: "standby"
1da177e4 45
0399d4db
RW
46This state, if supported, offers moderate, though real, power savings, while
47providing a relatively low-latency transition back to a working system. No
48operating state is lost (the CPU retains power), so the system easily starts up
1da177e4
LT
49again where it left off.
50
0399d4db
RW
51In addition to freezing user space and putting all I/O devices into low-power
52states, which is done for Suspend-To-Idle too, nonboot CPUs are taken offline
53and all low-level system functions are suspended during transitions into this
54state. For this reason, it should allow more energy to be saved relative to
55Suspend-To-Idle, but the resume latency will generally be greater than for that
56state.
1da177e4 57
1da177e4
LT
58
59State: Suspend-to-RAM
60ACPI State: S3
0399d4db 61Label: "mem"
1da177e4 62
0399d4db
RW
63This state, if supported, offers significant power savings as everything in the
64system is put into a low-power state, except for memory, which should be placed
65into the self-refresh mode to retain its contents. All of the steps carried out
66when entering Power-On Suspend are also carried out during transitions to STR.
67Additional operations may take place depending on the platform capabilities. In
68particular, on ACPI systems the kernel passes control to the BIOS (platform
69firmware) as the last step during STR transitions and that usually results in
70powering down some more low-level components that aren't directly controlled by
71the kernel.
1da177e4 72
0399d4db
RW
73System and device state is saved and kept in memory. All devices are suspended
74and put into low-power states. In many cases, all peripheral buses lose power
75when entering STR, so devices must be able to handle the transition back to the
76"on" state.
1da177e4 77
0399d4db
RW
78For at least ACPI, STR requires some minimal boot-strapping code to resume the
79system from it. This may be the case on other platforms too.
1da177e4 80
1da177e4
LT
81
82State: Suspend-to-disk
83ACPI State: S4
0399d4db 84Label: "disk"
1da177e4
LT
85
86This state offers the greatest power savings, and can be used even in
87the absence of low-level platform support for power management. This
88state operates similarly to Suspend-to-RAM, but includes a final step
89of writing memory contents to disk. On resume, this is read and memory
90is restored to its pre-suspend state.
91
92STD can be handled by the firmware or the kernel. If it is handled by
93the firmware, it usually requires a dedicated partition that must be
94setup via another operating system for it to use. Despite the
95inconvenience, this method requires minimal work by the kernel, since
96the firmware will also handle restoring memory contents on resume.
97
a8b7228c
AC
98For suspend-to-disk, a mechanism called 'swsusp' (Swap Suspend) is used
99to write memory contents to free swap space. swsusp has some restrictive
100requirements, but should work in most cases. Some, albeit outdated,
101documentation can be found in Documentation/power/swsusp.txt.
102Alternatively, userspace can do most of the actual suspend to disk work,
103see userland-swsusp.txt.
1da177e4
LT
104
105Once memory state is written to disk, the system may either enter a
106low-power state (like ACPI S4), or it may simply power down. Powering
107down offers greater savings, and allows this mechanism to work on any
108system. However, entering a real low-power state allows the user to
11d77d0c 109trigger wake up events (e.g. pressing a key or opening a laptop lid).
This page took 0.790311 seconds and 5 git commands to generate.