sysfs-power 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. What: /sys/power/
  2. Date: August 2006
  3. Contact: Rafael J. Wysocki <rjw@sisk.pl>
  4. Description:
  5. The /sys/power directory will contain files that will
  6. provide a unified interface to the power management
  7. subsystem.
  8. What: /sys/power/state
  9. Date: August 2006
  10. Contact: Rafael J. Wysocki <rjw@sisk.pl>
  11. Description:
  12. The /sys/power/state file controls the system power state.
  13. Reading from this file returns what states are supported,
  14. which is hard-coded to 'standby' (Power-On Suspend), 'mem'
  15. (Suspend-to-RAM), and 'disk' (Suspend-to-Disk).
  16. Writing to this file one of these strings causes the system to
  17. transition into that state. Please see the file
  18. Documentation/power/states.txt for a description of each of
  19. these states.
  20. What: /sys/power/disk
  21. Date: August 2006
  22. Contact: Rafael J. Wysocki <rjw@sisk.pl>
  23. Description:
  24. The /sys/power/disk file controls the operating mode of the
  25. suspend-to-disk mechanism. Reading from this file returns
  26. the name of the method by which the system will be put to
  27. sleep on the next suspend. There are four methods supported:
  28. 'firmware' - means that the memory image will be saved to disk
  29. by some firmware, in which case we also assume that the
  30. firmware will handle the system suspend.
  31. 'platform' - the memory image will be saved by the kernel and
  32. the system will be put to sleep by the platform driver (e.g.
  33. ACPI or other PM registers).
  34. 'shutdown' - the memory image will be saved by the kernel and
  35. the system will be powered off.
  36. 'reboot' - the memory image will be saved by the kernel and
  37. the system will be rebooted.
  38. The suspend-to-disk method may be chosen by writing to this
  39. file one of the accepted strings:
  40. 'firmware'
  41. 'platform'
  42. 'shutdown'
  43. 'reboot'
  44. It will only change to 'firmware' or 'platform' if the system
  45. supports that.
  46. What: /sys/power/image_size
  47. Date: August 2006
  48. Contact: Rafael J. Wysocki <rjw@sisk.pl>
  49. Description:
  50. The /sys/power/image_size file controls the size of the image
  51. created by the suspend-to-disk mechanism. It can be written a
  52. string representing a non-negative integer that will be used
  53. as an upper limit of the image size, in bytes. The kernel's
  54. suspend-to-disk code will do its best to ensure the image size
  55. will not exceed this number. However, if it turns out to be
  56. impossible, the kernel will try to suspend anyway using the
  57. smallest image possible. In particular, if "0" is written to
  58. this file, the suspend image will be as small as possible.
  59. Reading from this file will display the current image size
  60. limit, which is set to 500 MB by default.
  61. What: /sys/power/pm_trace
  62. Date: August 2006
  63. Contact: Rafael J. Wysocki <rjw@sisk.pl>
  64. Description:
  65. The /sys/power/pm_trace file controls the code which saves the
  66. last PM event point in the RTC across reboots, so that you can
  67. debug a machine that just hangs during suspend (or more
  68. commonly, during resume). Namely, the RTC is only used to save
  69. the last PM event point if this file contains '1'. Initially
  70. it contains '0' which may be changed to '1' by writing a
  71. string representing a nonzero integer into it.
  72. To use this debugging feature you should attempt to suspend
  73. the machine, then reboot it and run
  74. dmesg -s 1000000 | grep 'hash matches'
  75. CAUTION: Using it will cause your machine's real-time (CMOS)
  76. clock to be set to a random invalid time after a resume.