Got back Hibernation option, but cannot resume from Hibernate

In my Ubuntu 12.04, the hibernation option was working well and fine. However, I installed Debian on another partition recently and when I again tried to boot to Ubuntu, I got a message on the boot splash screen saying :

The disk drive for / is not ready yet or not present. Continue to wait; or press s to skip mounting or M for manual recovery.

After logging into Ubuntu, I find that my hibernation option has gone missing.

Is there anyway to recover the hibernation option?

EDIT: I solved the disk drive problem and I got the hibernation option back. When I did "sudo pm-hibernate", my system went to hibernation. However, when powering on again, it booted up normally and thus there was no effect of hibernation.

How can this be rectified?

EDIT1: System - Lenovo ideapad s10-2.

enter image description here

EDIT2: /etc/fstab

enter image description here

EDIT3: Screenshot of my hard disk.

enter image description here


Solution 1:

I assume you have installed Debian in a way that it uses it's own separate swap partition. If you have not, I would suggest doing so (create another swap partition and change the /etc/fstab files accordingly), because too different operating systems writing to the same swap partition may discard hibernation data stored on the partition by the other OS.

Then you have to ensure that the OS you want to use hibernation on (usually both), writes to the correct partition. This is configured in the /etc/initramfs-tools/conf.d/resume file. You have to put the UUID of the correct swap partition in there (use sudo blkid /dev/$device_name to get the UUID). Finally you need to update the initial ramdisk:

sudo update-initramfs -u -k all

That should fix it.

Solution 2:

Unfortunately, hibernate doesn't work in many cases, which can cause you to lose data if you expect your documents and applications to re-open when you switch your computer back on. Therefore, hibernate is disabled by default.

Test if hibernate works

Note : Always save your work before hibernating
You should save all of your work before hibernating the computer, just in case something goes wrong and your open applications and documents cannot be recovered when you switch on the computer again.

You can use the command line to test if hibernate works on your computer.

  1. Open the Terminal by pressing Ctrl+Alt+T or by searching for terminal in the Dash.

  2. Type sudo pm-hibernate into the terminal and press Enter.
    Enter your password when prompted.

  3. 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.

Enable hibernate

If the hibernate test works, you can continue to use the sudo pm-hibernate command when you want to hibernate.

You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla. Add the following to the file and save:

[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.hibernate-multiple-sessions
ResultActive=yes

Restart and hibernation is back!

Or run killall unity-panel-service to just reset the menu.

Some users will then need to run sudo update-grub to get the hibernate option to be available in the power menu. Some users may also have to at least log out then log in to get it to appear in the (upper right) power menu.

Source : Ubuntu Docs - Power Hibernate

Source : Ubuntu Wiki - Debugging Kernel Hibernate