Want to enable the hibernate function in Linux Mint? Here’s the step by step guide for beginners!
Hibernate is a feature to save your work from computer memory into hard drive, and then power-off the machine completely. On next boot, it will revert system status and go directly to where you left it.
Suspend does the same job but saving all the work into RAM memory. So the system is not completely turned off and needs battery or power supply to serve it.
Verify if hibernate works:
Hibernate function does not work in may case in Linux Mint 20 by default. You can test it out by opening “terminal” from start menu, and run command:
You need to disable 'Secure Boot' in BIOS/UEFI settings before being able to use hibernate
NOTE: Save your work before running the command in case hibernate does not work! When your system is shutdown completely, start it again and see if it reverts to where you left it.
Enable Hibernate in Linux Mint 20/21
If the function does not work for you, do the steps below one by one to enable it.
1.) Check the swap area UUID:
As I mentioned, the hibernate function saves all the work into hard drive. The location is usually the Swap area. To check it out, open “terminal” from start menu and run command:
sudo swapon --show
It usually outputs the partition /dev/sdaX you created while installing the system.
Next run the blkid command should tell you the UUID for this partition.
Copy the ID and it will be used in next step.
2.) Enable hibernate via kernel parameter:
You can add a kernel parameter to boot menu easily via editing the configuration file. However, a graphical tool will be friendly for beginners.
a.) Search for and install ‘Grub Customizer‘ from Software Manager app. Or open terminal and run command to install the tool:
sudo apt install grub-customizer
For Linux Mint 21, grub-customizer is NOT available in system repository due to upstream changes. Open terminal and run the 2 commands to add its official PPA and update cache before running 'apt install' command:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt update
b.) Next launch the tool from start menu, and navigate to ‘General Settings’ tab. Finally add following in kernel parameters box after ‘quiet splash’
Click the top-left “Save” button and restart your computer. And test the hibernate function again via ‘systemctl hibernate‘ command.
Add Hibernate Option in Shutdown menu
The default ‘Quit’ menu options lack hibernate. It is however easy to add back if the function works!
Firstly open terminal from start menu. When it opens, run command to create & edit the configuration file:
sudo xed /etc/polkit-1/localauthority/50-local.d/com.linuxmint.enable-hibernate.pkla
When the file opens, paste following lines and save it!
[Re-enable hibernate by default in upower]
[Re-enable hibernate by default in logind]
OK, now open the Shutdown menu and see the magic!
In case for those do not have a swap partition, you can create a swap file instead and use UUID of root partition along with physical offset.