Linux – No hibernate option in power manager on Mint 16 MATE

hibernatelinux-mintmate-desktoppower-management

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

Best Answer

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

Related Question