Arch Linux KDE Hibernate Configuration
2024-11-19
/
Arch Linux Series
Power Management/Suspend and Hibernate
Usually, on Linux, there are various methods available for suspending the system. The system state is saved in memory or on the disk, entering a low-power mode. When the computer is resumed, it allows for a quick recovery to the previous state.
- Suspend to RAM (Suspend to memory, commonly known as suspend/sleep): Saves the current system state in RAM by powering down most components in the machine that are not related to RAM. In this case, RAM is necessary to restore the machine’s state and must continue to be powered. Since the system state is stored in RAM, the system recovery speed is very fast.
- Suspend to disk (Suspend to hard disk, commonly known as hibernate): Saves the current system state on the disk (usually in a swap partition or swap file) and then turns off the power. When resuming, the system recovers data from the disk. Compared to the RAM method, hibernation can maintain the system state for a longer period, but the recovery time is longer. This article mainly introduces how to enable and configure hibernation mode.
- Suspend to both (Suspend to both/hybrid suspend): Combines the advantages of suspending to RAM and disk methods. It saves the current system state on the disk (swap space) and then enters sleep mode while keeping RAM powered. When resuming, the system will first recover quickly from RAM, and if RAM is lost, it will recover from the disk. For example, if the battery is depleted, the system will recover from the disk.
Adding Swap
1 | If there is no swap space currently, a new swap needs to be created |
Hibernate
1 | Confirm the UUID of the partition where the swap file is located |