I assume you have installed Debian in a way that it uses it's own separate swap partition. If you have not, I would suggest doing so (create another swap partition and change the /etc/fstab
files accordingly), because too different operating systems writing to the same swap partition may discard hibernation data stored on the partition by the other OS.
Then you have to ensure that the OS you want to use hibernation on (usually both), writes to the correct partition. This is configured in the /etc/initramfs-tools/conf.d/resume
file. You have to put the UUID of the correct swap partition in there (use sudo blkid /dev/$device_name
to get the UUID). Finally you need to update the initial ramdisk:
sudo update-initramfs -u -k all
That should fix it.
I too hate having to pass a URL so I will copy and paste the information and attach the web page to the bottom. I do not see this in your link.
While reading this, I noticed that hibernation may not work if you formatted with btrfs file system? So, how is hibernation permanently enabled in Ubuntu 16.04?
To make the Ubuntu hibernation process permanent, you need to create a new file using a text editor on the command line:
sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
The system requires root privileges to enable the hibernation option, hence, the command sudo should be added. You can use other text editors like vi, gedit, emacs, etc.
Now, copy and paste the following text to a file (use the mouse; keyboard shortcuts won’t work):
[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;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes
Press CTRL+O to save, and CTRL+X to exit the nano editor.
Now, logout of your system and then login again. You will now see a hibernate option, along with the Shut Down and Suspend options.
The link for your convenience is:
https://fossbytes.com/enable-disable-hibernate-option-ubuntu-power-menu/
Best Answer
I found a way to do this using
s2disk
instead ofpm-hibernate
here: Hibernate with reboot on LinuxI replace the command
with