18c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/ 28c2ecf20Sopenharmony_ciDate: January 2009 38c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci The /sys/devices/.../power directory contains attributes 68c2ecf20Sopenharmony_ci allowing the user space to check and modify some power 78c2ecf20Sopenharmony_ci management related properties of given device. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup 108c2ecf20Sopenharmony_ciDate: January 2009 118c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 128c2ecf20Sopenharmony_ciDescription: 138c2ecf20Sopenharmony_ci The /sys/devices/.../power/wakeup attribute allows the user 148c2ecf20Sopenharmony_ci space to check if the device is enabled to wake up the system 158c2ecf20Sopenharmony_ci from sleep states, such as the memory sleep state (suspend to 168c2ecf20Sopenharmony_ci RAM) and hibernation (suspend to disk), and to enable or disable 178c2ecf20Sopenharmony_ci it to do that as desired. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci Some devices support "wakeup" events, which are hardware signals 208c2ecf20Sopenharmony_ci used to activate the system from a sleep state. Such devices 218c2ecf20Sopenharmony_ci have one of the following two values for the sysfs power/wakeup 228c2ecf20Sopenharmony_ci file: 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci + "enabled\n" to issue the events; 258c2ecf20Sopenharmony_ci + "disabled\n" not to do so; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci In that cases the user space can change the setting represented 288c2ecf20Sopenharmony_ci by the contents of this file by writing either "enabled", or 298c2ecf20Sopenharmony_ci "disabled" to it. 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci For the devices that are not capable of generating system wakeup 328c2ecf20Sopenharmony_ci events this file is not present. In that case the device cannot 338c2ecf20Sopenharmony_ci be enabled to wake up the system from sleep states. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/control 368c2ecf20Sopenharmony_ciDate: January 2009 378c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 388c2ecf20Sopenharmony_ciDescription: 398c2ecf20Sopenharmony_ci The /sys/devices/.../power/control attribute allows the user 408c2ecf20Sopenharmony_ci space to control the run-time power management of the device. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci All devices have one of the following two values for the 438c2ecf20Sopenharmony_ci power/control file: 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci + "auto\n" to allow the device to be power managed at run time; 468c2ecf20Sopenharmony_ci + "on\n" to prevent the device from being power managed; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci The default for all devices is "auto", which means that they may 498c2ecf20Sopenharmony_ci be subject to automatic power management, depending on their 508c2ecf20Sopenharmony_ci drivers. Changing this attribute to "on" prevents the driver 518c2ecf20Sopenharmony_ci from power managing the device at run time. Doing that while 528c2ecf20Sopenharmony_ci the device is suspended causes it to be woken up. 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/async 558c2ecf20Sopenharmony_ciDate: January 2009 568c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 578c2ecf20Sopenharmony_ciDescription: 588c2ecf20Sopenharmony_ci The /sys/devices/.../async attribute allows the user space to 598c2ecf20Sopenharmony_ci enable or diasble the device's suspend and resume callbacks to 608c2ecf20Sopenharmony_ci be executed asynchronously (ie. in separate threads, in parallel 618c2ecf20Sopenharmony_ci with the main suspend/resume thread) during system-wide power 628c2ecf20Sopenharmony_ci transitions (eg. suspend to RAM, hibernation). 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci All devices have one of the following two values for the 658c2ecf20Sopenharmony_ci power/async file: 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci + "enabled\n" to permit the asynchronous suspend/resume; 688c2ecf20Sopenharmony_ci + "disabled\n" to forbid it; 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci The value of this attribute may be changed by writing either 718c2ecf20Sopenharmony_ci "enabled", or "disabled" to it. 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci It generally is unsafe to permit the asynchronous suspend/resume 748c2ecf20Sopenharmony_ci of a device unless it is certain that all of the PM dependencies 758c2ecf20Sopenharmony_ci of the device are known to the PM core. However, for some 768c2ecf20Sopenharmony_ci devices this attribute is set to "enabled" by bus type code or 778c2ecf20Sopenharmony_ci device drivers and in that cases it should be safe to leave the 788c2ecf20Sopenharmony_ci default value. 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_count 818c2ecf20Sopenharmony_ciDate: September 2010 828c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 838c2ecf20Sopenharmony_ciDescription: 848c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_count attribute contains the number 858c2ecf20Sopenharmony_ci of signaled wakeup events associated with the device. This 868c2ecf20Sopenharmony_ci attribute is read-only. If the device is not capable to wake up 878c2ecf20Sopenharmony_ci the system from sleep states, this attribute is not present. 888c2ecf20Sopenharmony_ci If the device is not enabled to wake up the system from sleep 898c2ecf20Sopenharmony_ci states, this attribute is empty. 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_active_count 928c2ecf20Sopenharmony_ciDate: September 2010 938c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 948c2ecf20Sopenharmony_ciDescription: 958c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_active_count attribute contains the 968c2ecf20Sopenharmony_ci number of times the processing of wakeup events associated with 978c2ecf20Sopenharmony_ci the device was completed (at the kernel level). This attribute 988c2ecf20Sopenharmony_ci is read-only. If the device is not capable to wake up the 998c2ecf20Sopenharmony_ci system from sleep states, this attribute is not present. If 1008c2ecf20Sopenharmony_ci the device is not enabled to wake up the system from sleep 1018c2ecf20Sopenharmony_ci states, this attribute is empty. 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_abort_count 1048c2ecf20Sopenharmony_ciDate: February 2012 1058c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1068c2ecf20Sopenharmony_ciDescription: 1078c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_abort_count attribute contains the 1088c2ecf20Sopenharmony_ci number of times the processing of a wakeup event associated with 1098c2ecf20Sopenharmony_ci the device might have aborted system transition into a sleep 1108c2ecf20Sopenharmony_ci state in progress. This attribute is read-only. If the device 1118c2ecf20Sopenharmony_ci is not capable to wake up the system from sleep states, this 1128c2ecf20Sopenharmony_ci attribute is not present. If the device is not enabled to wake 1138c2ecf20Sopenharmony_ci up the system from sleep states, this attribute is empty. 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_expire_count 1168c2ecf20Sopenharmony_ciDate: February 2012 1178c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1188c2ecf20Sopenharmony_ciDescription: 1198c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_expire_count attribute contains the 1208c2ecf20Sopenharmony_ci number of times a wakeup event associated with the device has 1218c2ecf20Sopenharmony_ci been reported with a timeout that expired. This attribute is 1228c2ecf20Sopenharmony_ci read-only. If the device is not capable to wake up the system 1238c2ecf20Sopenharmony_ci from sleep states, this attribute is not present. If the 1248c2ecf20Sopenharmony_ci device is not enabled to wake up the system from sleep states, 1258c2ecf20Sopenharmony_ci this attribute is empty. 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_active 1288c2ecf20Sopenharmony_ciDate: September 2010 1298c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1308c2ecf20Sopenharmony_ciDescription: 1318c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_active attribute contains either 1, 1328c2ecf20Sopenharmony_ci or 0, depending on whether or not a wakeup event associated with 1338c2ecf20Sopenharmony_ci the device is being processed (1). This attribute is read-only. 1348c2ecf20Sopenharmony_ci If the device is not capable to wake up the system from sleep 1358c2ecf20Sopenharmony_ci states, this attribute is not present. If the device is not 1368c2ecf20Sopenharmony_ci enabled to wake up the system from sleep states, this attribute 1378c2ecf20Sopenharmony_ci is empty. 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_total_time_ms 1408c2ecf20Sopenharmony_ciDate: September 2010 1418c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1428c2ecf20Sopenharmony_ciDescription: 1438c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_total_time_ms attribute contains 1448c2ecf20Sopenharmony_ci the total time of processing wakeup events associated with the 1458c2ecf20Sopenharmony_ci device, in milliseconds. This attribute is read-only. If the 1468c2ecf20Sopenharmony_ci device is not capable to wake up the system from sleep states, 1478c2ecf20Sopenharmony_ci this attribute is not present. If the device is not enabled to 1488c2ecf20Sopenharmony_ci wake up the system from sleep states, this attribute is empty. 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_max_time_ms 1518c2ecf20Sopenharmony_ciDate: September 2010 1528c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1538c2ecf20Sopenharmony_ciDescription: 1548c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_max_time_ms attribute contains 1558c2ecf20Sopenharmony_ci the maximum time of processing a single wakeup event associated 1568c2ecf20Sopenharmony_ci with the device, in milliseconds. This attribute is read-only. 1578c2ecf20Sopenharmony_ci If the device is not capable to wake up the system from sleep 1588c2ecf20Sopenharmony_ci states, this attribute is not present. If the device is not 1598c2ecf20Sopenharmony_ci enabled to wake up the system from sleep states, this attribute 1608c2ecf20Sopenharmony_ci is empty. 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_last_time_ms 1638c2ecf20Sopenharmony_ciDate: September 2010 1648c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1658c2ecf20Sopenharmony_ciDescription: 1668c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_last_time_ms attribute contains 1678c2ecf20Sopenharmony_ci the value of the monotonic clock corresponding to the time of 1688c2ecf20Sopenharmony_ci signaling the last wakeup event associated with the device, in 1698c2ecf20Sopenharmony_ci milliseconds. This attribute is read-only. If the device is 1708c2ecf20Sopenharmony_ci not enabled to wake up the system from sleep states, this 1718c2ecf20Sopenharmony_ci attribute is not present. If the device is not enabled to wake 1728c2ecf20Sopenharmony_ci up the system from sleep states, this attribute is empty. 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/wakeup_prevent_sleep_time_ms 1758c2ecf20Sopenharmony_ciDate: February 2012 1768c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 1778c2ecf20Sopenharmony_ciDescription: 1788c2ecf20Sopenharmony_ci The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute 1798c2ecf20Sopenharmony_ci contains the total time the device has been preventing 1808c2ecf20Sopenharmony_ci opportunistic transitions to sleep states from occurring. 1818c2ecf20Sopenharmony_ci This attribute is read-only. If the device is not capable to 1828c2ecf20Sopenharmony_ci wake up the system from sleep states, this attribute is not 1838c2ecf20Sopenharmony_ci present. If the device is not enabled to wake up the system 1848c2ecf20Sopenharmony_ci from sleep states, this attribute is empty. 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/autosuspend_delay_ms 1878c2ecf20Sopenharmony_ciDate: September 2010 1888c2ecf20Sopenharmony_ciContact: Alan Stern <stern@rowland.harvard.edu> 1898c2ecf20Sopenharmony_ciDescription: 1908c2ecf20Sopenharmony_ci The /sys/devices/.../power/autosuspend_delay_ms attribute 1918c2ecf20Sopenharmony_ci contains the autosuspend delay value (in milliseconds). Some 1928c2ecf20Sopenharmony_ci drivers do not want their device to suspend as soon as it 1938c2ecf20Sopenharmony_ci becomes idle at run time; they want the device to remain 1948c2ecf20Sopenharmony_ci inactive for a certain minimum period of time first. That 1958c2ecf20Sopenharmony_ci period is called the autosuspend delay. Negative values will 1968c2ecf20Sopenharmony_ci prevent the device from being suspended at run time (similar 1978c2ecf20Sopenharmony_ci to writing "on" to the power/control attribute). Values >= 1988c2ecf20Sopenharmony_ci 1000 will cause the autosuspend timer expiration to be rounded 1998c2ecf20Sopenharmony_ci up to the nearest second. 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci Not all drivers support this attribute. If it isn't supported, 2028c2ecf20Sopenharmony_ci attempts to read or write it will yield I/O errors. 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/pm_qos_resume_latency_us 2058c2ecf20Sopenharmony_ciDate: March 2012 2068c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 2078c2ecf20Sopenharmony_ciDescription: 2088c2ecf20Sopenharmony_ci The /sys/devices/.../power/pm_qos_resume_latency_us attribute 2098c2ecf20Sopenharmony_ci contains the PM QoS resume latency limit for the given device, 2108c2ecf20Sopenharmony_ci which is the maximum allowed time it can take to resume the 2118c2ecf20Sopenharmony_ci device, after it has been suspended at run time, from a resume 2128c2ecf20Sopenharmony_ci request to the moment the device will be ready to process I/O, 2138c2ecf20Sopenharmony_ci in microseconds. If it is equal to 0, however, this means that 2148c2ecf20Sopenharmony_ci the PM QoS resume latency may be arbitrary and the special value 2158c2ecf20Sopenharmony_ci "n/a" means that user space cannot accept any resume latency at 2168c2ecf20Sopenharmony_ci all for the given device. 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci Not all drivers support this attribute. If it isn't supported, 2198c2ecf20Sopenharmony_ci it is not present. 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ci This attribute has no effect on system-wide suspend/resume and 2228c2ecf20Sopenharmony_ci hibernation. 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/pm_qos_latency_tolerance_us 2258c2ecf20Sopenharmony_ciDate: January 2014 2268c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 2278c2ecf20Sopenharmony_ciDescription: 2288c2ecf20Sopenharmony_ci The /sys/devices/.../power/pm_qos_latency_tolerance_us attribute 2298c2ecf20Sopenharmony_ci contains the PM QoS active state latency tolerance limit for the 2308c2ecf20Sopenharmony_ci given device in microseconds. That is the maximum memory access 2318c2ecf20Sopenharmony_ci latency the device can suffer without any visible adverse 2328c2ecf20Sopenharmony_ci effects on user space functionality. If that value is the 2338c2ecf20Sopenharmony_ci string "any", the latency does not matter to user space at all, 2348c2ecf20Sopenharmony_ci but hardware should not be allowed to set the latency tolerance 2358c2ecf20Sopenharmony_ci for the device automatically. 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci Reading "auto" from this file means that the maximum memory 2388c2ecf20Sopenharmony_ci access latency for the device may be determined automatically 2398c2ecf20Sopenharmony_ci by the hardware as needed. Writing "auto" to it allows the 2408c2ecf20Sopenharmony_ci hardware to be switched to this mode if there are no other 2418c2ecf20Sopenharmony_ci latency tolerance requirements from the kernel side. 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci This attribute is only present if the feature controlled by it 2448c2ecf20Sopenharmony_ci is supported by the hardware. 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci This attribute has no effect on runtime suspend and resume of 2478c2ecf20Sopenharmony_ci devices and on system-wide suspend/resume and hibernation. 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/pm_qos_no_power_off 2508c2ecf20Sopenharmony_ciDate: September 2012 2518c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 2528c2ecf20Sopenharmony_ciDescription: 2538c2ecf20Sopenharmony_ci The /sys/devices/.../power/pm_qos_no_power_off attribute 2548c2ecf20Sopenharmony_ci is used for manipulating the PM QoS "no power off" flag. If 2558c2ecf20Sopenharmony_ci set, this flag indicates to the kernel that power should not 2568c2ecf20Sopenharmony_ci be removed entirely from the device. 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci Not all drivers support this attribute. If it isn't supported, 2598c2ecf20Sopenharmony_ci it is not present. 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci This attribute has no effect on system-wide suspend/resume and 2628c2ecf20Sopenharmony_ci hibernation. 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ciWhat: /sys/devices/.../power/runtime_status 2658c2ecf20Sopenharmony_ciDate: April 2010 2668c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rjw@rjwysocki.net> 2678c2ecf20Sopenharmony_ciDescription: 2688c2ecf20Sopenharmony_ci The /sys/devices/.../power/runtime_status attribute contains 2698c2ecf20Sopenharmony_ci the current runtime PM status of the device, which may be 2708c2ecf20Sopenharmony_ci "suspended", "suspending", "resuming", "active", "error" (fatal 2718c2ecf20Sopenharmony_ci error), or "unsupported" (runtime PM is disabled). 272