Loading...
X

What is the difference between Suspend and Hibernate in Linux. Why is the Hibernation button missing?

When shutting down Linux, instead of completely shutting down the computer, you can select Suspend or Hibernate. These modes are also offered when configuring the behavior of the computer during inactivity (to save power), when the laptop battery is low, and when configuring the behavior after closing the lid of the laptop.

Suspend means stopping all applications and puts the computer into low power mode. When you turn on the computer, it returns to the same state that it was before Suspend. The difference from Hibernate is that the computer turns on faster, although it continues to consume energy. That is, the data remains in RAM, but the computer goes into a low power mode, similar to shutting down. In this state, the battery is consumed very slowly. When turned on, the computer wakes up very quickly. But if the battery is completely discharged before turning on, then the current data from the RAM will be lost)

Hibernate means writing the current state of the computer and RAM to the hard disk and turning off the computer. When you turn on the computer, it returns to the same state that it was before Hibernate. The difference from Suspend is that the computer completely stops consuming power and cannot lose data due to the fact that the battery is dead. But in Hibernate mode, the computer takes a little longer to turn on than when exiting the Suspend state. That is, the Hibernate mode means saving all data from RAM to disk and turning off the computer. The next time you turn on the data from the disk will be loaded into RAM and the computer will be able to continue from the same point that it stopped before sleep

That is, if the computer is often idle and you need to turn it on very quickly, then select the Suspend mode for this. If you expect the computer to be turned off for a long time, then select Hibernate.

Why is there no Hibernate mode in Linux?

In the following screenshot, you can see that when you turn off the computer, there is no option to select Hibernate. This is due to the fact that there is no Swap partition (Swap file) on the specified system, or it is of insufficient size.

In order for the Hibernate option to appear, you need to create a Swap file or increase its size, making it equal to or larger than the computer's RAM.

The created swap partition can be used not only to store some information from RAM while the computer is running, it can also be used in Hibernate mode. When adding this mode, an additional option will appear in the shutdown menu – Hibernate. If you select it, then the current state of the RAM will be written to the swap partition. The next time you turn on the computer, it reads the information from the swap file and restores the state of the computer. That is, those programs that were opened will be reopened and their result will be saved.

In modern Linux, hibernation (sleep) should be enabled automatically when a partition or swap file is added to the system.

For information on how to create a swap file in various distributions, see the articles:


Leave Your Observation

Your email address will not be published.