The Hibernate option is available in Beta and Alpha releases of Ubuntu 14.10, but the final release removed this option in the Unity desktop.
This quick guide is going to show you how to re-enable this feature so that you can hibernate your machine from the shutdown menu (top-right gear button).
1. Before getting started, you may run command below in terminal (Ctrl+Alt+T) to test if hibernate works in your case:
After you computer turns off, switch it back on. Did your open applications re-open? If hibernate doesn’t work, check if your swap partition is at least as large as your available RAM.
2. To re-enable hibernate, run command below to edit the configuration file:
sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
When the file opens in the terminal window, scroll down to find out the section started as:
“[Disable hibernate by default in upower]” and “[Disable hibernate by default in logind]”
Change the value of ResultActive to yes in both.
3. To save the changes, press Ctrl+X and type y and finally hit Enter.
When everything’s done, restart your computer.
1. If previous steps do not work for you, replace the command in step 2 with:
sudo nano /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
2. Thanks to Cruz, you can add below lines into the configuration file to make Hibernate work for multiple users:
[Re-enable hibernate for multiple users by default in logind]
3. If you want to hibernate your laptop when lid is closed, run command to edit the configuration file:
sudo nano /etc/systemd/logind.conf
Add HandleLidSwitch=hibernate as a new line into the end and save the file. It will work at next boot.