When sudo systemctl hibernate
is used, it seems to shut down the system, and when it is started again, the previous state is not there (e.g. no previously opened windows, it's like a fresh start).
I also tried sudo apt install hibernate
and sudo hibernate
, but it just seems to lock the screen at most without any hibernation.
My /etc/default/grub
file has this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=<SWAP_ID>"
And here is how my boot SSD drive (GPT system) is configured (output from sudo fdisk -l
):
Device Start End Sectors Size Type
/dev/sdc1 2048 391167 389120 190M EFI System
/dev/sdc2 391168 68751359 68360192 32.6G Linux swap
/dev/sdc3 68751360 478908415 410157056 195.6G Linux filesystem
Secure boot is disabled from the BIOS.
In case it's relevant, I have 2 other drives /dev/sda (SSD) and /dev/sdb (HDD), but they are not used for any OS installation.
How do I get hibernate to work?
The line in
/etc/default/grub
is wrong.It should be
resume=UUID=<swap UUID>
orresume=/dev/sdc2
.