No hibernation in Zorin OS 17?

Is there no native hibernation support in Zorin OS 17?

I usually never turn off my Windows PC, as I would have to close tons of programs I would need to restart the next day. This is a very important feature for me. The command systemctl hibernate just turns off the PC.

systemctl suspend works well, though this suspends into RAM only so the PC is left actually unencrypted over night.

Well, I've done following and I am very surprised that it worked, even though I use full encryption :flushed: Am I doing something wrong?

First, I use the default LUKS encrypted scheme with LVM and I have 64G of RAM.

So I have reduced the size of the root partition by about 100G with the live USB stick (this doesn't work live). Make sure to unlock LUKS before using the Disks tool of ZorinOS, then reduce the LVM size:

sudo lvreduce --resizefs --size -100G /dev/mapper/vgzorin-root

The --resizefs is important as you want your filesystem be shrinked before the LVM size is reduced.

After that I temporarily disabled the swap:

sudo swapoff /dev/mapper/vgzorin-swap_1

Then I changed the size to my RAMs size:

sudo lvresize -L 64G /dev/mapper/vgzorin-swap_1

Then I formatted the swap:

sudo mkswap /dev/mapper/vgzorin-swap_1

After that, I changed following line in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/mapper/vgzorin-swap_1"

As you can see, I wasn't required to use an UUID for the resume option, instead I used /dev/mapper/vgzorin-swap_1.

Then I updated grub:

sudo update-grub

And then I tested hibernation with following command:

sudo systemctl hibernate

My PC shut off, even the RAM RGB turned off (this would usually be turned on if only in standby). Pressed a button on a keyboard and the PC immediately started. It booted normal and then the LUKS crypto prompt came for the key.

So it seems this works even with LUKS encryption enabled? :flushed:

If I don't miss something, it would be great to allow users to change the swap partition size during installation because hibernation instead of standby is great!

You can also create a desktop shortcut. Create a file hibernate.desktop in ~/Desktop with following content:

[Desktop Entry]
Name=Hibernate
GenericName=Hibernate
Comment=Suspends the computer to disk (hibernate).
Exec=sudo systemctl hibernate
Icon=/usr/share/grub/themes/zorin/icons/poweroff.png
Terminal=true
Type=Application
Categories=Utility;

Right-click at the file on desktop, then click Properties > Permissions > Allow executing file as program. After that, right-click again and select Allow launching.

This Solved it for me: My computer also had problems with the suspend function. I researched and tried many things, to no help, untill I came across an Ubuntu forum post where this problem was discussed. The advise was to install the Nvidea driver for the GPU and not Linux own Nouveau driver. This solved the problem for me.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.