hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/Documentation/ABI/testing/sysfs-power
....@@ -47,14 +47,18 @@
4747 suspend-to-disk mechanism. Reading from this file returns
4848 the name of the method by which the system will be put to
4949 sleep on the next suspend. There are four methods supported:
50
+
5051 'firmware' - means that the memory image will be saved to disk
5152 by some firmware, in which case we also assume that the
5253 firmware will handle the system suspend.
54
+
5355 'platform' - the memory image will be saved by the kernel and
5456 the system will be put to sleep by the platform driver (e.g.
5557 ACPI or other PM registers).
58
+
5659 'shutdown' - the memory image will be saved by the kernel and
5760 the system will be powered off.
61
+
5862 'reboot' - the memory image will be saved by the kernel and
5963 the system will be rebooted.
6064
....@@ -74,12 +78,12 @@
7478 The suspend-to-disk method may be chosen by writing to this
7579 file one of the accepted strings:
7680
77
- 'firmware'
78
- 'platform'
79
- 'shutdown'
80
- 'reboot'
81
- 'testproc'
82
- 'test'
81
+ - 'firmware'
82
+ - 'platform'
83
+ - 'shutdown'
84
+ - 'reboot'
85
+ - 'testproc'
86
+ - 'test'
8387
8488 It will only change to 'firmware' or 'platform' if the system
8589 supports that.
....@@ -99,7 +103,7 @@
99103 this file, the suspend image will be as small as possible.
100104
101105 Reading from this file will display the current image size
102
- limit, which is set to 500 MB by default.
106
+ limit, which is set to around 2/5 of available RAM by default.
103107
104108 What: /sys/power/pm_trace
105109 Date: August 2006
....@@ -114,9 +118,9 @@
114118 string representing a nonzero integer into it.
115119
116120 To use this debugging feature you should attempt to suspend
117
- the machine, then reboot it and run
121
+ the machine, then reboot it and run::
118122
119
- dmesg -s 1000000 | grep 'hash matches'
123
+ dmesg -s 1000000 | grep 'hash matches'
120124
121125 If you do not get any matches (or they appear to be false
122126 positives), it is possible that the last PM event point
....@@ -244,6 +248,7 @@
244248 wakeup sources created with the help of /sys/power/wake_lock.
245249 When a string is written to /sys/power/wake_unlock, it will be
246250 assumed to represent the name of a wakeup source to deactivate.
251
+
247252 If a wakeup source object of that name exists and is active at
248253 the moment, it will be deactivated.
249254
....@@ -407,3 +412,16 @@
407412 Description:
408413 The /sys/power/suspend_stats/last_failed_step file contains
409414 the last failed step in the suspend/resume path.
415
+
416
+What: /sys/power/sync_on_suspend
417
+Date: October 2019
418
+Contact: Jonas Meurer <jonas@freesources.org>
419
+Description:
420
+ This file controls whether or not the kernel will sync()
421
+ filesystems during system suspend (after freezing user space
422
+ and before suspending devices).
423
+
424
+ Writing a "1" to this file enables the sync() and writing a "0"
425
+ disables it. Reads from the file return the current value.
426
+ The default is "1" if the build-time "SUSPEND_SKIP_SYNC" config
427
+ flag is unset, or "0" otherwise.