Home Learn Linux What is difference between Suspend and Hibernate in Linux

What is difference between Suspend and Hibernate in Linux

by Kiran Kumar
Published: Updated:
suspend and hibernate

When it comes to power options in Linux distros, there are Logout, Shutdown, Suspend, and Hibernate functions. Logout and Shutdown are self-explanatory. Let’s learn what is Hibernate and Suspend operations and the differences between them.

Suspend

Suspend is the same as Sleep in Microsoft Windows. This mode doesn’t power off your computer. RAM is still powered during the entire suspension state, and so the machine will still be consuming power all the time. This mode is not an efficient choice for laptops as the battery will get drained.

However, it may serve as an excellent option to keep the working session intact and the programs and apps you were using. Then, later, when you resume the PC after wake-up from suspend, you will have the session ready.

Due to this nature of the Suspend mode, you have to be careful that the computer never loses power or runs out of battery life as the session and files will not be saved, and data loss is imminent for the unsaved data.

Hibernate

In the Hibernate mode, the computer shuts down the computer entirely, and hence so there will be no power consumption whatsoever when the PC is in the Hibernation state.

When you put the computer to Hibernate, the session content from the RAM is moved to hard disk swap space, and after that, the system is powered off.

When waked up from Hibernation, the session contents from swap gets copied back to RAM, and so it takes more time than sleep to get the PC into a working state.

Why don’t some Linux distros have Hibernate enabled by default?

Hibernate is not a smooth-going feature at times due to the very nature of how it works and how the hardware must support it. If the SWAP partition is not set correctly, there could be data loss due to crashes, and computer freeze at startup are common problems associated with Hibernation.

Typically, Linux needs the size of RAM for its SWAP size, but not everybody follows this in its entity, leading to the Hibernate problems. Ubuntu had Hibernate as a default feature in the Power panel, but since Ubuntu 12.04 LTS, the feature was dropped due to ever-increasing problems reported by several users.

But it doesn’t mean your PC can’t hibernate any more. All you need to do is first check if your computer hardware is compatible with the mode.

How to check if your PC is compatible with Hibernate?

Before proceeding further, make sure to save all the unsaved documents in the session.

Launch ‘Terminal’ and type the following command:

sudo pm-hibernate

Your PC will turn off. Next, turn ON the computer and check if the session you had before you entered the pm-hibernate command is intact or whether you logged into an empty desktop.

If your session is lost, it implies your PC will not hibernate. Next, check if your swap partition is at least as large as your available RAM. Linux recommends twice as the size of RAM for its SWAP partition. For example, if your PC has 8 GB of RAM, you should have at least 16 GB of SWAP partition.

You may also like

2 comments

Ramendu kumar pandey March 24, 2020 - 11:44 AM

very useful information has been provided by you. which book should i learn linux

Reply
Zet van Zacharias June 6, 2020 - 1:13 PM

Swap size twice the size of RAM …. that is something from Windows, around the year 2000.
(when RAM memory was very expensive)

I think it is absurd to have a swap of 16GB – when you already have 8 GB of memory.
Or is Linux (and the linux apps) that bad in memory management?

To compare: My Windows10 laptop has 8 GB memory and a swap of 16 MB (MB!!!) and a page file of 1.4 GB (and hiberfil of 3,4 GB)

Oh, And i have used hibernate in windows for maybe 20 years now.
I can’t live without it.

A week ago I downloaded “Elemenatary OS” and it does not have Hibernate.
Such a disappointment.

I believe you, when you say that implementing hibernate in an OS is difficult.
Still Windows has done it, on millions of different computer configurations, for a long time.

Dear Kiran,
Please don’t take my comment as a personal attack. It is not meant that way.
I am just disappointed that something common as hibernate is so hard to configure in Linux.

Greatings,
Zetje01

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.