swsusp | |
Programming Language: | C |
Operating System: | Linux |
License: | GNU General Public License |
swsusp (Software Suspend) is a kernel feature (i.e., program) which is part of power management framework in the Linux kernel. It is the default suspend framework as of kernel 3.8.
SWSUSP helps to drive the system to a low power state (called suspend) when not actively used, while providing the ability to return to the same state as before suspend (called resume/restore).
As of 3.8 Swsusp provides the following options under suspend:
For more details on Swsusp refer to kernel documentation under Documentation/power/swsusp.txt
To enable swsusp, the following should be selected during kernel configuration :
<nowiki> Power management options → <*>Power management support (CONFIG_PM) Power management options → <*>Software Suspend (CONFIG_SOFTWARE_SUSPEND) Power management options → [/dev/resume_partition]Default resume partition (CONFIG_PM_STD_PARTITION) </nowiki>
The /dev/resume_partition needs to be replaced by the actual swap partition that is to be used for suspending. Otherwise, resume=/dev/resume_partition can be given as a parameter during system bootup. The actual suspend is done by :
<nowiki> echo shutdown > /sys/power/disk; echo disk > /sys/power/state </nowiki>
You may check other suspend options available by doing"
cat /sys/power/state
depending on your kernel config, it will show something similar to [standby] mem disk
and options available under disk can be viewed by
cat /sys/power/disk
depending on your kernel config, it will show something similar to [platform] shutdown reboot
swsusp lacks compression and graphical progress indication, which can be provided through Uswsusp.