20

I'm using Xubuntu 14.04 64 bit. I know that question been asked a billion times, but all of them consist of editing following file:

/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

That file does not exist on my system. I tried com.xubuntu.enable-hibernate.pkla but doesn't exist either, locate command doesn't find it.

2
  • 2
    Where did you read this file must be exist? I've created it, put the commands into and hibernate works fine on Xubuntu. To do that, use your favorite text editor to create /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla. Add the following to the file and save:... help.ubuntu.com
    – TuKsn
    May 7, 2014 at 20:47
  • @Simptnon but that file contains a billion other lines than the hibernate, anyway I found it, but weirdly, locate didn't if it wasn't for mitch i would never find it
    – Lynob
    May 7, 2014 at 22:42

2 Answers 2

28

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

Look for

[Disable hibernate by default in upower]
[Disable hibernate by default in logind]

Change the value of "ResultActive=no" to "ResultActive=yes" in both, press ctrl+x to exit the file. It will ask to save the change or not. Press Y to save the change, if you're on Ubuntu restart your system.

Edit

Just tried this on Xubuntu 16.04, and Ubuntu 16.04. and it also works.

enter image description here

For Ubuntu 16.04 I had to reboot for it to work.

enter image description here

enter image description here

14
  • 2
    two questions why locate com.ubuntu.desktop.pkla does not find it? and why is hibernate disabled by default?
    – Lynob
    May 7, 2014 at 22:40
  • 1
    As far as the first one, use sudo locate com.ubuntu.desktop.pkla, and it will find it. As for the second one I really don't know for sure, but it might be a bug.
    – Mitch
    May 8, 2014 at 5:22
  • 1
    why using sudo? I used to search for files in /etc and var without using sudo
    – Lynob
    May 8, 2014 at 6:04
  • 1
    If you look at the folder the file is in, its owned by root. I tried it, and it works with sudo.
    – Mitch
    May 8, 2014 at 6:07
  • 1
    If you look at the polkit-1 folder, you will see an X on the folder, which means that you are neither the owner nor in the group that has permissions to read/write/execute to that particular folder/file. Where as /etc does not.
    – Mitch
    May 8, 2014 at 6:22
0

For a novice like me, I would like to add:

"Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

Look for

[Disable hibernate by default in upower] [Disable hibernate by default in logind]

Change the value of "ResultActive=no" to "ResultActive=yes" in both, and then restart your system."

.....before restarting the system, you should press ctrl+x to exit the file. Then it will ask for Yes or No to save the change. If you don't save the change, it will not work. I am using ChaletOS which is based on Xubuntu. It doesn't need a restart.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .