As the title suggest.
I've already tried sudo pm-hibernate
, sudo systemctl hibernate
, sudo s2disk
all of them did nothing and just freeze on input in the terminal, except sudo systemctl hibernate
which seems to shutdown the system instantly but fail to resume after start the machine back up again.
I had 8 Gb RAM, 9 Gb Swap partition, when I first tried and I've already added resume
parameter in /etc/default/grub
. And failed after I tried to hibernate as I described above.
After that I tried use swap file instead of swap partition to hibernate by creating a 5 Gb swap file (I heard that I only need at least half the size of my RAM) and then add the parameter resume_offset
to the GRUB_CMDLINE_LINUX_DEFAULT
the same way as I did with resume
.
I also add the following to /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
and also edit the following (changing from yes
to no
in the ResultActive
both section) in /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
:
[Disable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=no
[Disable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=no
Note that when I use sudo pm-hibernate
I only have pm-utils
installed.
And when I used sudo s2disk
I uninstall pm-utils
before reinstall uswsusp
then run the command like this
sudo dpkg-reconfigure -pmedium uswsusp
before sudo s2disk
and then again nothings happened
what did I do wrong? I don't know what else I should try.