I've been trying to get hibernate working on a fresh install of Ubuntu 18.04 LTS.
It works beautifully using sudo pm-hibernate
from command-line.
I followed instructions to give me a menu option by creating the file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
This created the menu option, but it was obviously doing something different, because upon re-power-up, the system starts fresh as if from a "hard" shutdown, whilst with pm-hibernate
the system restores to exactly where I was at.
Through various efforts, I've now lost the menu option, although there remains an option for "Hibernate" under Settings->Power.
I was trying to get the menu option to use pm-hibernate
instead of systemctl hibernate
.
I think (but I'm not sure) that the problem came with sudo apt remove hibernate
I don't know how to get back the menu option, which appeared after creating the polkit
file above. That file still exists and is unchanged.
So I tried: sudo systemctl restart polkitd.service
which responded with:
Failed to restart polkitd.service: Unit polkitd.service not found.
Even though:
sudo apt install policykit-1
reports:
policykit-1 is already the newest version (0.105-20ubuntu0.18.04.1).
- First I want to get
polkit
working again - As a separate question I'll then ask how to control which hibernate routine it uses (
pm-hibernate
orsystemctl hibernate
) because one of those works beautifully for me, and the other fails.