Hibernation (ACPI S4 or HTD) is a power-saving mode in which the machine state is written to disk, either a swap partition or swap file, allowing the device to be completely powered off. On resume, the machine state is loaded back into RAM. This allows a faster boot time than a normal power cycle and for the user to resume their session with the applications that were open when hibernate was initiated.

When a computer hibernates, it saves the contents of RAM to a swap file or partition and completely powers off. Another operating system can be booted if necessary during the time the other system is hibernated (however, this is not recommended). When the system resumes from hibernation, it copies this data back into RAM and resumes with the same state and opened programs as before.

Hibernation on Ubuntu can usually be initiated by executing pm-hibernate with root privilege. Because resume-from-hibernation does not work well on all hardware, possibly corrupting opened filesystems or files and destroying non-saved data, hibernation is not available by default in the GUI shutdown options in current versions of Ubuntu and must be enabled manually.

In addition to pm-utils, systemctl (the interface of systemd) may be used to initiate hibernation and other ACPI states.

Touching a filesystem (or swap partition) in use by a hibernated operating system is dangerous, and so Ubuntu will not mount a hibernated Windows drive. It must be either mounted read-only (preferred) or have its hibernation file removed before it can be accessed.

Related tags: