Actually I am a multi-tasker and most of the programmers will do. When I was in windows I used to hibernate my system so that I can start from where I left. But after I moved to Ubuntu 16.04 I was not able to find that option in menu and was wondering about it. Then when I searched for solution I found that Ubuntu disabled that option since some programs not support hibernate option. Any how today we are going to see steps to hibernate your system as well as how to enable menu option in you Ubuntu OS.
First of all what happens when hibernate? Actually all data in RAM is stored in swap partition during computers gets off and then it gets retrieve back to RAM when computers gets on. During hibernate in laptops no hardware uses power resources.
First we need to analyse whether hardware support is there.
- Open Terminal using ctrl+Alt+t
- Type following code
/** * CodeZone.in * Author: Dineshkumar * Contact : firstname.lastname@example.org */ sudo pm-hibernate
Right now you computer gets turns off. Switch on back and check whether all your application gets re-open. If all programs are running then Hibernate working properly.
If hibernate doesn’t work, A common problem is size of swap partition. As i said before RAM contents stored in swap partition so it is mandatory that swap partition is at least as large as your available RAM.
To check this go to system monitor
If Swap is less then memory and you wish to increase SWAP memory then you can do that using gparted live CD.
So Now we need to enable Hibernate option in menu. For that open terminal and run following commands
/** * CodeZone.in * Author: Dineshkumar * Contact : email@example.com */ $ sudo -i $ cd /var/lib/polkit-1/localauthority/50-local.d/ $ gedit com.ubuntu.enable-hibernate.pkla
Copy and paste following codes for Ubuntu 16.04
[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;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit ResultActive=yes
Logout and restart your system.
After you log into system you will find hibernate in system menu.