I was also having this problem plague me ... and a fix after many manY maNY mANY MANY attempts was to re-install Ubuntu 18.04, and now it is working perfectly. I am also using Nvidia's "tested" Driver, as Nvidia was the culprit before.
Perhaps it was the "sudo add-apt-repository ppa:graphics-drivers" ppa which installed "Extra" Stuff from the PPA and/or the 396 driver itself which screwed up my laptop's hibernating ability.
Either way it works flawlessly at this time of writing with the NVidia's 390 tested driver. And just FYI, it was also working with the 396 driver for a long time, but became problematic last week - AGAIN! SO although I don't know the exact cause ...
It is/was definitely related to the NVidia driver as before switching to the Nouveau driver also worked, but I sure did not like that option.
Trying to help, Mark
p.s here are my other Tomboy notes for other issues with Ubuntu and Hibernating
18/07 Troubleshooting
‣ Prerequisites - does your kernel support suspend-to-disk?
• Kernel supports whatever is listed in /sys/power/state, so:
• cat /sys/power/state
• Allowed (to my knowledge) entries there include: mem, standby, freeze, disk. Explanation:
∘ mem - has several meanings, which one exactly on your system you'll find out via cat /sys/power/mem_sleep. I have: s2idle [deep]
∘ standby - Power-On Suspend (if supported)
∘ freeze - Suspend To Idle (STI)
∘ disk - Suspend To Disk (STD), hibernation. This - you want.
∘ mine says : freeze mem disk - PERFECT!
• Then we need to check
• $ cat /sys/power/disk
‣ [platform] shutdown reboot suspend test_resume
‣ [disabled]
• (not very good)
‣ Enable Hibernate and put it in menu - Easy-Peasy
• sudo apt install pm-utils cpufrequtils
• Then test if hibernate works in your computer by running command:
• sudo pm-hibernate
• After you computer turns off, switch it back on.
‣ Did your open applications re-open? If so it works, if not then hibernate
does not work. You can check if your Swappiness partition is at least as large as your available RAM, as it may solve the problem.Problem! Hibernation not allowed!
∘ Test: pm-hibernate - (if pm-utils package is installed) , or
∘ works! after 18.04 re-install and no Nvidia yet
∘ systemctl hibernate
∘ works! after 18.04 re-install and no Nvidia yet
∘ Re-add Hibernate Option to Shutdown menu:
• 1. Edit a specific file with this command.
• sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d
/com.ubuntu.desktop.pkla
• 2. Scroll down the Text Document and find the below sections:
∘ [Disable hibernate by default in upower]
∘ [Disable hibernate by default in logind]
∘ Change both the values from no to yes in:
∘ ResultActive=no (change this to yes)
‣ Save, Exit & Reboot - Done!