5

OS: Lubuntu 14.04
Package: Xfce Power Manager
Package Settings:
- On AC > Actions > Put the computer to sleep when inactive for: 15 Minutes
- Extended > Set computer inactivity sleep mode: Hibernate
Intent: hibernate computer after 15 minutes of inactivity
Error message: not authorized
Error time: at hibernation

4 Answers 4

8

Follow the instructions for Ubuntu: How do I hibernate my computer?

That is, test first, then create a file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.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

Note that in order to create this file you need root permissions. So, for instance, use sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

2
  • Sorry to hear that. However, this is a different problem with hibernation. See DebuggingKernelHibernate for how to debug this. Also, have a look whether others have had the same problem (and perhaps) already fixed for the device you are using. Eventually, you might want to report a bug against the kernel you are using. You might also want to check out TuxOnIce
    – xebeche
    May 27, 2014 at 9:52
  • For anyone else who comes across this: This worked for me on Xubuntu 20.04 to get the Hibernate buttons to show up in the shutdown dialog, but I had to append resume=UUID=swap-uuid-from-fstab to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default.grub (and run sudo update-grub) for it to actually resume from hibernation successfully. Aug 1, 2020 at 4:03
1

I had the same problem under xubuntu and it was due to light-locker which I believe is in use also under lubuntu. Reinstalling light locker fixed the problem permanently for me:

sudo aptitude purge light-locker light-locker-settings
sudo aptitude install light-locker light-locker-settings

I believe that removing and then re-installing fixed a policy problem somewhere.

0

For Lubuntu 14.04.1 I find /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla where was

[Disable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=no

[Disable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=no

Change ResultActive to yes for both blocks. If you don't find com.ubuntu.desktop.pkla - try to search any *.pkla file in /var/lib/polkit-1/localauthority folder for some same strings

1
  • @xebeche's answer above is better, as any changes under /var/lib/polkit-1 will be overwritten whenever the policykit-desktop-privileges package is upgraded. Jan 5, 2015 at 16:55
0

This is an old question, but just to point out something important, be careful when reinstalling light-locker and light-locker-settings because this action also removes lubuntu-desktop* which could be troublesome.

I would explore the polkit options first. Just chiming in.

You must log in to answer this question.