Swsusp


swsusp is a kernel feature which is part of power management framework in the Linux kernel. It is the default suspend framework as of kernel 3.8.

Objective

SWSUSP helps to drive the system to a low power state when not actively used, while providing the ability to return to the same state as before suspend.

Features

As of 3.8 Swsusp provides the following options under suspend:
  • StandBy: the CPU and main memory both are powered up
  • Suspend to RAM: the CPU could be powered down while the RAM is up and in Self-refresh state.
  • Suspend to Disk: a snapshot of the current system including CPU registers and memory contents are stored in an image in non-volatile memory such as a hard disk and the system is powered down.
For more details on Swsusp refer to kernel documentation under '' Documentation/power/swsusp.txt''

Usage

To enable swsusp, the following should be selected during kernel configuration:

Power management options → <*>Power management support
Power management options → <*>Software Suspend
Power management options → Default resume partition

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:
echo shutdown > /sys/power/disk; echo disk > /sys/power/state
You may check other suspend options available by doing
cat /sys/power/state
depending on your kernel config, it will show something similar to 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 shutdown reboot
swsusp lacks compression and graphical progress indication, which can be provided through Uswsusp.