diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2006-08-30 17:38:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 00:08:38 -0400 |
commit | 84ed64ee8f7dfd89f59857124dbeb8a350c6e03d (patch) | |
tree | 90f63410a3f0d205cfafe221737754900812a0c9 /Documentation/ABI/testing | |
parent | 1d3a82af45428c5e8deaa119cdeb79611ae46371 (diff) |
PM: add /sys/power documentation to Documentation/ABI
The file sysfs-power that documents the interface in the /sys/power/ directory
is added to Documentation/ABI/testing.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/ABI/testing')
-rw-r--r-- | Documentation/ABI/testing/sysfs-power | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power new file mode 100644 index 000000000000..d882f8093871 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-power | |||
@@ -0,0 +1,88 @@ | |||
1 | What: /sys/power/ | ||
2 | Date: August 2006 | ||
3 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
4 | Description: | ||
5 | The /sys/power directory will contain files that will | ||
6 | provide a unified interface to the power management | ||
7 | subsystem. | ||
8 | |||
9 | What: /sys/power/state | ||
10 | Date: August 2006 | ||
11 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
12 | Description: | ||
13 | The /sys/power/state file controls the system power state. | ||
14 | Reading from this file returns what states are supported, | ||
15 | which is hard-coded to 'standby' (Power-On Suspend), 'mem' | ||
16 | (Suspend-to-RAM), and 'disk' (Suspend-to-Disk). | ||
17 | |||
18 | Writing to this file one of these strings causes the system to | ||
19 | transition into that state. Please see the file | ||
20 | Documentation/power/states.txt for a description of each of | ||
21 | these states. | ||
22 | |||
23 | What: /sys/power/disk | ||
24 | Date: August 2006 | ||
25 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
26 | Description: | ||
27 | The /sys/power/disk file controls the operating mode of the | ||
28 | suspend-to-disk mechanism. Reading from this file returns | ||
29 | the name of the method by which the system will be put to | ||
30 | sleep on the next suspend. There are four methods supported: | ||
31 | 'firmware' - means that the memory image will be saved to disk | ||
32 | by some firmware, in which case we also assume that the | ||
33 | firmware will handle the system suspend. | ||
34 | 'platform' - the memory image will be saved by the kernel and | ||
35 | the system will be put to sleep by the platform driver (e.g. | ||
36 | ACPI or other PM registers). | ||
37 | 'shutdown' - the memory image will be saved by the kernel and | ||
38 | the system will be powered off. | ||
39 | 'reboot' - the memory image will be saved by the kernel and | ||
40 | the system will be rebooted. | ||
41 | |||
42 | The suspend-to-disk method may be chosen by writing to this | ||
43 | file one of the accepted strings: | ||
44 | |||
45 | 'firmware' | ||
46 | 'platform' | ||
47 | 'shutdown' | ||
48 | 'reboot' | ||
49 | |||
50 | It will only change to 'firmware' or 'platform' if the system | ||
51 | supports that. | ||
52 | |||
53 | What: /sys/power/image_size | ||
54 | Date: August 2006 | ||
55 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
56 | Description: | ||
57 | The /sys/power/image_size file controls the size of the image | ||
58 | created by the suspend-to-disk mechanism. It can be written a | ||
59 | string representing a non-negative integer that will be used | ||
60 | as an upper limit of the image size, in bytes. The kernel's | ||
61 | suspend-to-disk code will do its best to ensure the image size | ||
62 | will not exceed this number. However, if it turns out to be | ||
63 | impossible, the kernel will try to suspend anyway using the | ||
64 | smallest image possible. In particular, if "0" is written to | ||
65 | this file, the suspend image will be as small as possible. | ||
66 | |||
67 | Reading from this file will display the current image size | ||
68 | limit, which is set to 500 MB by default. | ||
69 | |||
70 | What: /sys/power/pm_trace | ||
71 | Date: August 2006 | ||
72 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
73 | Description: | ||
74 | The /sys/power/pm_trace file controls the code which saves the | ||
75 | last PM event point in the RTC across reboots, so that you can | ||
76 | debug a machine that just hangs during suspend (or more | ||
77 | commonly, during resume). Namely, the RTC is only used to save | ||
78 | the last PM event point if this file contains '1'. Initially | ||
79 | it contains '0' which may be changed to '1' by writing a | ||
80 | string representing a nonzero integer into it. | ||
81 | |||
82 | To use this debugging feature you should attempt to suspend | ||
83 | the machine, then reboot it and run | ||
84 | |||
85 | dmesg -s 1000000 | grep 'hash matches' | ||
86 | |||
87 | CAUTION: Using it will cause your machine's real-time (CMOS) | ||
88 | clock to be set to a random invalid time after a resume. | ||