2

First of all hibernation via the command

sudo pm-hibernate

works fine from command line on my newly installed Ubuntu 18.04.

I've a fine gnome extension called Hibernate status button which displays an hibernate button in my system menu, as depicted in this image

status bar

But when I click on it is hibernating and power down, but when I start up the next time it opens with a completley new session.

Has anyone a working solution to this problem?

abu_bua
  • 11,313

2 Answers2

1

According to this document, you did right things except that you have to create the file
/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

You can do it by copy/paste the following in a termnial

sudo tee -a /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla << END1
[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
END1
cmak.fr
  • 8,976
0

This is with Nvidia's NVHDA issues ... meaning sound via HDMI. Here are the steps for the command-line - should you have Nvidia's NVHDA as I do:

If I manually disable the audio output:

sudo tee /proc/acpi/nvhda <<< OFF

I'm then able to get it to sleep. I then have to turn it on again on resume with:

sudo tee /proc/acpi/nvhda <<< ON
Byte Commander
  • 110,243