Suspend and hibernate

Software
The following software can be used for in-kernel default suspend/hibernate implementation, namely, swsusp.

Another alternative is which can be used with swsusp and TuxOnIce patched kernels.

Kernel
Make sure the following variables are set to 'yes': SUSPEND HIBERNATION

Available suspend modes
To see available suspend modes use

for swsusp, default implementation.

Or else, probe `/sys/power/tuxonice/powerdown_method' sysfs file for ToI.

Those two file will list at least ACPI S2/4 power down methods on modern hardware. New hardware would also support S5 method which is a rough S4 method. ACPI S2 correspond to suspend to ram (ram method is swsusp terms and 3 in ToI terms); S4 hibernation to disk (disk in swsusp temrs and 4 in ToI terms; S5 hibernation to disk (5 in ToI terms).

Swsusp users can choose between platfom, meaning ACPI, or *shutdown* methods which can be echo-ed to `/sys/power/disk' sysfs file.

Suspend to RAM
Preferred commands to suspend are

or

or

for suspend (to ram) for hibernate-script users; or

to hibernate (to disk.)

A more raw method is to

or

for TuxOnIce users. An then

is necessary to trigger a suspend/hibernation.

Suspend to disk
for suspend to disk make sure you have a swap partition or swap file The swap file should be active beforehand obviously and should be echo-ed on the appropriate file before any atempt to suspend/hibernate.

or

for ToI users.

Do not forget to probe

before issueing an actual command and append the result to kernel command line argument prepended with `resume='. This will suffice to resume from a block device or swap file for ToI. However, it's more complicated for a swapfile with swsusp.

Can not resume after suspend
In case resuming from suspend does not work, disable the security chip in BIOS/UEFI and try again.

Related links
https://wiki.gentoo.org/wiki/Power_management/HOWTO TuxOnIce