^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/power/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: August 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) The /sys/power directory will contain files that will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) provide a unified interface to the power management
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) subsystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) What: /sys/power/state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Date: November 2016
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) The /sys/power/state file controls system sleep states.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Reading from this file returns the available sleep state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) labels, which may be "mem" (suspend), "standby" (power-on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) suspend), "freeze" (suspend-to-idle) and "disk" (hibernation).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) Writing one of the above strings to this file causes the system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) to transition into the corresponding state, if available.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) See Documentation/admin-guide/pm/sleep-states.rst for more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) What: /sys/power/mem_sleep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) Date: November 2016
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) The /sys/power/mem_sleep file controls the operating mode of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) system suspend. Reading from it returns the available modes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) as "s2idle" (always present), "shallow" and "deep" (present if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) supported). The mode that will be used on subsequent attempts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) to suspend the system (by writing "mem" to the /sys/power/state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) file described above) is enclosed in square brackets.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Writing one of the above strings to this file causes the mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) represented by it to be used on subsequent attempts to suspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) See Documentation/admin-guide/pm/sleep-states.rst for more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) What: /sys/power/disk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Date: September 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) The /sys/power/disk file controls the operating mode of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) suspend-to-disk mechanism. Reading from this file returns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) the name of the method by which the system will be put to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) sleep on the next suspend. There are four methods supported:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 'firmware' - means that the memory image will be saved to disk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) by some firmware, in which case we also assume that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) firmware will handle the system suspend.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 'platform' - the memory image will be saved by the kernel and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) the system will be put to sleep by the platform driver (e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) ACPI or other PM registers).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 'shutdown' - the memory image will be saved by the kernel and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) the system will be powered off.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 'reboot' - the memory image will be saved by the kernel and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) the system will be rebooted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) Additionally, /sys/power/disk can be used to turn on one of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) two testing modes of the suspend-to-disk mechanism: 'testproc'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) or 'test'. If the suspend-to-disk mechanism is in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) 'testproc' mode, writing 'disk' to /sys/power/state will cause
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) the kernel to disable nonboot CPUs and freeze tasks, wait for 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) seconds, unfreeze tasks and enable nonboot CPUs. If it is in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) the 'test' mode, writing 'disk' to /sys/power/state will cause
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) the kernel to disable nonboot CPUs and freeze tasks, shrink
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) memory, suspend devices, wait for 5 seconds, resume devices,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) unfreeze tasks and enable nonboot CPUs. Then, we are able to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) look in the log messages and work out, for example, which code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) is being slow and which device drivers are misbehaving.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) The suspend-to-disk method may be chosen by writing to this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) file one of the accepted strings:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) - 'firmware'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) - 'platform'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) - 'shutdown'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) - 'reboot'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) - 'testproc'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) - 'test'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) It will only change to 'firmware' or 'platform' if the system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) supports that.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) What: /sys/power/image_size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) Date: August 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) The /sys/power/image_size file controls the size of the image
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) created by the suspend-to-disk mechanism. It can be written a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) string representing a non-negative integer that will be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) as an upper limit of the image size, in bytes. The kernel's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) suspend-to-disk code will do its best to ensure the image size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) will not exceed this number. However, if it turns out to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) impossible, the kernel will try to suspend anyway using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) smallest image possible. In particular, if "0" is written to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) this file, the suspend image will be as small as possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) Reading from this file will display the current image size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) limit, which is set to around 2/5 of available RAM by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) What: /sys/power/pm_trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) Date: August 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) The /sys/power/pm_trace file controls the code which saves the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) last PM event point in the RTC across reboots, so that you can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) debug a machine that just hangs during suspend (or more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) commonly, during resume). Namely, the RTC is only used to save
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) the last PM event point if this file contains '1'. Initially
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) it contains '0' which may be changed to '1' by writing a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) string representing a nonzero integer into it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) To use this debugging feature you should attempt to suspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) the machine, then reboot it and run::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) dmesg -s 1000000 | grep 'hash matches'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) If you do not get any matches (or they appear to be false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) positives), it is possible that the last PM event point
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) referred to a device created by a loadable kernel module. In
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) this case cat /sys/power/pm_trace_dev_match (see below) after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) your system is started up and the kernel modules are loaded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) CAUTION: Using it will cause your machine's real-time (CMOS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) clock to be set to a random invalid time after a resume.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) What; /sys/power/pm_trace_dev_match
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) Date: October 2010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) Contact: James Hogan <jhogan@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) The /sys/power/pm_trace_dev_match file contains the name of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) device associated with the last PM event point saved in the RTC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) across reboots when pm_trace has been used. More precisely it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) contains the list of current devices (including those
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) registered by loadable kernel modules since boot) which match
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) the device hash in the RTC at boot, with a newline after each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) The advantage of this file over the hash matches printed to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) kernel log (see /sys/power/pm_trace), is that it includes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) devices created after boot by loadable kernel modules.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) Due to the small hash size necessary to fit in the RTC, it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) possible that more than one device matches the hash, in which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) case further investigation is required to determine which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) device is causing the problem. Note that genuine RTC clock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) values (such as when pm_trace has not been used), can still
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) match a device and output it's name here.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) What: /sys/power/pm_async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) Date: January 2009
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) The /sys/power/pm_async file controls the switch allowing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) user space to enable or disable asynchronous suspend and resume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) of devices. If enabled, this feature will cause some device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) drivers' suspend and resume callbacks to be executed in parallel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) with each other and with the main suspend thread. It is enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) if this file contains "1", which is the default. It may be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) disabled by writing "0" to this file, in which case all devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) will be suspended and resumed synchronously.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) What: /sys/power/wakeup_count
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) Date: July 2010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) The /sys/power/wakeup_count file allows user space to put the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) system into a sleep state while taking into account the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) concurrent arrival of wakeup events. Reading from it returns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) the current number of registered wakeup events and it blocks if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) some wakeup events are being processed at the time the file is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) read from. Writing to it will only succeed if the current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) number of wakeup events is equal to the written value and, if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) successful, will make the kernel abort a subsequent transition
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) to a sleep state if any wakeup events are reported after the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) write has returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) What: /sys/power/reserved_size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) Date: May 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) The /sys/power/reserved_size file allows user space to control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) the amount of memory reserved for allocations made by device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) drivers during the "device freeze" stage of hibernation. It can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) be written a string representing a non-negative integer that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) will be used as the amount of memory to reserve for allocations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) made by device drivers' "freeze" callbacks, in bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) Reading from this file will display the current value, which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) set to 1 MB by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) What: /sys/power/autosleep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) Date: April 2012
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) The /sys/power/autosleep file can be written one of the strings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) returned by reads from /sys/power/state. If that happens, a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) work item attempting to trigger a transition of the system to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) the sleep state represented by that string is queued up. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) attempt will only succeed if there are no active wakeup sources
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) in the system at that time. After every execution, regardless
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) of whether or not the attempt to put the system to sleep has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) succeeded, the work item requeues itself until user space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) writes "off" to /sys/power/autosleep.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) Reading from this file causes the last string successfully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) written to it to be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) What: /sys/power/wake_lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) Date: February 2012
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) The /sys/power/wake_lock file allows user space to create
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) wakeup source objects and activate them on demand (if one of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) those wakeup sources is active, reads from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) /sys/power/wakeup_count file block or return false). When a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) string without white space is written to /sys/power/wake_lock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) it will be assumed to represent a wakeup source name. If there
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) is a wakeup source object with that name, it will be activated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) (unless active already). Otherwise, a new wakeup source object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) will be registered, assigned the given name and activated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) If a string written to /sys/power/wake_lock contains white
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) space, the part of the string preceding the white space will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) regarded as a wakeup source name and handled as descrived above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) The other part of the string will be regarded as a timeout (in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) nanoseconds) such that the wakeup source will be automatically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) deactivated after it has expired. The timeout, if present, is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) set regardless of the current state of the wakeup source object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) in question.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) Reads from this file return a string consisting of the names of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) wakeup sources created with the help of it that are active at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) the moment, separated with spaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) What: /sys/power/wake_unlock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) Date: February 2012
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) The /sys/power/wake_unlock file allows user space to deactivate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) wakeup sources created with the help of /sys/power/wake_lock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) When a string is written to /sys/power/wake_unlock, it will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) assumed to represent the name of a wakeup source to deactivate.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) If a wakeup source object of that name exists and is active at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) the moment, it will be deactivated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) Reads from this file return a string consisting of the names of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) wakeup sources created with the help of /sys/power/wake_lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) that are inactive at the moment, separated with spaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) What: /sys/power/pm_print_times
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) Date: May 2012
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) Contact: Sameer Nanda <snanda@chromium.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) The /sys/power/pm_print_times file allows user space to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) control whether the time taken by devices to suspend and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) resume is printed. These prints are useful for hunting down
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) devices that take too long to suspend or resume.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) Writing a "1" enables this printing while writing a "0"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) disables it. The default value is "0". Reading from this file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) will display the current value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) What: /sys/power/pm_wakeup_irq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) Date: April 2015
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) Contact: Alexandra Yates <alexandra.yates@linux.intel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) The /sys/power/pm_wakeup_irq file reports to user space the IRQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) number of the first wakeup interrupt (that is, the first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) interrupt from an IRQ line armed for system wakeup) seen by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) kernel during the most recent system suspend/resume cycle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) This output is useful for system wakeup diagnostics of spurious
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) wakeup interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) What: /sys/power/pm_debug_messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) Date: July 2017
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) The /sys/power/pm_debug_messages file controls the printing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) of debug messages from the system suspend/hiberbation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) infrastructure to the kernel log.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) Writing a "1" to this file enables the debug messages and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) writing a "0" (default) to it disables them. Reads from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) this file return the current value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) What: /sys/power/resume_offset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) Date: April 2018
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) Contact: Mario Limonciello <mario.limonciello@dell.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) This file is used for telling the kernel an offset into a disk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) to use when hibernating the system such as with a swap file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) Reads from this file will display the current offset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) the kernel will be using on the next hibernation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) attempt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) Using this sysfs file will override any values that were
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) set using the kernel command line for disk offset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) What: /sys/power/suspend_stats
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) The /sys/power/suspend_stats directory contains suspend related
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) statistics.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) What: /sys/power/suspend_stats/success
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) The /sys/power/suspend_stats/success file contains the number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) of times entering system sleep state succeeded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) What: /sys/power/suspend_stats/fail
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) The /sys/power/suspend_stats/fail file contains the number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) of times entering system sleep state failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) What: /sys/power/suspend_stats/failed_freeze
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) The /sys/power/suspend_stats/failed_freeze file contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) number of times freezing processes failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) What: /sys/power/suspend_stats/failed_prepare
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) The /sys/power/suspend_stats/failed_prepare file contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) number of times preparing all non-sysdev devices for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) a system PM transition failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) What: /sys/power/suspend_stats/failed_resume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) The /sys/power/suspend_stats/failed_resume file contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) number of times executing "resume" callbacks of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) non-sysdev devices failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) What: /sys/power/suspend_stats/failed_resume_early
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) The /sys/power/suspend_stats/failed_resume_early file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) the number of times executing "early resume" callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) of devices failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) What: /sys/power/suspend_stats/failed_resume_noirq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) The /sys/power/suspend_stats/failed_resume_noirq file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) the number of times executing "noirq resume" callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) of devices failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) What: /sys/power/suspend_stats/failed_suspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) The /sys/power/suspend_stats/failed_suspend file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) the number of times executing "suspend" callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) of all non-sysdev devices failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) What: /sys/power/suspend_stats/failed_suspend_late
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) The /sys/power/suspend_stats/failed_suspend_late file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) the number of times executing "late suspend" callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) of all devices failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) What: /sys/power/suspend_stats/failed_suspend_noirq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) The /sys/power/suspend_stats/failed_suspend_noirq file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) the number of times executing "noirq suspend" callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) of all devices failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) What: /sys/power/suspend_stats/last_failed_dev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) The /sys/power/suspend_stats/last_failed_dev file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) the last device for which a suspend/resume callback failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) What: /sys/power/suspend_stats/last_failed_errno
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) The /sys/power/suspend_stats/last_failed_errno file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) the errno of the last failed attempt at entering
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) system sleep state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) What: /sys/power/suspend_stats/last_failed_step
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) Date: July 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) Contact: Kalesh Singh <kaleshsingh96@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) The /sys/power/suspend_stats/last_failed_step file contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) the last failed step in the suspend/resume path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) What: /sys/power/sync_on_suspend
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) Date: October 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) Contact: Jonas Meurer <jonas@freesources.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) This file controls whether or not the kernel will sync()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) filesystems during system suspend (after freezing user space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) and before suspending devices).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) Writing a "1" to this file enables the sync() and writing a "0"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) disables it. Reads from the file return the current value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) The default is "1" if the build-time "SUSPEND_SKIP_SYNC" config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) flag is unset, or "0" otherwise.