top of page
  • Writer's pictureRakhi Kundu

How to enable Hibernate in Linux?| | Computercooltricks |

Updated: Mar 12, 2021

What is Hibernate?

Hibernate is a feature that gives you to save your systems state immediately your hard - disk so that we switch back the pc or laptop all the application can be restored from the hard-disk and we can again start working again with the same pc state as we had before switching off without losing any type data.

Hibernate help and saved RAM data to hard-disk and restore back into the RAM after we turn back the computer/laptop.

By default in Ubuntu Hibernate is not enabled hence we need manually need to enable it. But luckily it will not take much time.

Before starting the discussion about Hibernate let's starts with basic knowledge.

Why Hibernate is not enabled?

I have said above that HIbernate can save work in an emergency then why it's not enabled by default. The reason behind Hibernate does not work properly with many hardware configurations Unbonto and other Linux. Hence if the Hibernate is not working properly then we will face a data loss issue while switching back on from hibernate mode. The laptop and pcs are able to enable hibernate option manually. How we can check if my hardware is capable of Hibernate?

we can simply identify the hibernate is capable or not. Before doing anything make sure all the data you have saved otherwise chances of data loss. Open the Linux terminal and run the below commands from the Linux terminal

 $ sudo pm-hibernate

Once we run the command in the console of Linux or Ubuntu your computer or laptop will switch off. Just need to switch back and see if all the applications are running then we can assume Hibernate is working fine. In my paragraphs, I said hibernate saved all the ram data to the swap partition that we need to be configured when we installed Ubuntu. hence swap partition must be more than or equal to RAM size Let's check the swap partition by using System Monitor In the Resources tab check, the Ram memory along with swap is greater than all good to go. otherwise, if you still wanted to enable hibernate then run GParted from am live cd for increase swap memory Enable Hibernate from System Menu

Simple you need to run the below-mentioned command from a Linux laptop or pc.

$ sudo -i
$ cd /var/lib/polkit-1/localauthority/50-local.d/
$ gedit com.ubuntu.enable-hibernate.pkla

in case if the config file does not work then you can try the below commands just need to change the code in the below path

/var/lib to /etc Copy and paste the lines and save them.

[Re-enable hibernate by default in upower]

[Re-enable hibernate by default in logind]

Once you saved simply log out or restart the laptop you will see hibernate option in your laptop or ps are active and hibernate option will shows.

| Computercooltricks |

222 views0 comments
bottom of page