I recently updated to Ubuntu 18.04 (indeed re-installed due to a failed update).
sudo systemctl hibernate
worked after adding the swap partition UUID into grub.
Then, I modified the content of /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
[Disable hibernate by default in upower]
and [Disable hibernate by default in logind]
sections
as below:
ResultActive=yes
and created /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
with the following content:
[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
according to this guide.
Nevertheless, my power menu still does not contain the Hibernate option. What have I to do?