Can't use hibernate

Hello! Could you please tell me how to set up hibernation in Manjaro KDE.

The laptop has 16 GB of RAM. I’ve created a 20GB swap, a hibernation button appeared. When I press this button (or execute the systemctl hibernate command in the console), the system seems to go into hibernation. The power turns off completely. However, after switching it on and logging into system accout there are no open applications.

Tried installing pm-utils 1.4.1-8 from AUR using pamac.

Do I need to register swap_device_uuid somewhere and/or edit the GRUB config?

(I have a dual boot, and when turning laptop on, I first select manjaro from the list)

The output of the swapon command is now:

NAME TYPE SIZE USED PRIO

/swapfile file 20G 0B -2

htop shows that swap is used when the RAM is almost full,.

Thanks in advance!

My system is like this:

Manjaro Linux 23.0.4 Uranos

KDE Plasma 5.27.8

KDE Frameworks 5.110.0

Qt Version 5.15.11

Kernel Version 6.1.55-1-MANJARO (64-bit)

Graphics Platform X11

Hardware:

Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz

Memory: 15.4 GiB of RAM

Graphics processor: Mesa Intel® UHD Graphics 630

Manufacturer: Dell Inc.

SSD: XPG Gammix S11 Pro 1.9 TiB

So you have no access to a search engine and you did not even found the search function here in the forum? Try to help yourself first, before wasting our time, sorry to say this so frankly.

You are missing the resume hook
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate

To sum it up:

lsblk -f  ---> to  check the swap UUID
sudo nano /etc/mkinitcpio.conf --> insert resume hook last (or before fsck)
sudo mkinitcpio -P
sudo nano /etc/default/grub ---> add kernel parameter resume=UUID=XXXXXXXXXXXXX
sudo update-grub
2 Likes

Theres a little bit more to be done…

https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file

resume=UUID=swap_device_uuid

and

resume_offset=swap_file_offset
1 Like

Isn’t resume offset only needed if you work with swap file instead of partition? I don’t have it and it works perfectly fine.

OP is using a swapfile.

1 Like

Oh i oversaw it. I guess because the lack of formatting in the first post.

1 Like

Thank you for advices!
Used findmnt -no UUID -T /swapfile to find UUID and filefrag -v /swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}' to find resume_offset. Then added it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. Also added resume word to HOOKS in /etc/mkinitcpio.conf and it works like a charm!

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