Xubuntu 14.04: how to enable hibernate?

20,074

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

Share:
20,074

Related videos on Youtube

Lynob
Author by

Lynob

Updated on September 18, 2022

Comments

  • Lynob
    Lynob almost 2 years

    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.

  • Lynob
    Lynob about 10 years
    two questions why locate com.ubuntu.desktop.pkla does not find it? and why is hibernate disabled by default?
  • Mitch
    Mitch about 10 years
    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.
  • Lynob
    Lynob about 10 years
    why using sudo? I used to search for files in /etc and var without using sudo
  • Mitch
    Mitch about 10 years
    If you look at the folder the file is in, its owned by root. I tried it, and it works with sudo.
  • Lynob
    Lynob about 10 years
    yes I just tried it too and it works too but all I'm saying that I can search for files, say php.ini which is located in /etc/php5/apache2/php.ini and it works without sudo and as far as I know, etc is also owned by root.
  • Mitch
    Mitch about 10 years
    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.
  • user311982
    user311982 over 9 years
    Without using sudo the file doesn't exist for me, but shows up once i add sudo to the command
  • ViBE
    ViBE over 8 years
    finally. best answer ever. other solutions does not work for me. many thanks.
  • Gunnar Hjalmarsson
    Gunnar Hjalmarsson almost 8 years
    Edits of a package owned file in /var, as in this solution, will be wiped out next time the package is updated. Better to create a file in /etc as showed in the official documentation.
  • Gabriel Staples
    Gabriel Staples almost 8 years
    @Lynob, for why they are disabled by default, see here (sites.google.com/site/easylinuxtipsproject/bugs) under the section titled, "Hibernate and suspend don't always work well: they make some computers malfunction or even enter a coma".
  • tocallaghan
    tocallaghan over 7 years
    This also works for Kubuntu 16.04
  • John P
    John P over 6 years
    I double-checked the polkit-1 entries - hibernation is/was not disabled in that file, but it's been missing from my power manager for as long as I can remember. Are there any other culprits? In general I feel like this is a very silly configuration, especially as a default - I can't imagine why a guest/unauth would have more privileges than a user, nor any scenario where authorized users would be prevented from logging out and granting themselves whatever privileges follow this pattern. I see this is supposed to protect the session, but from the owner?
  • John P
    John P over 6 years
    From this page it appears the label "disable by default" does not imply that "yes" corresponds to disabling hibernation. Serves me right for assuming...
  • Vlad
    Vlad almost 4 years
    I just want to confirm that this solution works also on Xubuntu 20.04. Thanks for it!