]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - Documentation/ABI/testing/sysfs-devices-power
UBUNTU: SAUCE: Synchronize MDS mitigations with upstream
[mirror_ubuntu-bionic-kernel.git] / Documentation / ABI / testing / sysfs-devices-power
CommitLineData
971cb7fb
RW
1What: /sys/devices/.../power/
2Date: January 2009
49db1903 3Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
971cb7fb
RW
4Description:
5 The /sys/devices/.../power directory contains attributes
6 allowing the user space to check and modify some power
7 management related properties of given device.
8
9What: /sys/devices/.../power/wakeup
10Date: January 2009
49db1903 11Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
971cb7fb
RW
12Description:
13 The /sys/devices/.../power/wakeup attribute allows the user
14 space to check if the device is enabled to wake up the system
15 from sleep states, such as the memory sleep state (suspend to
16 RAM) and hibernation (suspend to disk), and to enable or disable
17 it to do that as desired.
18
19 Some devices support "wakeup" events, which are hardware signals
20 used to activate the system from a sleep state. Such devices
21 have one of the following two values for the sysfs power/wakeup
22 file:
23
24 + "enabled\n" to issue the events;
25 + "disabled\n" not to do so;
26
27 In that cases the user space can change the setting represented
28 by the contents of this file by writing either "enabled", or
29 "disabled" to it.
30
31 For the devices that are not capable of generating system wakeup
cb8f51bd
RW
32 events this file is not present. In that case the device cannot
33 be enabled to wake up the system from sleep states.
971cb7fb
RW
34
35What: /sys/devices/.../power/control
36Date: January 2009
49db1903 37Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
971cb7fb
RW
38Description:
39 The /sys/devices/.../power/control attribute allows the user
40 space to control the run-time power management of the device.
41
42 All devices have one of the following two values for the
43 power/control file:
44
45 + "auto\n" to allow the device to be power managed at run time;
46 + "on\n" to prevent the device from being power managed;
47
48 The default for all devices is "auto", which means that they may
49 be subject to automatic power management, depending on their
50 drivers. Changing this attribute to "on" prevents the driver
51 from power managing the device at run time. Doing that while
52 the device is suspended causes it to be woken up.
5a2eb858
RW
53
54What: /sys/devices/.../power/async
55Date: January 2009
49db1903 56Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
5a2eb858
RW
57Description:
58 The /sys/devices/.../async attribute allows the user space to
59 enable or diasble the device's suspend and resume callbacks to
60 be executed asynchronously (ie. in separate threads, in parallel
61 with the main suspend/resume thread) during system-wide power
62 transitions (eg. suspend to RAM, hibernation).
63
64 All devices have one of the following two values for the
65 power/async file:
66
67 + "enabled\n" to permit the asynchronous suspend/resume;
68 + "disabled\n" to forbid it;
69
70 The value of this attribute may be changed by writing either
71 "enabled", or "disabled" to it.
72
73 It generally is unsafe to permit the asynchronous suspend/resume
74 of a device unless it is certain that all of the PM dependencies
75 of the device are known to the PM core. However, for some
76 devices this attribute is set to "enabled" by bus type code or
77 device drivers and in that cases it should be safe to leave the
78 default value.
074037ec
RW
79
80What: /sys/devices/.../power/wakeup_count
81Date: September 2010
49db1903 82Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec
RW
83Description:
84 The /sys/devices/.../wakeup_count attribute contains the number
85 of signaled wakeup events associated with the device. This
d0549801 86 attribute is read-only. If the device is not capable to wake up
cb8f51bd 87 the system from sleep states, this attribute is not present.
d0549801
GU
88 If the device is not enabled to wake up the system from sleep
89 states, this attribute is empty.
074037ec
RW
90
91What: /sys/devices/.../power/wakeup_active_count
92Date: September 2010
49db1903 93Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec
RW
94Description:
95 The /sys/devices/.../wakeup_active_count attribute contains the
96 number of times the processing of wakeup events associated with
97 the device was completed (at the kernel level). This attribute
d0549801
GU
98 is read-only. If the device is not capable to wake up the
99 system from sleep states, this attribute is not present. If
100 the device is not enabled to wake up the system from sleep
101 states, this attribute is empty.
074037ec 102
30e3ce6d
RW
103What: /sys/devices/.../power/wakeup_abort_count
104Date: February 2012
49db1903 105Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec 106Description:
30e3ce6d 107 The /sys/devices/.../wakeup_abort_count attribute contains the
074037ec 108 number of times the processing of a wakeup event associated with
30e3ce6d
RW
109 the device might have aborted system transition into a sleep
110 state in progress. This attribute is read-only. If the device
d0549801
GU
111 is not capable to wake up the system from sleep states, this
112 attribute is not present. If the device is not enabled to wake
113 up the system from sleep states, this attribute is empty.
30e3ce6d
RW
114
115What: /sys/devices/.../power/wakeup_expire_count
116Date: February 2012
49db1903 117Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
30e3ce6d
RW
118Description:
119 The /sys/devices/.../wakeup_expire_count attribute contains the
120 number of times a wakeup event associated with the device has
121 been reported with a timeout that expired. This attribute is
d0549801
GU
122 read-only. If the device is not capable to wake up the system
123 from sleep states, this attribute is not present. If the
124 device is not enabled to wake up the system from sleep states,
125 this attribute is empty.
074037ec
RW
126
127What: /sys/devices/.../power/wakeup_active
128Date: September 2010
49db1903 129Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec
RW
130Description:
131 The /sys/devices/.../wakeup_active attribute contains either 1,
132 or 0, depending on whether or not a wakeup event associated with
133 the device is being processed (1). This attribute is read-only.
d0549801
GU
134 If the device is not capable to wake up the system from sleep
135 states, this attribute is not present. If the device is not
136 enabled to wake up the system from sleep states, this attribute
137 is empty.
074037ec
RW
138
139What: /sys/devices/.../power/wakeup_total_time_ms
140Date: September 2010
49db1903 141Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec
RW
142Description:
143 The /sys/devices/.../wakeup_total_time_ms attribute contains
144 the total time of processing wakeup events associated with the
145 device, in milliseconds. This attribute is read-only. If the
d0549801
GU
146 device is not capable to wake up the system from sleep states,
147 this attribute is not present. If the device is not enabled to
148 wake up the system from sleep states, this attribute is empty.
074037ec
RW
149
150What: /sys/devices/.../power/wakeup_max_time_ms
151Date: September 2010
49db1903 152Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec
RW
153Description:
154 The /sys/devices/.../wakeup_max_time_ms attribute contains
155 the maximum time of processing a single wakeup event associated
156 with the device, in milliseconds. This attribute is read-only.
d0549801
GU
157 If the device is not capable to wake up the system from sleep
158 states, this attribute is not present. If the device is not
159 enabled to wake up the system from sleep states, this attribute
160 is empty.
074037ec
RW
161
162What: /sys/devices/.../power/wakeup_last_time_ms
163Date: September 2010
49db1903 164Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
074037ec
RW
165Description:
166 The /sys/devices/.../wakeup_last_time_ms attribute contains
167 the value of the monotonic clock corresponding to the time of
168 signaling the last wakeup event associated with the device, in
169 milliseconds. This attribute is read-only. If the device is
170 not enabled to wake up the system from sleep states, this
d0549801
GU
171 attribute is not present. If the device is not enabled to wake
172 up the system from sleep states, this attribute is empty.
15bcb91d 173
55850945
RW
174What: /sys/devices/.../power/wakeup_prevent_sleep_time_ms
175Date: February 2012
49db1903 176Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
55850945
RW
177Description:
178 The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute
179 contains the total time the device has been preventing
4e79162a 180 opportunistic transitions to sleep states from occurring.
d0549801 181 This attribute is read-only. If the device is not capable to
55850945 182 wake up the system from sleep states, this attribute is not
d0549801
GU
183 present. If the device is not enabled to wake up the system
184 from sleep states, this attribute is empty.
55850945 185
15bcb91d
AS
186What: /sys/devices/.../power/autosuspend_delay_ms
187Date: September 2010
188Contact: Alan Stern <stern@rowland.harvard.edu>
189Description:
190 The /sys/devices/.../power/autosuspend_delay_ms attribute
191 contains the autosuspend delay value (in milliseconds). Some
192 drivers do not want their device to suspend as soon as it
193 becomes idle at run time; they want the device to remain
194 inactive for a certain minimum period of time first. That
195 period is called the autosuspend delay. Negative values will
196 prevent the device from being suspended at run time (similar
197 to writing "on" to the power/control attribute). Values >=
198 1000 will cause the autosuspend timer expiration to be rounded
199 up to the nearest second.
200
201 Not all drivers support this attribute. If it isn't supported,
202 attempts to read or write it will yield I/O errors.
85dc0b8a 203
2d984ad1 204What: /sys/devices/.../power/pm_qos_resume_latency_us
85dc0b8a 205Date: March 2012
49db1903 206Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
85dc0b8a
RW
207Description:
208 The /sys/devices/.../power/pm_qos_resume_latency_us attribute
209 contains the PM QoS resume latency limit for the given device,
210 which is the maximum allowed time it can take to resume the
211 device, after it has been suspended at run time, from a resume
212 request to the moment the device will be ready to process I/O,
213 in microseconds. If it is equal to 0, however, this means that
0759e80b
RW
214 the PM QoS resume latency may be arbitrary and the special value
215 "n/a" means that user space cannot accept any resume latency at
216 all for the given device.
85dc0b8a
RW
217
218 Not all drivers support this attribute. If it isn't supported,
219 it is not present.
220
221 This attribute has no effect on system-wide suspend/resume and
222 hibernation.
e39473d0 223
2d984ad1
RW
224What: /sys/devices/.../power/pm_qos_latency_tolerance_us
225Date: January 2014
226Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
227Description:
228 The /sys/devices/.../power/pm_qos_latency_tolerance_us attribute
229 contains the PM QoS active state latency tolerance limit for the
230 given device in microseconds. That is the maximum memory access
231 latency the device can suffer without any visible adverse
232 effects on user space functionality. If that value is the
233 string "any", the latency does not matter to user space at all,
234 but hardware should not be allowed to set the latency tolerance
235 for the device automatically.
236
237 Reading "auto" from this file means that the maximum memory
238 access latency for the device may be determined automatically
239 by the hardware as needed. Writing "auto" to it allows the
240 hardware to be switched to this mode if there are no other
241 latency tolerance requirements from the kernel side.
242
243 This attribute is only present if the feature controlled by it
244 is supported by the hardware.
245
246 This attribute has no effect on runtime suspend and resume of
247 devices and on system-wide suspend/resume and hibernation.
248
e39473d0
RW
249What: /sys/devices/.../power/pm_qos_no_power_off
250Date: September 2012
49db1903 251Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
e39473d0
RW
252Description:
253 The /sys/devices/.../power/pm_qos_no_power_off attribute
254 is used for manipulating the PM QoS "no power off" flag. If
255 set, this flag indicates to the kernel that power should not
256 be removed entirely from the device.
257
258 Not all drivers support this attribute. If it isn't supported,
259 it is not present.
260
261 This attribute has no effect on system-wide suspend/resume and
262 hibernation.