Ubuntu – Ubuntu 18 hibernation using the power button

18.04hibernateshutdownswap

I am using ubuntu 18, I had issues using hibernation

systemctl-hibernate 
pm-hibernate

setting the power button to hibernate,
dconf-editor,
alt+power button,
and gnome extentions did not work

It started working after I used

sudo apt install uswsusp

Now only pm-hibernate works, non of the others including systemctl-hibernate and the power button being set up to hibernate, and alt+power button

I assume that the default action when using the power button with or without alt is the systemctl-hiberate.

How can i set it up to use pm-hibernate?

Best Answer

Use the config on the ARK wiki and its debian version here. Then, systemd would start using s2disk (pm-hibernate uses s2disk) to hibernate. This will getsudo systemctl hibernate working, and dependent features like hibernate on Power button press will automatically work.

Related Question