[HOW TO] Enable Hibernate Option on ZorinOS 16 or other Gnome distros

Hi! So you need hibernate option but kinda disappointed it doesn't come enabled by default on Linux distros. Well, here's a small guide on how to enable hibernation on ZorinOS 16. This guide should work for both Core and Pro versions.

Requirements

You need to have a swap partition. If you're not sure if you have one, open the 'Disks' app and see if you do (you probably won't if you're on defaults).
image

image

If you don't have one, it's pretty easy to make it.

  1. In the Disks app, first select a partition that has at least 8GB of free space.

  2. After that, click that partition and then click the 'gears' icon, right beside the subtract and square icon.

  3. Select Resize
    image

  4. Assign the 'Free Space Following' to 8GB. Instead of 8GB, you can also do 16GB but it's better if you allocate the same amount as your RAM. So, if you have 8GB of RAM, do 8GB Free Space Following. If 12GB RAM, then 12GB Free Space Following.
    image

  5. Click Resize and Yes on any warnings that appear. You'll have something like this after:
    image
    Do not panic if it looks stuck. Just wait it out to let it finish the resizing.

  6. Select the Free Space and click the + icon.
    image

  7. Configure it like this:

image

image
8. After this, select the newly created swap partition and click the gear icons once again and click on 'Edit Mount Options' and configure it like this:
Don't touch the Identify As option

NOTE THE ID AFTER THE /dev/disk/by-uuid/


9. That's it! Now you can reboot and your swap partition is now working!

Setting up Hibernation

Now let's set up hibernation.
Firstly, we need to configure grub to tell it to use our swap partition for system resume. Open terminal (Ctrl+Alt+T) and enter: sudo gedit /etc/default/grub,
A text editor window will now open. Around line 12, add the line resume= after quiet splash. After the resume=, enter the UUID that you noted earlier. Your grub file should now look like this:

We're done with the hard part.
Now let's enable the hibernate option.

  1. Make sure you have Gnome Tweaks option installed. If not, go to store and search for "Tweaks" and install the Gnome Tweaks app.
  2. After this go to: Simpler Off Menu - GNOME Shell Extensions
  3. Install the 'Gnome Shell Integration' extension in your browser. There should be a card asking you to install it.
  4. Click the OFF button
    image
  5. Wait for a few seconds and it should now ask you to install, click on Install.
  6. Refresh the page and you'll now see this:
    image
  7. Click the settings icon and configure it like this:
  8. Now you'll have Hibernate option in your quick settings menu.
    image
  9. Select Hibernate to see if it works or not. If not, make sure you entered the correct UUID in the grub config file.
2 Likes

Try it but the hibernate button is not working

Maybe try this HowTo...?

i did not see hibernate in the setting

Please read the HOWTO from the link properly. There is one step which explicitly enables hibernate functionality, which then appears as a menu selection in the OS settings :wink:

1 Like

Thanks but I can't seem to find the Off Button
image

@NayamAmarshe

Did you refresh the page?

I have followed all the steps, and enabled hibernate button. But, it is not saving any state, the PC turns on fresh after hibernation. Please help me to solve this issue.