# Hibernation on Linux Explained

> What Is Hibernate on Linux  Hibernate is a powersaving state where the contents of the systems memory RAM are written to a designated storage space usuall

Source: https://knowledgebase.frame.work/en_us/hibernation-on-linux-BkL1N5ffJg

Last updated: 2024-11-13T21:13:52.181Z

## What Is Hibernate on Linux?

  

Hibernate is a power-saving state where the contents of the system's memory (RAM) are written to a designated (NVMe for example) storage space and the system powers down. 

When the system is turned back on, the memory contents are read back into RAM, _**restoring the system to its previous state**_.

Hibernate is particularly useful for laptops as it saves battery while preserving your session, including open applications, unsaved work, and system state.

> **Note:** While suspend (s2idle to ram) is officially supported on most Linux systems, hibernate is provided "as is" and may require manual configuration.

## How Does Hibernate Work?

###   

### State Saving:

*   The kernel writes the entire content of RAM to a swap partition or file.
*   This includes application states, memory allocations, and other runtime data.

### Power Down:

*   Once the memory is stored, the system shuts down completely, using no power.

### State Restoration:

*   On the next boot, the bootloader and kernel detect the hibernation image in the swap space.
*   The kernel restores the memory contents from the swap space back into RAM, resuming the system exactly as it was before hibernation.

### Security considerations:

*   Secure boot will need to be turned off with some distributions that lack the needed kernel signing.
*   When using a swap partition, we recommend using LUKS encryption as explained in guides. 
*   Fedora (unofficial guide) is available here for the [application approach](https://github.com/FrameworkComputer/linux-docs/blob/main/hibernation/hibernate-fedora-automatic.md#fedora-41-hibernation-option-not-fedora-official-beta) and the [manual method](https://github.com/FrameworkComputer/linux-docs/blob/main/hibernation/hibernate-fedora-manual-method.md#manual-guide-configuring-lid-close-and-hibernate-settings-on-linux-not-fedora-official).
