1971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/ 2971cb7fbSRafael J. WysockiDate: January 2009 3971cb7fbSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 4971cb7fbSRafael J. WysockiDescription: 5971cb7fbSRafael J. Wysocki The /sys/devices/.../power directory contains attributes 6971cb7fbSRafael J. Wysocki allowing the user space to check and modify some power 7971cb7fbSRafael J. Wysocki management related properties of given device. 8971cb7fbSRafael J. Wysocki 9971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/wakeup 10971cb7fbSRafael J. WysockiDate: January 2009 11971cb7fbSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 12971cb7fbSRafael J. WysockiDescription: 13971cb7fbSRafael J. Wysocki The /sys/devices/.../power/wakeup attribute allows the user 14971cb7fbSRafael J. Wysocki space to check if the device is enabled to wake up the system 15971cb7fbSRafael J. Wysocki from sleep states, such as the memory sleep state (suspend to 16971cb7fbSRafael J. Wysocki RAM) and hibernation (suspend to disk), and to enable or disable 17971cb7fbSRafael J. Wysocki it to do that as desired. 18971cb7fbSRafael J. Wysocki 19971cb7fbSRafael J. Wysocki Some devices support "wakeup" events, which are hardware signals 20971cb7fbSRafael J. Wysocki used to activate the system from a sleep state. Such devices 21971cb7fbSRafael J. Wysocki have one of the following two values for the sysfs power/wakeup 22971cb7fbSRafael J. Wysocki file: 23971cb7fbSRafael J. Wysocki 24971cb7fbSRafael J. Wysocki + "enabled\n" to issue the events; 25971cb7fbSRafael J. Wysocki + "disabled\n" not to do so; 26971cb7fbSRafael J. Wysocki 27971cb7fbSRafael J. Wysocki In that cases the user space can change the setting represented 28971cb7fbSRafael J. Wysocki by the contents of this file by writing either "enabled", or 29971cb7fbSRafael J. Wysocki "disabled" to it. 30971cb7fbSRafael J. Wysocki 31971cb7fbSRafael J. Wysocki For the devices that are not capable of generating system wakeup 32cb8f51bdSRafael J. Wysocki events this file is not present. In that case the device cannot 33cb8f51bdSRafael J. Wysocki be enabled to wake up the system from sleep states. 34971cb7fbSRafael J. Wysocki 35971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/control 36971cb7fbSRafael J. WysockiDate: January 2009 37971cb7fbSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 38971cb7fbSRafael J. WysockiDescription: 39971cb7fbSRafael J. Wysocki The /sys/devices/.../power/control attribute allows the user 40971cb7fbSRafael J. Wysocki space to control the run-time power management of the device. 41971cb7fbSRafael J. Wysocki 42971cb7fbSRafael J. Wysocki All devices have one of the following two values for the 43971cb7fbSRafael J. Wysocki power/control file: 44971cb7fbSRafael J. Wysocki 45971cb7fbSRafael J. Wysocki + "auto\n" to allow the device to be power managed at run time; 46971cb7fbSRafael J. Wysocki + "on\n" to prevent the device from being power managed; 47971cb7fbSRafael J. Wysocki 48971cb7fbSRafael J. Wysocki The default for all devices is "auto", which means that they may 49971cb7fbSRafael J. Wysocki be subject to automatic power management, depending on their 50971cb7fbSRafael J. Wysocki drivers. Changing this attribute to "on" prevents the driver 51971cb7fbSRafael J. Wysocki from power managing the device at run time. Doing that while 52971cb7fbSRafael J. Wysocki the device is suspended causes it to be woken up. 535a2eb858SRafael J. Wysocki 545a2eb858SRafael J. WysockiWhat: /sys/devices/.../power/async 555a2eb858SRafael J. WysockiDate: January 2009 565a2eb858SRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 575a2eb858SRafael J. WysockiDescription: 585a2eb858SRafael J. Wysocki The /sys/devices/.../async attribute allows the user space to 595a2eb858SRafael J. Wysocki enable or diasble the device's suspend and resume callbacks to 605a2eb858SRafael J. Wysocki be executed asynchronously (ie. in separate threads, in parallel 615a2eb858SRafael J. Wysocki with the main suspend/resume thread) during system-wide power 625a2eb858SRafael J. Wysocki transitions (eg. suspend to RAM, hibernation). 635a2eb858SRafael J. Wysocki 645a2eb858SRafael J. Wysocki All devices have one of the following two values for the 655a2eb858SRafael J. Wysocki power/async file: 665a2eb858SRafael J. Wysocki 675a2eb858SRafael J. Wysocki + "enabled\n" to permit the asynchronous suspend/resume; 685a2eb858SRafael J. Wysocki + "disabled\n" to forbid it; 695a2eb858SRafael J. Wysocki 705a2eb858SRafael J. Wysocki The value of this attribute may be changed by writing either 715a2eb858SRafael J. Wysocki "enabled", or "disabled" to it. 725a2eb858SRafael J. Wysocki 735a2eb858SRafael J. Wysocki It generally is unsafe to permit the asynchronous suspend/resume 745a2eb858SRafael J. Wysocki of a device unless it is certain that all of the PM dependencies 755a2eb858SRafael J. Wysocki of the device are known to the PM core. However, for some 765a2eb858SRafael J. Wysocki devices this attribute is set to "enabled" by bus type code or 775a2eb858SRafael J. Wysocki device drivers and in that cases it should be safe to leave the 785a2eb858SRafael J. Wysocki default value. 79074037ecSRafael J. Wysocki 80074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_count 81074037ecSRafael J. WysockiDate: September 2010 82074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 83074037ecSRafael J. WysockiDescription: 84074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_count attribute contains the number 85074037ecSRafael J. Wysocki of signaled wakeup events associated with the device. This 86074037ecSRafael J. Wysocki attribute is read-only. If the device is not enabled to wake up 87cb8f51bdSRafael J. Wysocki the system from sleep states, this attribute is not present. 88074037ecSRafael J. Wysocki 89074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_active_count 90074037ecSRafael J. WysockiDate: September 2010 91074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 92074037ecSRafael J. WysockiDescription: 93074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_active_count attribute contains the 94074037ecSRafael J. Wysocki number of times the processing of wakeup events associated with 95074037ecSRafael J. Wysocki the device was completed (at the kernel level). This attribute 96074037ecSRafael J. Wysocki is read-only. If the device is not enabled to wake up the 97cb8f51bdSRafael J. Wysocki system from sleep states, this attribute is not present. 98074037ecSRafael J. Wysocki 99074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_hit_count 100074037ecSRafael J. WysockiDate: September 2010 101074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 102074037ecSRafael J. WysockiDescription: 103074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_hit_count attribute contains the 104074037ecSRafael J. Wysocki number of times the processing of a wakeup event associated with 105074037ecSRafael J. Wysocki the device might prevent the system from entering a sleep state. 106074037ecSRafael J. Wysocki This attribute is read-only. If the device is not enabled to 107cb8f51bdSRafael J. Wysocki wake up the system from sleep states, this attribute is not 108cb8f51bdSRafael J. Wysocki present. 109074037ecSRafael J. Wysocki 110074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_active 111074037ecSRafael J. WysockiDate: September 2010 112074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 113074037ecSRafael J. WysockiDescription: 114074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_active attribute contains either 1, 115074037ecSRafael J. Wysocki or 0, depending on whether or not a wakeup event associated with 116074037ecSRafael J. Wysocki the device is being processed (1). This attribute is read-only. 117074037ecSRafael J. Wysocki If the device is not enabled to wake up the system from sleep 118cb8f51bdSRafael J. Wysocki states, this attribute is not present. 119074037ecSRafael J. Wysocki 120074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_total_time_ms 121074037ecSRafael J. WysockiDate: September 2010 122074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 123074037ecSRafael J. WysockiDescription: 124074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_total_time_ms attribute contains 125074037ecSRafael J. Wysocki the total time of processing wakeup events associated with the 126074037ecSRafael J. Wysocki device, in milliseconds. This attribute is read-only. If the 127074037ecSRafael J. Wysocki device is not enabled to wake up the system from sleep states, 128cb8f51bdSRafael J. Wysocki this attribute is not present. 129074037ecSRafael J. Wysocki 130074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_max_time_ms 131074037ecSRafael J. WysockiDate: September 2010 132074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 133074037ecSRafael J. WysockiDescription: 134074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_max_time_ms attribute contains 135074037ecSRafael J. Wysocki the maximum time of processing a single wakeup event associated 136074037ecSRafael J. Wysocki with the device, in milliseconds. This attribute is read-only. 137074037ecSRafael J. Wysocki If the device is not enabled to wake up the system from sleep 138cb8f51bdSRafael J. Wysocki states, this attribute is not present. 139074037ecSRafael J. Wysocki 140074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_last_time_ms 141074037ecSRafael J. WysockiDate: September 2010 142074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 143074037ecSRafael J. WysockiDescription: 144074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_last_time_ms attribute contains 145074037ecSRafael J. Wysocki the value of the monotonic clock corresponding to the time of 146074037ecSRafael J. Wysocki signaling the last wakeup event associated with the device, in 147074037ecSRafael J. Wysocki milliseconds. This attribute is read-only. If the device is 148074037ecSRafael J. Wysocki not enabled to wake up the system from sleep states, this 149cb8f51bdSRafael J. Wysocki attribute is not present. 15015bcb91dSAlan Stern 15115bcb91dSAlan SternWhat: /sys/devices/.../power/autosuspend_delay_ms 15215bcb91dSAlan SternDate: September 2010 15315bcb91dSAlan SternContact: Alan Stern <stern@rowland.harvard.edu> 15415bcb91dSAlan SternDescription: 15515bcb91dSAlan Stern The /sys/devices/.../power/autosuspend_delay_ms attribute 15615bcb91dSAlan Stern contains the autosuspend delay value (in milliseconds). Some 15715bcb91dSAlan Stern drivers do not want their device to suspend as soon as it 15815bcb91dSAlan Stern becomes idle at run time; they want the device to remain 15915bcb91dSAlan Stern inactive for a certain minimum period of time first. That 16015bcb91dSAlan Stern period is called the autosuspend delay. Negative values will 16115bcb91dSAlan Stern prevent the device from being suspended at run time (similar 16215bcb91dSAlan Stern to writing "on" to the power/control attribute). Values >= 16315bcb91dSAlan Stern 1000 will cause the autosuspend timer expiration to be rounded 16415bcb91dSAlan Stern up to the nearest second. 16515bcb91dSAlan Stern 16615bcb91dSAlan Stern Not all drivers support this attribute. If it isn't supported, 16715bcb91dSAlan Stern attempts to read or write it will yield I/O errors. 168*85dc0b8aSRafael J. Wysocki 169*85dc0b8aSRafael J. WysockiWhat: /sys/devices/.../power/pm_qos_latency_us 170*85dc0b8aSRafael J. WysockiDate: March 2012 171*85dc0b8aSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 172*85dc0b8aSRafael J. WysockiDescription: 173*85dc0b8aSRafael J. Wysocki The /sys/devices/.../power/pm_qos_resume_latency_us attribute 174*85dc0b8aSRafael J. Wysocki contains the PM QoS resume latency limit for the given device, 175*85dc0b8aSRafael J. Wysocki which is the maximum allowed time it can take to resume the 176*85dc0b8aSRafael J. Wysocki device, after it has been suspended at run time, from a resume 177*85dc0b8aSRafael J. Wysocki request to the moment the device will be ready to process I/O, 178*85dc0b8aSRafael J. Wysocki in microseconds. If it is equal to 0, however, this means that 179*85dc0b8aSRafael J. Wysocki the PM QoS resume latency may be arbitrary. 180*85dc0b8aSRafael J. Wysocki 181*85dc0b8aSRafael J. Wysocki Not all drivers support this attribute. If it isn't supported, 182*85dc0b8aSRafael J. Wysocki it is not present. 183*85dc0b8aSRafael J. Wysocki 184*85dc0b8aSRafael J. Wysocki This attribute has no effect on system-wide suspend/resume and 185*85dc0b8aSRafael J. Wysocki hibernation. 186