I enabled Hibernate in 12.04 following the procedure given in this question : How to enable hibernation?
But, Even after I enabled it, The hibernate isn't working. By not working, I mean the computer is hibernating correctly, but it is not resuming. I always given the login screen and a fresh session.
How can I enable hibernate that successfully resume?
Update for 16.04 (September, 2016)
Hibernate might not work not even it is successfully enabled if you have
btrfs
partitions. As revealed in a question hereIt was also revealed that enabling UEFI can cause problem with hibernation too.
Enable the Hibernate option
To enable Hibernate, I followed this answer from Dima.
After enabling hibernate you will have an option to hibernate in the indicator session menu at top panel. But, though you can hibernate you may not resume from hibernate. You will just be given a new session. The fixes are below.
The fixes to be able to resume from hibernate (12.04)
Several readers confirmed this working on 14.04 too
There is two way to fix this.
1. Editing the
/etc/initramfs-tools/conf.d/resume
fileFirst get the UUID of the swap partition.
This will output a line similar to this:
The actually line will not match with this. Copy the value of UUID in between
"..."
double quote.Open the resume file
And in that file, add a line like this
Don't forget to replace the actual UUID value you get from step 1. Save the file and exit gedit
Then in terminal, execute this command
You will now be able to resume from hibernation
2. Editing the
/etc/default/grub
file.Open a terminal and execute the below command to open it
There will be a line like
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
. Edit the line to insertRESUME=UUID=<your-uuid-value-here>
after the wordsplash
.For example in my case, the line looks like this after editing
Make sure, you used your UUID value you get from
sudo blkid | grep swap
command.Then do this command
This also enable you to successfully get resumed from hibernate.
Tested on two Ubuntu installation, both worked