To test if hibernate works in your computer, open terminal (Ctrl+Alt+T) and run command:
After your computer turns off, switch it back on. Did your open applications re-open? If hibernate does not work, check if your swap partition is at least as large as your available RAM.
Enable Hibernate Option:
If hibernate works, you can continue using the above command to hibernate your machine, or enable the option in shutdown menu by editing the configuration file.
To do so, open terminal (Ctrl+Alt+T) and run command:
gksudo gedit /var/lib/polkit-1/localauthority/10-
When the files opens after running the command, scroll-down and file out both section:
- [Disable hibernate by default in upower]
- and [Disable hibernate by default in logind]
Change their values from
Save the file and reboot.
In addition, for some devices above changes may not work. A workaround is to use below command instead:
gksudo gedit /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
And when the file opens, paste below content and save the file.
[Re-enable hibernate by default in upower]
[Re-enable hibernate by default in logind]