One of those note-to-self posts!
Why does Ubuntu come with Hibernation disabled by default?
Ubuntu had to resort to such measures as users experienced a lot of issues like:
- No resume after suspending the PC — in a limbo
- Open files and folders gone — Shutdown instead of hibernation
- Wifi etc devices not working after waking up — the worst nightmare
And that happened because there wasn’t enough Hardware support. Even in Ubuntu derivatives like Linux Mint it came disabled.
What is hibernation?
Seriously? Forget it. I am not even going to look at you.
Alright Alright suit yourself: https://help.ubuntu.com/community/PowerManagement/Hibernate
Advantages of Hibernation:
- You have an edge over “suspending”. It saves power.
- The exact state of the computer is resumed.
- Major use case for the people who leave their PCs unattended (think: http://Torrentz.in)
How to enable it in Ubuntu:
Step#1 Check if hibernate works on your hardware.
- Open Terminal (CTRL + ALT + T)
- Save your work first and then type
$ sudo pm-hibernate
- If everything goes smoothly, start your laptop and continue iff things look good.
- If you see anything unexpected then please make sure that the size of SWAP is at least as large as the RAM or just
Step#2 You can continue to use that command safely or make it permanent by enabling it on the menu (do it only if Step#1 above works)
Open terminal and type:
$ sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Enter the password
(instead of `gedit` you can use `vi` its awesome)
Step#3 Paste the following lines in the blank file you created just now.
[Re-enable hibernate by default] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes
Hit Save and Quit.
Step#4 Reboot for the changes to take effect.
If upon restart you still cannot see the “Hibernate” item in the menu, then you need to Tweak the Grub but mostly it would not come to that.