The Linux power management subsystem shows a unified sysfs interface to userspace.
The interface exists in
/sys/power/ directory.
The file:
/sys/power/state controls the system power state.
A reading from this file, will return what states are supported, which are hard-coded to:
- standby (Power-On Suspend),
- mem (Power-On Suspend-to-RAM)
- disk (Power-Off Suspend-to-Disk)
To add the standby and suspend on memory support in the kernel it is necessary to enable:
Power management option ---> Power management support
Power management option ---> Suspend to RAM and standby
To enter in standby type on the available target:
target# echo -n standby > /sys/pm/state
To enter in suspend on memory type on the available target:
target# echo -n mem > /sys/pm/state
Bibliography
- Linux Symposium 2002: The Linux Kernel Device Model
- Linux Symposium 2003: Linux Kernel Power Management
- Linux Symposium 2005: The sysfs Filesystem
- Linux Symposium 2008: Suspend-to-RAM in Linux
- Linux Kernel Weekly: A new suspend/hibernate infrastructure