Hibernate missing from power menu and when I press laptop power button
772
When I upgraded from 11.10 to 12.04 my Ubuntu power menu has lost the ability to hibernate. Is there a way to add that back in, or is this default for 12.04?
After the next restart, the option "Hibernate" will be back in the 'power menu' at the top right of your screen. If your hardware supports hibernation, it'll work now.
Note: In case you want to disable hibernation again, just revert the changes made above.
Jorge: there are several ways to hibernate a Linux computer. If Ubuntu's defaults fail, you can always try the other hibernation systems.
In a console:
sudo apt-get install hibernate
After that, reboot. That will install the uswsusp system, a reliable system with compression, that wasn't even installed with Precise.
The second system is TuxOnIce, but setting it up requires more technical skills.
After that, follow the Precise howto for enabling hibernation, posted before. It's sad to see that the packages needed to hibernate aren't even installed in a Precise default install. If you don't install "hibernate", if you try to run "sudo pm-hibernate", that command won't do anything (althogh on some systems it would perform a shutdown).
It's not because of 12.04 but because you don't have a swap partition, or it is not marked as use for hibernate. I had a similar problem when I upgraded to 11.10.
Hibernate will only work if you dont have a crypted swap partition, which is the default if you choose to crypt your login directory during ubuntu 12.04 install.
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "${1}" in
hibernate)
if [ -e /dev/zram0 ]; then
swapoff /dev/zram0
fi
;;
thaw)
if [ -e /dev/zram0 ]; then
swapon -p 100 /dev/zram0
fi
;;
esac
to the /etc/pm/sleep.d diectory. This was need to get it working for me as guess what ? You can't hibernate to a ramdisk !!!
Unfortunately, hibernation has been disabled by default in Ubuntu 12.04, because it wasn't working correctly on many systems.
If you are not sure if hibernation works with your hardware, you can test it by sending the hibernate command from your Terminal
Here's how to enable it anyway: (warning: only for advanced users — might not work)
In the Terminal, type:
Enter your password when requested.
Search for the section
and replace it with
After the next restart, the option "Hibernate" will be back in the 'power menu' at the top right of your screen. If your hardware supports hibernation, it'll work now.
Note: In case you want to disable hibernation again, just revert the changes made above.
Hibernation is disabled by default in Ubuntu 12.04. A rationale of this decision can be found in this bug report.
See this question to reenable it:
Jorge: there are several ways to hibernate a Linux computer. If Ubuntu's defaults fail, you can always try the other hibernation systems.
In a console:
After that, reboot. That will install the uswsusp system, a reliable system with compression, that wasn't even installed with Precise.
The second system is TuxOnIce, but setting it up requires more technical skills.
After that, follow the Precise howto for enabling hibernation, posted before. It's sad to see that the packages needed to hibernate aren't even installed in a Precise default install. If you don't install "hibernate", if you try to run "sudo pm-hibernate", that command won't do anything (althogh on some systems it would perform a shutdown).
It's not because of 12.04 but because you don't have a swap partition, or it is not marked as use for hibernate. I had a similar problem when I upgraded to 11.10.
Go to this webpage for help either adding a swap partition or making it ready to use swap. https://help.ubuntu.com/community/SwapFaq#How_do_I_add_more_swap.3F
Remember your swap must be bigger than your amount of physical memory if you want to hibernate!
Hibernate will only work if you dont have a crypted swap partition, which is the default if you choose to crypt your login directory during ubuntu 12.04 install.
Try adding a script like
to the /etc/pm/sleep.d diectory. This was need to get it working for me as guess what ? You can't hibernate to a ramdisk !!!
D.