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>
2014-05-26 19:40:59 +08:00
|
|
|
System Power Management Sleep States
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
(C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
The kernel supports up to four system sleep states generically, although three
|
|
|
|
of them depend on the platform support code to implement the low-level details
|
|
|
|
for each state.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
The states are represented by strings that can be read or written to the
|
|
|
|
/sys/power/state file. Those strings may be "mem", "standby", "freeze" and
|
|
|
|
"disk", where the last one always represents hibernation (Suspend-To-Disk) and
|
|
|
|
the meaning of the remaining ones depends on the relative_sleep_states command
|
|
|
|
line argument.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
For relative_sleep_states=1, the strings "mem", "standby" and "freeze" label the
|
|
|
|
available non-hibernation sleep states from the deepest to the shallowest,
|
|
|
|
respectively. In that case, "mem" is always present in /sys/power/state,
|
|
|
|
because there is at least one non-hibernation sleep state in every system. If
|
|
|
|
the given system supports two non-hibernation sleep states, "standby" is present
|
|
|
|
in /sys/power/state in addition to "mem". If the system supports three
|
|
|
|
non-hibernation sleep states, "freeze" will be present in /sys/power/state in
|
|
|
|
addition to "mem" and "standby".
|
|
|
|
|
|
|
|
For relative_sleep_states=0, which is the default, the following descriptions
|
|
|
|
apply.
|
|
|
|
|
|
|
|
state: Suspend-To-Idle
|
2013-05-13 10:42:11 +08:00
|
|
|
ACPI state: S0
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
Label: "freeze"
|
2013-05-13 10:42:11 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
This state is a generic, pure software, light-weight, system sleep state.
|
|
|
|
It allows more energy to be saved relative to runtime idle by freezing user
|
2013-05-13 10:42:11 +08:00
|
|
|
space and putting all I/O devices into low-power states (possibly
|
|
|
|
lower-power than available at run time), such that the processors can
|
|
|
|
spend more time in their idle states.
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
|
|
|
|
This state can be used for platforms without Power-On Suspend/Suspend-to-RAM
|
2013-05-13 10:42:11 +08:00
|
|
|
support, or it can be used in addition to Suspend-to-RAM (memory sleep)
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
to provide reduced resume latency. It is always supported.
|
2013-05-13 10:42:11 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
State: Standby / Power-On Suspend
|
|
|
|
ACPI State: S1
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
Label: "standby"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
This state, if supported, offers moderate, though real, power savings, while
|
|
|
|
providing a relatively low-latency transition back to a working system. No
|
|
|
|
operating state is lost (the CPU retains power), so the system easily starts up
|
2005-04-17 06:20:36 +08:00
|
|
|
again where it left off.
|
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
In addition to freezing user space and putting all I/O devices into low-power
|
|
|
|
states, which is done for Suspend-To-Idle too, nonboot CPUs are taken offline
|
|
|
|
and all low-level system functions are suspended during transitions into this
|
|
|
|
state. For this reason, it should allow more energy to be saved relative to
|
|
|
|
Suspend-To-Idle, but the resume latency will generally be greater than for that
|
|
|
|
state.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
State: Suspend-to-RAM
|
|
|
|
ACPI State: S3
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
Label: "mem"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
This state, if supported, offers significant power savings as everything in the
|
|
|
|
system is put into a low-power state, except for memory, which should be placed
|
|
|
|
into the self-refresh mode to retain its contents. All of the steps carried out
|
|
|
|
when entering Power-On Suspend are also carried out during transitions to STR.
|
|
|
|
Additional operations may take place depending on the platform capabilities. In
|
|
|
|
particular, on ACPI systems the kernel passes control to the BIOS (platform
|
|
|
|
firmware) as the last step during STR transitions and that usually results in
|
|
|
|
powering down some more low-level components that aren't directly controlled by
|
|
|
|
the kernel.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
System and device state is saved and kept in memory. All devices are suspended
|
|
|
|
and put into low-power states. In many cases, all peripheral buses lose power
|
|
|
|
when entering STR, so devices must be able to handle the transition back to the
|
|
|
|
"on" state.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
For at least ACPI, STR requires some minimal boot-strapping code to resume the
|
|
|
|
system from it. This may be the case on other platforms too.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
State: Suspend-to-disk
|
|
|
|
ACPI State: S4
|
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>
2014-05-26 19:40:59 +08:00
|
|
|
Label: "disk"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
This state offers the greatest power savings, and can be used even in
|
|
|
|
the absence of low-level platform support for power management. This
|
|
|
|
state operates similarly to Suspend-to-RAM, but includes a final step
|
|
|
|
of writing memory contents to disk. On resume, this is read and memory
|
|
|
|
is restored to its pre-suspend state.
|
|
|
|
|
|
|
|
STD can be handled by the firmware or the kernel. If it is handled by
|
|
|
|
the firmware, it usually requires a dedicated partition that must be
|
|
|
|
setup via another operating system for it to use. Despite the
|
|
|
|
inconvenience, this method requires minimal work by the kernel, since
|
|
|
|
the firmware will also handle restoring memory contents on resume.
|
|
|
|
|
2011-02-25 03:48:56 +08:00
|
|
|
For suspend-to-disk, a mechanism called 'swsusp' (Swap Suspend) is used
|
|
|
|
to write memory contents to free swap space. swsusp has some restrictive
|
|
|
|
requirements, but should work in most cases. Some, albeit outdated,
|
|
|
|
documentation can be found in Documentation/power/swsusp.txt.
|
|
|
|
Alternatively, userspace can do most of the actual suspend to disk work,
|
|
|
|
see userland-swsusp.txt.
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
Once memory state is written to disk, the system may either enter a
|
|
|
|
low-power state (like ACPI S4), or it may simply power down. Powering
|
|
|
|
down offers greater savings, and allows this mechanism to work on any
|
|
|
|
system. However, entering a real low-power state allows the user to
|
2007-05-01 06:09:53 +08:00
|
|
|
trigger wake up events (e.g. pressing a key or opening a laptop lid).
|