xref: /openbmc/linux/Documentation/ABI/testing/sysfs-power (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
184ed64eeSRafael J. WysockiWhat:		/sys/power/
284ed64eeSRafael J. WysockiDate:		August 2006
349db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
484ed64eeSRafael J. WysockiDescription:
584ed64eeSRafael J. Wysocki		The /sys/power directory will contain files that will
684ed64eeSRafael J. Wysocki		provide a unified interface to the power management
784ed64eeSRafael J. Wysocki		subsystem.
884ed64eeSRafael J. Wysocki
984ed64eeSRafael J. WysockiWhat:		/sys/power/state
10406e7938SRafael J. WysockiDate:		November 2016
1149db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
1284ed64eeSRafael J. WysockiDescription:
130399d4dbSRafael J. Wysocki		The /sys/power/state file controls system sleep states.
140399d4dbSRafael J. Wysocki		Reading from this file returns the available sleep state
15406e7938SRafael J. Wysocki		labels, which may be "mem" (suspend), "standby" (power-on
16406e7938SRafael J. Wysocki		suspend), "freeze" (suspend-to-idle) and "disk" (hibernation).
1784ed64eeSRafael J. Wysocki
18406e7938SRafael J. Wysocki		Writing one of the above strings to this file causes the system
19406e7938SRafael J. Wysocki		to transition into the corresponding state, if available.
20406e7938SRafael J. Wysocki
213ba9b1b8STom Saeger		See Documentation/admin-guide/pm/sleep-states.rst for more
223ba9b1b8STom Saeger		information.
23406e7938SRafael J. Wysocki
24406e7938SRafael J. WysockiWhat:		/sys/power/mem_sleep
25406e7938SRafael J. WysockiDate:		November 2016
26406e7938SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
27406e7938SRafael J. WysockiDescription:
28406e7938SRafael J. Wysocki		The /sys/power/mem_sleep file controls the operating mode of
29406e7938SRafael J. Wysocki		system suspend.  Reading from it returns the available modes
30406e7938SRafael J. Wysocki		as "s2idle" (always present), "shallow" and "deep" (present if
31406e7938SRafael J. Wysocki		supported).  The mode that will be used on subsequent attempts
32406e7938SRafael J. Wysocki		to suspend the system (by writing "mem" to the /sys/power/state
33406e7938SRafael J. Wysocki		file described above) is enclosed in square brackets.
34406e7938SRafael J. Wysocki
35406e7938SRafael J. Wysocki		Writing one of the above strings to this file causes the mode
36406e7938SRafael J. Wysocki		represented by it to be used on subsequent attempts to suspend
37406e7938SRafael J. Wysocki		the system.
38406e7938SRafael J. Wysocki
393ba9b1b8STom Saeger		See Documentation/admin-guide/pm/sleep-states.rst for more
403ba9b1b8STom Saeger		information.
4184ed64eeSRafael J. Wysocki
4284ed64eeSRafael J. WysockiWhat:		/sys/power/disk
43b918f6e6SRafael J. WysockiDate:		September 2006
4449db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
4584ed64eeSRafael J. WysockiDescription:
4684ed64eeSRafael J. Wysocki		The /sys/power/disk file controls the operating mode of the
4784ed64eeSRafael J. Wysocki		suspend-to-disk mechanism.  Reading from this file returns
4884ed64eeSRafael J. Wysocki		the name of the method by which the system will be put to
4984ed64eeSRafael J. Wysocki		sleep on the next suspend.  There are four methods supported:
5054a19b4dSMauro Carvalho Chehab
5184ed64eeSRafael J. Wysocki		'firmware' - means that the memory image will be saved to disk
5284ed64eeSRafael J. Wysocki		by some firmware, in which case we also assume that the
5384ed64eeSRafael J. Wysocki		firmware will handle the system suspend.
5454a19b4dSMauro Carvalho Chehab
5584ed64eeSRafael J. Wysocki		'platform' - the memory image will be saved by the kernel and
5684ed64eeSRafael J. Wysocki		the system will be put to sleep by the platform driver (e.g.
5784ed64eeSRafael J. Wysocki		ACPI or other PM registers).
5854a19b4dSMauro Carvalho Chehab
5984ed64eeSRafael J. Wysocki		'shutdown' - the memory image will be saved by the kernel and
6084ed64eeSRafael J. Wysocki		the system will be powered off.
6154a19b4dSMauro Carvalho Chehab
6284ed64eeSRafael J. Wysocki		'reboot' - the memory image will be saved by the kernel and
6384ed64eeSRafael J. Wysocki		the system will be rebooted.
6484ed64eeSRafael J. Wysocki
65b918f6e6SRafael J. Wysocki		Additionally, /sys/power/disk can be used to turn on one of the
66b918f6e6SRafael J. Wysocki		two testing modes of the suspend-to-disk mechanism: 'testproc'
67b918f6e6SRafael J. Wysocki		or 'test'.  If the suspend-to-disk mechanism is in the
68b918f6e6SRafael J. Wysocki		'testproc' mode, writing 'disk' to /sys/power/state will cause
69b918f6e6SRafael J. Wysocki		the kernel to disable nonboot CPUs and freeze tasks, wait for 5
70b918f6e6SRafael J. Wysocki		seconds, unfreeze tasks and enable nonboot CPUs.  If it is in
71b918f6e6SRafael J. Wysocki		the 'test' mode, writing 'disk' to /sys/power/state will cause
72b918f6e6SRafael J. Wysocki		the kernel to disable nonboot CPUs and freeze tasks, shrink
73b918f6e6SRafael J. Wysocki		memory, suspend devices, wait for 5 seconds, resume devices,
74b918f6e6SRafael J. Wysocki		unfreeze tasks and enable nonboot CPUs.  Then, we are able to
75b918f6e6SRafael J. Wysocki		look in the log messages and work out, for example, which code
76b918f6e6SRafael J. Wysocki		is being slow and which device drivers are misbehaving.
77b918f6e6SRafael J. Wysocki
7884ed64eeSRafael J. Wysocki		The suspend-to-disk method may be chosen by writing to this
7984ed64eeSRafael J. Wysocki		file one of the accepted strings:
8084ed64eeSRafael J. Wysocki
8154a19b4dSMauro Carvalho Chehab		- 'firmware'
8254a19b4dSMauro Carvalho Chehab		- 'platform'
8354a19b4dSMauro Carvalho Chehab		- 'shutdown'
8454a19b4dSMauro Carvalho Chehab		- 'reboot'
8554a19b4dSMauro Carvalho Chehab		- 'testproc'
8654a19b4dSMauro Carvalho Chehab		- 'test'
8784ed64eeSRafael J. Wysocki
8884ed64eeSRafael J. Wysocki		It will only change to 'firmware' or 'platform' if the system
8984ed64eeSRafael J. Wysocki		supports that.
9084ed64eeSRafael J. Wysocki
9184ed64eeSRafael J. WysockiWhat:		/sys/power/image_size
9284ed64eeSRafael J. WysockiDate:		August 2006
9349db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
9484ed64eeSRafael J. WysockiDescription:
9584ed64eeSRafael J. Wysocki		The /sys/power/image_size file controls the size of the image
9684ed64eeSRafael J. Wysocki		created by the suspend-to-disk mechanism.  It can be written a
9784ed64eeSRafael J. Wysocki		string representing a non-negative integer that will be used
9884ed64eeSRafael J. Wysocki		as an upper limit of the image size, in bytes.  The kernel's
9984ed64eeSRafael J. Wysocki		suspend-to-disk code will do its best to ensure the image size
10084ed64eeSRafael J. Wysocki		will not exceed this number.  However, if it turns out to be
10184ed64eeSRafael J. Wysocki		impossible, the kernel will try to suspend anyway using the
10284ed64eeSRafael J. Wysocki		smallest image possible.  In particular, if "0" is written to
10384ed64eeSRafael J. Wysocki		this file, the suspend image will be as small as possible.
10484ed64eeSRafael J. Wysocki
10584ed64eeSRafael J. Wysocki		Reading from this file will display the current image size
1063bb75644SVladimir D. Seleznev		limit, which is set to around 2/5 of available RAM by default.
10784ed64eeSRafael J. Wysocki
10884ed64eeSRafael J. WysockiWhat:		/sys/power/pm_trace
10984ed64eeSRafael J. WysockiDate:		August 2006
11049db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
11184ed64eeSRafael J. WysockiDescription:
11284ed64eeSRafael J. Wysocki		The /sys/power/pm_trace file controls the code which saves the
11384ed64eeSRafael J. Wysocki		last PM event point in the RTC across reboots, so that you can
11484ed64eeSRafael J. Wysocki		debug a machine that just hangs during suspend (or more
11584ed64eeSRafael J. Wysocki		commonly, during resume).  Namely, the RTC is only used to save
11684ed64eeSRafael J. Wysocki		the last PM event point if this file contains '1'.  Initially
11784ed64eeSRafael J. Wysocki		it contains '0' which may be changed to '1' by writing a
11884ed64eeSRafael J. Wysocki		string representing a nonzero integer into it.
11984ed64eeSRafael J. Wysocki
12084ed64eeSRafael J. Wysocki		To use this debugging feature you should attempt to suspend
12154a19b4dSMauro Carvalho Chehab		the machine, then reboot it and run::
12284ed64eeSRafael J. Wysocki
12384ed64eeSRafael J. Wysocki		  dmesg -s 1000000 | grep 'hash matches'
12484ed64eeSRafael J. Wysocki
125d33ac60bSJames Hogan		If you do not get any matches (or they appear to be false
126d33ac60bSJames Hogan		positives), it is possible that the last PM event point
127d33ac60bSJames Hogan		referred to a device created by a loadable kernel module.  In
128d33ac60bSJames Hogan		this case cat /sys/power/pm_trace_dev_match (see below) after
129d33ac60bSJames Hogan		your system is started up and the kernel modules are loaded.
130d33ac60bSJames Hogan
13184ed64eeSRafael J. Wysocki		CAUTION: Using it will cause your machine's real-time (CMOS)
13284ed64eeSRafael J. Wysocki		clock to be set to a random invalid time after a resume.
1330e06b4a8SRafael J. Wysocki
134d33ac60bSJames HoganWhat;		/sys/power/pm_trace_dev_match
135d33ac60bSJames HoganDate:		October 2010
136e0a86312SJames HoganContact:	James Hogan <jhogan@kernel.org>
137d33ac60bSJames HoganDescription:
138d33ac60bSJames Hogan		The /sys/power/pm_trace_dev_match file contains the name of the
139d33ac60bSJames Hogan		device associated with the last PM event point saved in the RTC
140d33ac60bSJames Hogan		across reboots when pm_trace has been used.  More precisely it
141d33ac60bSJames Hogan		contains the list of current devices (including those
142d33ac60bSJames Hogan		registered by loadable kernel modules since boot) which match
143d33ac60bSJames Hogan		the device hash in the RTC at boot, with a newline after each
144d33ac60bSJames Hogan		one.
145d33ac60bSJames Hogan
146d33ac60bSJames Hogan		The advantage of this file over the hash matches printed to the
147d33ac60bSJames Hogan		kernel log (see /sys/power/pm_trace), is that it includes
148d33ac60bSJames Hogan		devices created after boot by loadable kernel modules.
149d33ac60bSJames Hogan
150d33ac60bSJames Hogan		Due to the small hash size necessary to fit in the RTC, it is
151d33ac60bSJames Hogan		possible that more than one device matches the hash, in which
152d33ac60bSJames Hogan		case further investigation is required to determine which
153d33ac60bSJames Hogan		device is causing the problem.  Note that genuine RTC clock
154d33ac60bSJames Hogan		values (such as when pm_trace has not been used), can still
1558a7f0e8aSRandy Dunlap		match a device and output its name here.
156d33ac60bSJames Hogan
1570e06b4a8SRafael J. WysockiWhat:		/sys/power/pm_async
1580e06b4a8SRafael J. WysockiDate:		January 2009
15949db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
1600e06b4a8SRafael J. WysockiDescription:
1610e06b4a8SRafael J. Wysocki		The /sys/power/pm_async file controls the switch allowing the
1620e06b4a8SRafael J. Wysocki		user space to enable or disable asynchronous suspend and resume
1630e06b4a8SRafael J. Wysocki		of devices.  If enabled, this feature will cause some device
1640e06b4a8SRafael J. Wysocki		drivers' suspend and resume callbacks to be executed in parallel
1650e06b4a8SRafael J. Wysocki		with each other and with the main suspend thread.  It is enabled
1660e06b4a8SRafael J. Wysocki		if this file contains "1", which is the default.  It may be
1670e06b4a8SRafael J. Wysocki		disabled by writing "0" to this file, in which case all devices
1680e06b4a8SRafael J. Wysocki		will be suspended and resumed synchronously.
169c125e96fSRafael J. Wysocki
170c125e96fSRafael J. WysockiWhat:		/sys/power/wakeup_count
171c125e96fSRafael J. WysockiDate:		July 2010
17249db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
173c125e96fSRafael J. WysockiDescription:
174c125e96fSRafael J. Wysocki		The /sys/power/wakeup_count file allows user space to put the
175c125e96fSRafael J. Wysocki		system into a sleep state while taking into account the
176c125e96fSRafael J. Wysocki		concurrent arrival of wakeup events.  Reading from it returns
177c125e96fSRafael J. Wysocki		the current number of registered wakeup events and it blocks if
178c125e96fSRafael J. Wysocki		some wakeup events are being processed at the time the file is
179c125e96fSRafael J. Wysocki		read from.  Writing to it will only succeed if the current
180c125e96fSRafael J. Wysocki		number of wakeup events is equal to the written value and, if
181c125e96fSRafael J. Wysocki		successful, will make the kernel abort a subsequent transition
182c125e96fSRafael J. Wysocki		to a sleep state if any wakeup events are reported after the
183c125e96fSRafael J. Wysocki		write has returned.
184ddeb6487SRafael J. Wysocki
185ddeb6487SRafael J. WysockiWhat:		/sys/power/reserved_size
186ddeb6487SRafael J. WysockiDate:		May 2011
18749db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
188ddeb6487SRafael J. WysockiDescription:
189ddeb6487SRafael J. Wysocki		The /sys/power/reserved_size file allows user space to control
190ddeb6487SRafael J. Wysocki		the amount of memory reserved for allocations made by device
191ddeb6487SRafael J. Wysocki		drivers during the "device freeze" stage of hibernation.  It can
192ddeb6487SRafael J. Wysocki		be written a string representing a non-negative integer that
193ddeb6487SRafael J. Wysocki		will be used as the amount of memory to reserve for allocations
194ddeb6487SRafael J. Wysocki		made by device drivers' "freeze" callbacks, in bytes.
195ddeb6487SRafael J. Wysocki
196ddeb6487SRafael J. Wysocki		Reading from this file will display the current value, which is
197ddeb6487SRafael J. Wysocki		set to 1 MB by default.
1987483b4a4SRafael J. Wysocki
1997483b4a4SRafael J. WysockiWhat:		/sys/power/autosleep
2007483b4a4SRafael J. WysockiDate:		April 2012
20149db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
2027483b4a4SRafael J. WysockiDescription:
2037483b4a4SRafael J. Wysocki		The /sys/power/autosleep file can be written one of the strings
2047483b4a4SRafael J. Wysocki		returned by reads from /sys/power/state.  If that happens, a
2057483b4a4SRafael J. Wysocki		work item attempting to trigger a transition of the system to
2067483b4a4SRafael J. Wysocki		the sleep state represented by that string is queued up.  This
2077483b4a4SRafael J. Wysocki		attempt will only succeed if there are no active wakeup sources
2087483b4a4SRafael J. Wysocki		in the system at that time.  After every execution, regardless
2097483b4a4SRafael J. Wysocki		of whether or not the attempt to put the system to sleep has
2107483b4a4SRafael J. Wysocki		succeeded, the work item requeues itself until user space
2117483b4a4SRafael J. Wysocki		writes "off" to /sys/power/autosleep.
2127483b4a4SRafael J. Wysocki
2137483b4a4SRafael J. Wysocki		Reading from this file causes the last string successfully
2147483b4a4SRafael J. Wysocki		written to it to be returned.
215b86ff982SRafael J. Wysocki
216b86ff982SRafael J. WysockiWhat:		/sys/power/wake_lock
217b86ff982SRafael J. WysockiDate:		February 2012
21849db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
219b86ff982SRafael J. WysockiDescription:
220b86ff982SRafael J. Wysocki		The /sys/power/wake_lock file allows user space to create
221b86ff982SRafael J. Wysocki		wakeup source objects and activate them on demand (if one of
222b86ff982SRafael J. Wysocki		those wakeup sources is active, reads from the
223b86ff982SRafael J. Wysocki		/sys/power/wakeup_count file block or return false).  When a
224b86ff982SRafael J. Wysocki		string without white space is written to /sys/power/wake_lock,
225b86ff982SRafael J. Wysocki		it will be assumed to represent a wakeup source name.  If there
226b86ff982SRafael J. Wysocki		is a wakeup source object with that name, it will be activated
227b86ff982SRafael J. Wysocki		(unless active already).  Otherwise, a new wakeup source object
228b86ff982SRafael J. Wysocki		will be registered, assigned the given name and activated.
229b86ff982SRafael J. Wysocki		If a string written to /sys/power/wake_lock contains white
230b86ff982SRafael J. Wysocki		space, the part of the string preceding the white space will be
231b86ff982SRafael J. Wysocki		regarded as a wakeup source name and handled as descrived above.
232b86ff982SRafael J. Wysocki		The other part of the string will be regarded as a timeout (in
233b86ff982SRafael J. Wysocki		nanoseconds) such that the wakeup source will be automatically
234b86ff982SRafael J. Wysocki		deactivated after it has expired.  The timeout, if present, is
235b86ff982SRafael J. Wysocki		set regardless of the current state of the wakeup source object
236b86ff982SRafael J. Wysocki		in question.
237b86ff982SRafael J. Wysocki
238b86ff982SRafael J. Wysocki		Reads from this file return a string consisting of the names of
239b86ff982SRafael J. Wysocki		wakeup sources created with the help of it that are active at
240b86ff982SRafael J. Wysocki		the moment, separated with spaces.
241b86ff982SRafael J. Wysocki
242b86ff982SRafael J. Wysocki
243b86ff982SRafael J. WysockiWhat:		/sys/power/wake_unlock
244b86ff982SRafael J. WysockiDate:		February 2012
24549db1903SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
246b86ff982SRafael J. WysockiDescription:
247b86ff982SRafael J. Wysocki		The /sys/power/wake_unlock file allows user space to deactivate
248b86ff982SRafael J. Wysocki		wakeup sources created with the help of /sys/power/wake_lock.
249b86ff982SRafael J. Wysocki		When a string is written to /sys/power/wake_unlock, it will be
250b86ff982SRafael J. Wysocki		assumed to represent the name of a wakeup source to deactivate.
25154a19b4dSMauro Carvalho Chehab
252b86ff982SRafael J. Wysocki		If a wakeup source object of that name exists and is active at
253b86ff982SRafael J. Wysocki		the moment, it will be deactivated.
254b86ff982SRafael J. Wysocki
255b86ff982SRafael J. Wysocki		Reads from this file return a string consisting of the names of
256b86ff982SRafael J. Wysocki		wakeup sources created with the help of /sys/power/wake_lock
257b86ff982SRafael J. Wysocki		that are inactive at the moment, separated with spaces.
2584b7760baSSameer Nanda
2594b7760baSSameer NandaWhat:		/sys/power/pm_print_times
2604b7760baSSameer NandaDate:		May 2012
2614b7760baSSameer NandaContact:	Sameer Nanda <snanda@chromium.org>
2624b7760baSSameer NandaDescription:
2634b7760baSSameer Nanda		The /sys/power/pm_print_times file allows user space to
2644b7760baSSameer Nanda		control whether the time taken by devices to suspend and
2654b7760baSSameer Nanda		resume is printed.  These prints are useful for hunting down
2664b7760baSSameer Nanda		devices that take too long to suspend or resume.
2674b7760baSSameer Nanda
2684b7760baSSameer Nanda		Writing a "1" enables this printing while writing a "0"
2694b7760baSSameer Nanda		disables it.  The default value is "0".  Reading from this file
2704b7760baSSameer Nanda		will display the current value.
271a6f5f0ddSAlexandra Yates
272a6f5f0ddSAlexandra YatesWhat:		/sys/power/pm_wakeup_irq
273a6f5f0ddSAlexandra YatesDate:		April 2015
274a6f5f0ddSAlexandra YatesContact:	Alexandra Yates <alexandra.yates@linux.intel.org>
275a6f5f0ddSAlexandra YatesDescription:
276a6f5f0ddSAlexandra Yates		The /sys/power/pm_wakeup_irq file reports to user space the IRQ
277a6f5f0ddSAlexandra Yates		number of the first wakeup interrupt (that is, the first
278a6f5f0ddSAlexandra Yates		interrupt from an IRQ line armed for system wakeup) seen by the
279a6f5f0ddSAlexandra Yates		kernel during the most recent system suspend/resume cycle.
280a6f5f0ddSAlexandra Yates
281a6f5f0ddSAlexandra Yates		This output is useful for system wakeup diagnostics of spurious
282a6f5f0ddSAlexandra Yates		wakeup interrupts.
2838d8b2441SRafael J. Wysocki
2848d8b2441SRafael J. WysockiWhat:		/sys/power/pm_debug_messages
2858d8b2441SRafael J. WysockiDate:		July 2017
2868d8b2441SRafael J. WysockiContact:	Rafael J. Wysocki <rjw@rjwysocki.net>
2878d8b2441SRafael J. WysockiDescription:
2888d8b2441SRafael J. Wysocki		The /sys/power/pm_debug_messages file controls the printing
2898d8b2441SRafael J. Wysocki		of debug messages from the system suspend/hiberbation
2908d8b2441SRafael J. Wysocki		infrastructure to the kernel log.
2918d8b2441SRafael J. Wysocki
2928d8b2441SRafael J. Wysocki		Writing a "1" to this file enables the debug messages and
2938d8b2441SRafael J. Wysocki		writing a "0" (default) to it disables them.  Reads from
2948d8b2441SRafael J. Wysocki		this file return the current value.
29535506467SMario Limonciello
29635506467SMario LimoncielloWhat:		/sys/power/resume_offset
29735506467SMario LimoncielloDate:		April 2018
2988599a12bSHans de GoedeContact:	Mario Limonciello <mario.limonciello@outlook.com>
29935506467SMario LimoncielloDescription:
30035506467SMario Limonciello		This file is used for telling the kernel an offset into a disk
30135506467SMario Limonciello		to use when hibernating the system such as with a swap file.
30235506467SMario Limonciello
30335506467SMario Limonciello		Reads from this file will display the current offset
30435506467SMario Limonciello		the kernel will be using on the next hibernation
30535506467SMario Limonciello		attempt.
30635506467SMario Limonciello
30735506467SMario Limonciello		Using this sysfs file will override any values that were
30835506467SMario Limonciello		set using the kernel command line for disk offset.
3092c8db5beSKalesh Singh
3102c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats
3112c8db5beSKalesh SinghDate:		July 2019
3122c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3132c8db5beSKalesh SinghDescription:
3142c8db5beSKalesh Singh		The /sys/power/suspend_stats directory contains suspend related
3152c8db5beSKalesh Singh		statistics.
3162c8db5beSKalesh Singh
3172c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/success
3182c8db5beSKalesh SinghDate:		July 2019
3192c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3202c8db5beSKalesh SinghDescription:
3212c8db5beSKalesh Singh		The /sys/power/suspend_stats/success file contains the number
3222c8db5beSKalesh Singh		of times entering system sleep state succeeded.
3232c8db5beSKalesh Singh
3242c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/fail
3252c8db5beSKalesh SinghDate:		July 2019
3262c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3272c8db5beSKalesh SinghDescription:
3282c8db5beSKalesh Singh		The /sys/power/suspend_stats/fail file contains the number
3292c8db5beSKalesh Singh		of times entering system sleep state failed.
3302c8db5beSKalesh Singh
3312c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_freeze
3322c8db5beSKalesh SinghDate:		July 2019
3332c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3342c8db5beSKalesh SinghDescription:
3352c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_freeze file contains the
3362c8db5beSKalesh Singh		number of times freezing processes failed.
3372c8db5beSKalesh Singh
3382c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_prepare
3392c8db5beSKalesh SinghDate:		July 2019
3402c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3412c8db5beSKalesh SinghDescription:
3422c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_prepare file contains the
3432c8db5beSKalesh Singh		number of times preparing all non-sysdev devices for
3442c8db5beSKalesh Singh		a system PM transition failed.
3452c8db5beSKalesh Singh
3462c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_resume
3472c8db5beSKalesh SinghDate:		July 2019
3482c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3492c8db5beSKalesh SinghDescription:
3502c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_resume file contains the
3512c8db5beSKalesh Singh		number of times executing "resume" callbacks of
3522c8db5beSKalesh Singh		non-sysdev devices failed.
3532c8db5beSKalesh Singh
3542c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_resume_early
3552c8db5beSKalesh SinghDate:		July 2019
3562c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3572c8db5beSKalesh SinghDescription:
3582c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_resume_early file contains
3592c8db5beSKalesh Singh		the number of times executing "early resume" callbacks
3602c8db5beSKalesh Singh		of devices failed.
3612c8db5beSKalesh Singh
3622c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_resume_noirq
3632c8db5beSKalesh SinghDate:		July 2019
3642c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3652c8db5beSKalesh SinghDescription:
3662c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_resume_noirq file contains
3672c8db5beSKalesh Singh		the number of times executing "noirq resume" callbacks
3682c8db5beSKalesh Singh		of devices failed.
3692c8db5beSKalesh Singh
3702c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_suspend
3712c8db5beSKalesh SinghDate:		July 2019
3722c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3732c8db5beSKalesh SinghDescription:
3742c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_suspend file contains
3752c8db5beSKalesh Singh		the number of times executing "suspend" callbacks
3762c8db5beSKalesh Singh		of all non-sysdev devices failed.
3772c8db5beSKalesh Singh
3782c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_suspend_late
3792c8db5beSKalesh SinghDate:		July 2019
3802c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3812c8db5beSKalesh SinghDescription:
3822c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_suspend_late file contains
3832c8db5beSKalesh Singh		the number of times executing "late suspend" callbacks
3842c8db5beSKalesh Singh		of all devices failed.
3852c8db5beSKalesh Singh
3862c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/failed_suspend_noirq
3872c8db5beSKalesh SinghDate:		July 2019
3882c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3892c8db5beSKalesh SinghDescription:
3902c8db5beSKalesh Singh		The /sys/power/suspend_stats/failed_suspend_noirq file contains
3912c8db5beSKalesh Singh		the number of times executing "noirq suspend" callbacks
3922c8db5beSKalesh Singh		of all devices failed.
3932c8db5beSKalesh Singh
3942c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/last_failed_dev
3952c8db5beSKalesh SinghDate:		July 2019
3962c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
3972c8db5beSKalesh SinghDescription:
3982c8db5beSKalesh Singh		The /sys/power/suspend_stats/last_failed_dev file contains
3992c8db5beSKalesh Singh		the last device for which a suspend/resume callback failed.
4002c8db5beSKalesh Singh
4012c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/last_failed_errno
4022c8db5beSKalesh SinghDate:		July 2019
4032c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
4042c8db5beSKalesh SinghDescription:
4052c8db5beSKalesh Singh		The /sys/power/suspend_stats/last_failed_errno file contains
4062c8db5beSKalesh Singh		the errno of the last failed attempt at entering
4072c8db5beSKalesh Singh		system sleep state.
4082c8db5beSKalesh Singh
4092c8db5beSKalesh SinghWhat:		/sys/power/suspend_stats/last_failed_step
4102c8db5beSKalesh SinghDate:		July 2019
4112c8db5beSKalesh SinghContact:	Kalesh Singh <kaleshsingh96@gmail.com>
4122c8db5beSKalesh SinghDescription:
4132c8db5beSKalesh Singh		The /sys/power/suspend_stats/last_failed_step file contains
4142c8db5beSKalesh Singh		the last failed step in the suspend/resume path.
415c052bf82SJonas Meurer
416*b52124a7SMario LimoncielloWhat:		/sys/power/suspend_stats/last_hw_sleep
417*b52124a7SMario LimoncielloDate:		June 2023
418*b52124a7SMario LimoncielloContact:	Mario Limonciello <mario.limonciello@amd.com>
419*b52124a7SMario LimoncielloDescription:
420*b52124a7SMario Limonciello		The /sys/power/suspend_stats/last_hw_sleep file
421*b52124a7SMario Limonciello		contains the duration of time spent in a hardware sleep
422*b52124a7SMario Limonciello		state in the most recent system suspend-resume cycle.
423*b52124a7SMario Limonciello		This number is measured in microseconds.
424*b52124a7SMario Limonciello
425*b52124a7SMario LimoncielloWhat:		/sys/power/suspend_stats/total_hw_sleep
426*b52124a7SMario LimoncielloDate:		June 2023
427*b52124a7SMario LimoncielloContact:	Mario Limonciello <mario.limonciello@amd.com>
428*b52124a7SMario LimoncielloDescription:
429*b52124a7SMario Limonciello		The /sys/power/suspend_stats/total_hw_sleep file
430*b52124a7SMario Limonciello		contains the aggregate of time spent in a hardware sleep
431*b52124a7SMario Limonciello		state since the kernel was booted. This number
432*b52124a7SMario Limonciello		is measured in microseconds.
433*b52124a7SMario Limonciello
434*b52124a7SMario LimoncielloWhat:		/sys/power/suspend_stats/max_hw_sleep
435*b52124a7SMario LimoncielloDate:		June 2023
436*b52124a7SMario LimoncielloContact:	Mario Limonciello <mario.limonciello@amd.com>
437*b52124a7SMario LimoncielloDescription:
438*b52124a7SMario Limonciello		The /sys/power/suspend_stats/max_hw_sleep file
439*b52124a7SMario Limonciello		contains the maximum amount of time that the hardware can
440*b52124a7SMario Limonciello		report for time spent in a hardware sleep state. When sleep
441*b52124a7SMario Limonciello		cycles are longer than this time, the values for
442*b52124a7SMario Limonciello		'total_hw_sleep' and 'last_hw_sleep' may not be accurate.
443*b52124a7SMario Limonciello		This number is measured in microseconds.
444*b52124a7SMario Limonciello
445c052bf82SJonas MeurerWhat:		/sys/power/sync_on_suspend
446c052bf82SJonas MeurerDate:		October 2019
447c052bf82SJonas MeurerContact:	Jonas Meurer <jonas@freesources.org>
448c052bf82SJonas MeurerDescription:
449c052bf82SJonas Meurer		This file controls whether or not the kernel will sync()
450c052bf82SJonas Meurer		filesystems during system suspend (after freezing user space
451c052bf82SJonas Meurer		and before suspending devices).
452c052bf82SJonas Meurer
453c052bf82SJonas Meurer		Writing a "1" to this file enables the sync() and writing a "0"
454c052bf82SJonas Meurer		disables it.  Reads from the file return the current value.
455c052bf82SJonas Meurer		The default is "1" if the build-time "SUSPEND_SKIP_SYNC" config
456c052bf82SJonas Meurer		flag is unset, or "0" otherwise.
457