1971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/ 2971cb7fbSRafael J. WysockiDate: January 2009 349db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 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 1149db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 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 3749db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 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 5649db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 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 8249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 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 9149db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 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 9930e3ce6dSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_abort_count 10030e3ce6dSRafael J. WysockiDate: February 2012 10149db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 102074037ecSRafael J. WysockiDescription: 10330e3ce6dSRafael J. Wysocki The /sys/devices/.../wakeup_abort_count attribute contains the 104074037ecSRafael J. Wysocki number of times the processing of a wakeup event associated with 10530e3ce6dSRafael J. Wysocki the device might have aborted system transition into a sleep 10630e3ce6dSRafael J. Wysocki state in progress. This attribute is read-only. If the device 10730e3ce6dSRafael J. Wysocki is not enabled to wake up the system from sleep states, this 10830e3ce6dSRafael J. Wysocki attribute is not present. 10930e3ce6dSRafael J. Wysocki 11030e3ce6dSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_expire_count 11130e3ce6dSRafael J. WysockiDate: February 2012 11249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 11330e3ce6dSRafael J. WysockiDescription: 11430e3ce6dSRafael J. Wysocki The /sys/devices/.../wakeup_expire_count attribute contains the 11530e3ce6dSRafael J. Wysocki number of times a wakeup event associated with the device has 11630e3ce6dSRafael J. Wysocki been reported with a timeout that expired. This attribute is 11730e3ce6dSRafael J. Wysocki read-only. If the device is not enabled to wake up the system 11830e3ce6dSRafael J. Wysocki from sleep states, this attribute is not present. 119074037ecSRafael J. Wysocki 120074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_active 121074037ecSRafael J. WysockiDate: September 2010 12249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 123074037ecSRafael J. WysockiDescription: 124074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_active attribute contains either 1, 125074037ecSRafael J. Wysocki or 0, depending on whether or not a wakeup event associated with 126074037ecSRafael J. Wysocki the device is being processed (1). This attribute is read-only. 127074037ecSRafael J. Wysocki If the device is not enabled to wake up the system from sleep 128cb8f51bdSRafael J. Wysocki states, this attribute is not present. 129074037ecSRafael J. Wysocki 130074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_total_time_ms 131074037ecSRafael J. WysockiDate: September 2010 13249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 133074037ecSRafael J. WysockiDescription: 134074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_total_time_ms attribute contains 135074037ecSRafael J. Wysocki the total time of processing wakeup events associated with the 136074037ecSRafael J. Wysocki device, in milliseconds. This attribute is read-only. If the 137074037ecSRafael J. Wysocki device is not enabled to wake up the system from sleep states, 138cb8f51bdSRafael J. Wysocki this attribute is not present. 139074037ecSRafael J. Wysocki 140074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_max_time_ms 141074037ecSRafael J. WysockiDate: September 2010 14249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 143074037ecSRafael J. WysockiDescription: 144074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_max_time_ms attribute contains 145074037ecSRafael J. Wysocki the maximum time of processing a single wakeup event associated 146074037ecSRafael J. Wysocki with the device, in milliseconds. This attribute is read-only. 147074037ecSRafael J. Wysocki If the device is not enabled to wake up the system from sleep 148cb8f51bdSRafael J. Wysocki states, this attribute is not present. 149074037ecSRafael J. Wysocki 150074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_last_time_ms 151074037ecSRafael J. WysockiDate: September 2010 15249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 153074037ecSRafael J. WysockiDescription: 154074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_last_time_ms attribute contains 155074037ecSRafael J. Wysocki the value of the monotonic clock corresponding to the time of 156074037ecSRafael J. Wysocki signaling the last wakeup event associated with the device, in 157074037ecSRafael J. Wysocki milliseconds. This attribute is read-only. If the device is 158074037ecSRafael J. Wysocki not enabled to wake up the system from sleep states, this 159cb8f51bdSRafael J. Wysocki attribute is not present. 16015bcb91dSAlan Stern 16155850945SRafael J. WysockiWhat: /sys/devices/.../power/wakeup_prevent_sleep_time_ms 16255850945SRafael J. WysockiDate: February 2012 16349db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 16455850945SRafael J. WysockiDescription: 16555850945SRafael J. Wysocki The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute 16655850945SRafael J. Wysocki contains the total time the device has been preventing 1674e79162aSMasanari Iida opportunistic transitions to sleep states from occurring. 16855850945SRafael J. Wysocki This attribute is read-only. If the device is not enabled to 16955850945SRafael J. Wysocki wake up the system from sleep states, this attribute is not 17055850945SRafael J. Wysocki present. 17155850945SRafael J. Wysocki 17215bcb91dSAlan SternWhat: /sys/devices/.../power/autosuspend_delay_ms 17315bcb91dSAlan SternDate: September 2010 17415bcb91dSAlan SternContact: Alan Stern <stern@rowland.harvard.edu> 17515bcb91dSAlan SternDescription: 17615bcb91dSAlan Stern The /sys/devices/.../power/autosuspend_delay_ms attribute 17715bcb91dSAlan Stern contains the autosuspend delay value (in milliseconds). Some 17815bcb91dSAlan Stern drivers do not want their device to suspend as soon as it 17915bcb91dSAlan Stern becomes idle at run time; they want the device to remain 18015bcb91dSAlan Stern inactive for a certain minimum period of time first. That 18115bcb91dSAlan Stern period is called the autosuspend delay. Negative values will 18215bcb91dSAlan Stern prevent the device from being suspended at run time (similar 18315bcb91dSAlan Stern to writing "on" to the power/control attribute). Values >= 18415bcb91dSAlan Stern 1000 will cause the autosuspend timer expiration to be rounded 18515bcb91dSAlan Stern up to the nearest second. 18615bcb91dSAlan Stern 18715bcb91dSAlan Stern Not all drivers support this attribute. If it isn't supported, 18815bcb91dSAlan Stern attempts to read or write it will yield I/O errors. 18985dc0b8aSRafael J. Wysocki 19085dc0b8aSRafael J. WysockiWhat: /sys/devices/.../power/pm_qos_latency_us 19185dc0b8aSRafael J. WysockiDate: March 2012 19249db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 19385dc0b8aSRafael J. WysockiDescription: 19485dc0b8aSRafael J. Wysocki The /sys/devices/.../power/pm_qos_resume_latency_us attribute 19585dc0b8aSRafael J. Wysocki contains the PM QoS resume latency limit for the given device, 19685dc0b8aSRafael J. Wysocki which is the maximum allowed time it can take to resume the 19785dc0b8aSRafael J. Wysocki device, after it has been suspended at run time, from a resume 19885dc0b8aSRafael J. Wysocki request to the moment the device will be ready to process I/O, 19985dc0b8aSRafael J. Wysocki in microseconds. If it is equal to 0, however, this means that 20085dc0b8aSRafael J. Wysocki the PM QoS resume latency may be arbitrary. 20185dc0b8aSRafael J. Wysocki 20285dc0b8aSRafael J. Wysocki Not all drivers support this attribute. If it isn't supported, 20385dc0b8aSRafael J. Wysocki it is not present. 20485dc0b8aSRafael J. Wysocki 20585dc0b8aSRafael J. Wysocki This attribute has no effect on system-wide suspend/resume and 20685dc0b8aSRafael J. Wysocki hibernation. 207e39473d0SRafael J. Wysocki 208e39473d0SRafael J. WysockiWhat: /sys/devices/.../power/pm_qos_no_power_off 209e39473d0SRafael J. WysockiDate: September 2012 21049db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 211e39473d0SRafael J. WysockiDescription: 212e39473d0SRafael J. Wysocki The /sys/devices/.../power/pm_qos_no_power_off attribute 213e39473d0SRafael J. Wysocki is used for manipulating the PM QoS "no power off" flag. If 214e39473d0SRafael J. Wysocki set, this flag indicates to the kernel that power should not 215e39473d0SRafael J. Wysocki be removed entirely from the device. 216e39473d0SRafael J. Wysocki 217e39473d0SRafael J. Wysocki Not all drivers support this attribute. If it isn't supported, 218e39473d0SRafael J. Wysocki it is not present. 219e39473d0SRafael J. Wysocki 220e39473d0SRafael J. Wysocki This attribute has no effect on system-wide suspend/resume and 221e39473d0SRafael J. Wysocki hibernation. 222e39473d0SRafael J. Wysocki 223e39473d0SRafael J. WysockiWhat: /sys/devices/.../power/pm_qos_remote_wakeup 224e39473d0SRafael J. WysockiDate: September 2012 22549db1903SRafael J. WysockiContact: Rafael J. Wysocki <rjw@rjwysocki.net> 226e39473d0SRafael J. WysockiDescription: 227e39473d0SRafael J. Wysocki The /sys/devices/.../power/pm_qos_remote_wakeup attribute 228e39473d0SRafael J. Wysocki is used for manipulating the PM QoS "remote wakeup required" 229e39473d0SRafael J. Wysocki flag. If set, this flag indicates to the kernel that the 230e39473d0SRafael J. Wysocki device is a source of user events that have to be signaled from 231e39473d0SRafael J. Wysocki its low-power states. 232e39473d0SRafael J. Wysocki 233e39473d0SRafael J. Wysocki Not all drivers support this attribute. If it isn't supported, 234e39473d0SRafael J. Wysocki it is not present. 235e39473d0SRafael J. Wysocki 236e39473d0SRafael J. Wysocki This attribute has no effect on system-wide suspend/resume and 237e39473d0SRafael J. Wysocki hibernation. 238