4

In my fresh install of Linux Mint 16 with MATE, I have no hibernate option in the Power Manager; only suspend and shutdown.

In the Quit menu I have hibernate as an option. Also sudo pm-hibernate works from the command line.

Any suggestions of how to enable hibernate in the Power Manager? I want to hibernate when the laptop lid closes.

I have just enough swap space for hibernation to work:

$ free -h
             total       used       free     shared    buffers     cached
Mem:          3.5G       1.6G       1.8G         0B        18M       406M
-/+ buffers/cache:       1.2G       2.3G
Swap:         3.6G        16M       3.6G
6
+50

Edit this file: /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

eg.: sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Add this 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

This will add hibernate option in menu. But if you want to hibernate, when LID will close, then execute this (this will enable hibernation when LID is closed):

sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=hibernate/g' /etc/systemd/logind.conf

And restart system or execute: sudo systemctl restart systemd-logind.service

  • 1
    Thanks! Have a bunch of reputation :-) To future readers, there is no need to adjust /etc/systemd/logind.conf; the first part of the answer is sufficient. – Duncan Jones May 2 '14 at 19:29
  • @Duncan You can edit his answer to reflect that. – PHPst Aug 11 '15 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.