aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-26 07:40:59 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-26 07:40:59 -0400
commit0399d4db3edf5c58b6ec7f672f089f5085e49ed5 (patch)
tree3948336693fa6a945cd54787b205cbcbcd8afa5d /Documentation/power
parent43e8317b0bba1d6eb85f38a4a233d82d7c20d732 (diff)
PM / sleep: Introduce command line argument for sleep state enumeration
On some systems the platform doesn't support neither PM_SUSPEND_MEM nor PM_SUSPEND_STANDBY, so PM_SUSPEND_FREEZE is the only available system sleep state. However, some user space frameworks only use the "mem" and (sometimes) "standby" sleep state labels, so the users of those systems need to modify user space in order to be able to use system suspend at all and that is not always possible. For this reason, add a new kernel command line argument, relative_sleep_states, allowing the users of those systems to change the way in which the kernel assigns labels to system sleep states. Namely, for relative_sleep_states=1, the "mem", "standby" and "freeze" labels will enumerate the available system sleem states from the deepest to the shallowest, respectively, so that "mem" is always present in /sys/power/state and the other state strings may or may not be presend depending on what is supported by the platform. Update system sleep states documentation to reflect this change. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/power')
-rw-r--r--Documentation/power/states.txt87
1 files changed, 56 insertions, 31 deletions
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt
index 442d43df9b25..50f3ef9177c1 100644
--- a/Documentation/power/states.txt
+++ b/Documentation/power/states.txt
@@ -1,62 +1,87 @@
1System Power Management Sleep States
1 2
2System Power Management States 3(C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 4
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.
4 8
5The kernel supports four power management states generically, though 9The states are represented by strings that can be read or written to the
6one is generic and the other three are dependent on platform support 10/sys/power/state file. Those strings may be "mem", "standby", "freeze" and
7code to implement the low-level details for each state. 11"disk", where the last one always represents hibernation (Suspend-To-Disk) and
8This file describes each state, what they are 12the meaning of the remaining ones depends on the relative_sleep_states command
9commonly called, what ACPI state they map to, and what string to write 13line argument.
10to /sys/power/state to enter that state
11 14
12state: Freeze / Low-Power Idle 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
13ACPI state: S0 28ACPI state: S0
14String: "freeze" 29Label: "freeze"
15 30
16This state is a generic, pure software, light-weight, low-power state. 31This state is a generic, pure software, light-weight, system sleep state.
17It allows more energy to be saved relative to idle by freezing user 32It allows more energy to be saved relative to runtime idle by freezing user
18space and putting all I/O devices into low-power states (possibly 33space and putting all I/O devices into low-power states (possibly
19lower-power than available at run time), such that the processors can 34lower-power than available at run time), such that the processors can
20spend more time in their idle states. 35spend more time in their idle states.
21This state can be used for platforms without Standby/Suspend-to-RAM 36
37This state can be used for platforms without Power-On Suspend/Suspend-to-RAM
22support, or it can be used in addition to Suspend-to-RAM (memory sleep) 38support, or it can be used in addition to Suspend-to-RAM (memory sleep)
23to provide reduced resume latency. 39to provide reduced resume latency. It is always supported.
24 40
25 41
26State: Standby / Power-On Suspend 42State: Standby / Power-On Suspend
27ACPI State: S1 43ACPI State: S1
28String: "standby" 44Label: "standby"
29 45
30This state offers minimal, though real, power savings, while providing 46This state, if supported, offers moderate, though real, power savings, while
31a very low-latency transition back to a working system. No operating 47providing a relatively low-latency transition back to a working system. No
32state is lost (the CPU retains power), so the system easily starts up 48operating state is lost (the CPU retains power), so the system easily starts up
33again where it left off. 49again where it left off.
34 50
35We try to put devices in a low-power state equivalent to D1, which 51In addition to freezing user space and putting all I/O devices into low-power
36also offers low power savings, but low resume latency. Not all devices 52states, which is done for Suspend-To-Idle too, nonboot CPUs are taken offline
37support D1, and those that don't are left on. 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.
38 57
39 58
40State: Suspend-to-RAM 59State: Suspend-to-RAM
41ACPI State: S3 60ACPI State: S3
42String: "mem" 61Label: "mem"
43 62
44This state offers significant power savings as everything in the 63This state, if supported, offers significant power savings as everything in the
45system is put into a low-power state, except for memory, which is 64system is put into a low-power state, except for memory, which should be placed
46placed in self-refresh mode to retain its contents. 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.
47 72
48System and device state is saved and kept in memory. All devices are 73System and device state is saved and kept in memory. All devices are suspended
49suspended and put into D3. In many cases, all peripheral buses lose 74and put into low-power states. In many cases, all peripheral buses lose power
50power when entering STR, so devices must be able to handle the 75when entering STR, so devices must be able to handle the transition back to the
51transition back to the On state. 76"on" state.
52 77
53For at least ACPI, STR requires some minimal boot-strapping code to 78For at least ACPI, STR requires some minimal boot-strapping code to resume the
54resume the system from STR. This may be true on other platforms. 79system from it. This may be the case on other platforms too.
55 80
56 81
57State: Suspend-to-disk 82State: Suspend-to-disk
58ACPI State: S4 83ACPI State: S4
59String: "disk" 84Label: "disk"
60 85
61This state offers the greatest power savings, and can be used even in 86This state offers the greatest power savings, and can be used even in
62the absence of low-level platform support for power management. This 87the absence of low-level platform support for power management. This