Friday, September 11, 2015

[How-to] Enable Hibernate in Ubuntu

[How-to] Enable HIBERNATE in Ubuntu

I enabled Hibernate in my Ubuntu 14.04 by following these:

To enable the Hibernate menu
as instructed by http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/

~$ sudo vi /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
   [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

   [Re-enable hibernate for multiple users by default in logind]
   Identity=unix-user:*
   Action=org.freedesktop.login1.hibernate-multiple-sessions
   ResultActive=yes



Setup SWAP as space to hibernate
as instructed by https://help.ubuntu.com/community/SwapFaq
 
~$ sudo blkid
   Copy the UUID of swap

~$ sudo vi /etc/default/grub
   Look for the line GRUB_CMDLINE_LINUX=""
   Replace with GRUB_CMDLINE_LINUX="resume=UUID=yourUUID"
 
~$ sudo update-grub

~$ sudo vi /etc/initramfs-tools/conf.d/resume
   Ensure that it contains RESUME=UUID=yourUUID

~$ sudo update-initramfs -u

~$ sudo reboot