Every time I try to hibernate, it just seems to sleep; it wakes up after a few seconds without me doing anything: all the apps and windows are as they were just before I hit hibernate.
Here is the output of my journalctl -u systemd-hibernate.service
Mar 09 09:09:25 thur systemd[1]: Starting System Hibernate...
Mar 09 09:09:25 thur systemd-sleep[16901]: Successfully froze unit 'user.slice'.
Mar 09 09:09:25 thur systemd-sleep[16901]: Performing sleep operation 'hibernate'...
Mar 09 09:09:50 thur systemd-sleep[16901]: System returned from sleep operation 'hibernate'.
Mar 09 09:09:50 thur systemd-sleep[16901]: Successfully thawed unit 'user.slice'.
Mar 09 09:09:50 thur systemd[1]: systemd-hibernate.service: Deactivated successfully.
Mar 09 09:09:50 thur systemd[1]: Finished System Hibernate.
Mar 09 09:09:50 thur systemd[1]: systemd-hibernate.service: Consumed 9.875s CPU time, 1.8M memory peak, 512K memory swap peak.
Mar 09 09:10:07 thur systemd[1]: Starting System Hibernate...
Mar 09 09:10:07 thur systemd-sleep[17127]: Successfully froze unit 'user.slice'.
Mar 09 09:10:07 thur systemd-sleep[17127]: Performing sleep operation 'hibernate'...
Mar 09 09:10:29 thur systemd-sleep[17127]: System returned from sleep operation 'hibernate'.
Mar 09 09:10:29 thur systemd-sleep[17127]: Successfully thawed unit 'user.slice'.
Mar 09 09:10:29 thur systemd[1]: systemd-hibernate.service: Deactivated successfully.
Mar 09 09:10:29 thur systemd[1]: Finished System Hibernate.
Mar 09 09:10:29 thur systemd[1]: systemd-hibernate.service: Consumed 6.688s CPU time, 1.6M memory peak.
swapon -s
Filename Type Size Used Priority
/dev/nvme0n1p3 partition 17510396 5128208 -2
please remove the first line (install_items+=" /usr/lib/systemd/system/systemd-hibernate-resume.service ") from your /etc/dracut.conf.d/resume.conf.
if you want to hibernate use following command :
sudo systemctl hibernate -i
You need to add your resume device to your kernel boot options (cmdline).
In EndeavourOS with systemd-boot, I think you need to it in /etc/kernel/cmdline
Yes, see:
How to modify kernel options
In systemd-boot, it is actually quite simple. You edit the appropriate entry file which can be found on your EFI partition in the loader/entries directory. Each entry is a boot option on the menu and each has a line called options. You can modify these entries directly, however, these changes may be overwritten when packages are installed or updated.
To make the changes, instead of modifying the entries, modify the file /etc/kernel/cmdline which is a one-line file containing a list of kernel options. Then run sudo reinstall-kernels which will populate the entries and regenerate the initrds.