diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-26 07:40:59 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-26 07:40:59 -0400 |
commit | 0399d4db3edf5c58b6ec7f672f089f5085e49ed5 (patch) | |
tree | 3948336693fa6a945cd54787b205cbcbcd8afa5d /Documentation/power | |
parent | 43e8317b0bba1d6eb85f38a4a233d82d7c20d732 (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.txt | 87 |
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 @@ | |||
1 | System Power Management Sleep States | ||
1 | 2 | ||
2 | System Power Management States | 3 | (C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
3 | 4 | ||
5 | The kernel supports up to four system sleep states generically, although three | ||
6 | of them depend on the platform support code to implement the low-level details | ||
7 | for each state. | ||
4 | 8 | ||
5 | The kernel supports four power management states generically, though | 9 | The states are represented by strings that can be read or written to the |
6 | one is generic and the other three are dependent on platform support | 10 | /sys/power/state file. Those strings may be "mem", "standby", "freeze" and |
7 | code to implement the low-level details for each state. | 11 | "disk", where the last one always represents hibernation (Suspend-To-Disk) and |
8 | This file describes each state, what they are | 12 | the meaning of the remaining ones depends on the relative_sleep_states command |
9 | commonly called, what ACPI state they map to, and what string to write | 13 | line argument. |
10 | to /sys/power/state to enter that state | ||
11 | 14 | ||
12 | state: Freeze / Low-Power Idle | 15 | For relative_sleep_states=1, the strings "mem", "standby" and "freeze" label the |
16 | available non-hibernation sleep states from the deepest to the shallowest, | ||
17 | respectively. In that case, "mem" is always present in /sys/power/state, | ||
18 | because there is at least one non-hibernation sleep state in every system. If | ||
19 | the given system supports two non-hibernation sleep states, "standby" is present | ||
20 | in /sys/power/state in addition to "mem". If the system supports three | ||
21 | non-hibernation sleep states, "freeze" will be present in /sys/power/state in | ||
22 | addition to "mem" and "standby". | ||
23 | |||
24 | For relative_sleep_states=0, which is the default, the following descriptions | ||
25 | apply. | ||
26 | |||
27 | state: Suspend-To-Idle | ||
13 | ACPI state: S0 | 28 | ACPI state: S0 |
14 | String: "freeze" | 29 | Label: "freeze" |
15 | 30 | ||
16 | This state is a generic, pure software, light-weight, low-power state. | 31 | This state is a generic, pure software, light-weight, system sleep state. |
17 | It allows more energy to be saved relative to idle by freezing user | 32 | It allows more energy to be saved relative to runtime idle by freezing user |
18 | space and putting all I/O devices into low-power states (possibly | 33 | space and putting all I/O devices into low-power states (possibly |
19 | lower-power than available at run time), such that the processors can | 34 | lower-power than available at run time), such that the processors can |
20 | spend more time in their idle states. | 35 | spend more time in their idle states. |
21 | This state can be used for platforms without Standby/Suspend-to-RAM | 36 | |
37 | This state can be used for platforms without Power-On Suspend/Suspend-to-RAM | ||
22 | support, or it can be used in addition to Suspend-to-RAM (memory sleep) | 38 | support, or it can be used in addition to Suspend-to-RAM (memory sleep) |
23 | to provide reduced resume latency. | 39 | to provide reduced resume latency. It is always supported. |
24 | 40 | ||
25 | 41 | ||
26 | State: Standby / Power-On Suspend | 42 | State: Standby / Power-On Suspend |
27 | ACPI State: S1 | 43 | ACPI State: S1 |
28 | String: "standby" | 44 | Label: "standby" |
29 | 45 | ||
30 | This state offers minimal, though real, power savings, while providing | 46 | This state, if supported, offers moderate, though real, power savings, while |
31 | a very low-latency transition back to a working system. No operating | 47 | providing a relatively low-latency transition back to a working system. No |
32 | state is lost (the CPU retains power), so the system easily starts up | 48 | operating state is lost (the CPU retains power), so the system easily starts up |
33 | again where it left off. | 49 | again where it left off. |
34 | 50 | ||
35 | We try to put devices in a low-power state equivalent to D1, which | 51 | In addition to freezing user space and putting all I/O devices into low-power |
36 | also offers low power savings, but low resume latency. Not all devices | 52 | states, which is done for Suspend-To-Idle too, nonboot CPUs are taken offline |
37 | support D1, and those that don't are left on. | 53 | and all low-level system functions are suspended during transitions into this |
54 | state. For this reason, it should allow more energy to be saved relative to | ||
55 | Suspend-To-Idle, but the resume latency will generally be greater than for that | ||
56 | state. | ||
38 | 57 | ||
39 | 58 | ||
40 | State: Suspend-to-RAM | 59 | State: Suspend-to-RAM |
41 | ACPI State: S3 | 60 | ACPI State: S3 |
42 | String: "mem" | 61 | Label: "mem" |
43 | 62 | ||
44 | This state offers significant power savings as everything in the | 63 | This state, if supported, offers significant power savings as everything in the |
45 | system is put into a low-power state, except for memory, which is | 64 | system is put into a low-power state, except for memory, which should be placed |
46 | placed in self-refresh mode to retain its contents. | 65 | into the self-refresh mode to retain its contents. All of the steps carried out |
66 | when entering Power-On Suspend are also carried out during transitions to STR. | ||
67 | Additional operations may take place depending on the platform capabilities. In | ||
68 | particular, on ACPI systems the kernel passes control to the BIOS (platform | ||
69 | firmware) as the last step during STR transitions and that usually results in | ||
70 | powering down some more low-level components that aren't directly controlled by | ||
71 | the kernel. | ||
47 | 72 | ||
48 | System and device state is saved and kept in memory. All devices are | 73 | System and device state is saved and kept in memory. All devices are suspended |
49 | suspended and put into D3. In many cases, all peripheral buses lose | 74 | and put into low-power states. In many cases, all peripheral buses lose power |
50 | power when entering STR, so devices must be able to handle the | 75 | when entering STR, so devices must be able to handle the transition back to the |
51 | transition back to the On state. | 76 | "on" state. |
52 | 77 | ||
53 | For at least ACPI, STR requires some minimal boot-strapping code to | 78 | For at least ACPI, STR requires some minimal boot-strapping code to resume the |
54 | resume the system from STR. This may be true on other platforms. | 79 | system from it. This may be the case on other platforms too. |
55 | 80 | ||
56 | 81 | ||
57 | State: Suspend-to-disk | 82 | State: Suspend-to-disk |
58 | ACPI State: S4 | 83 | ACPI State: S4 |
59 | String: "disk" | 84 | Label: "disk" |
60 | 85 | ||
61 | This state offers the greatest power savings, and can be used even in | 86 | This state offers the greatest power savings, and can be used even in |
62 | the absence of low-level platform support for power management. This | 87 | the absence of low-level platform support for power management. This |