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