1) First off make sure your swap partition is bigger than your RAM otherwise you wont have enough space to save the contents of your memory. Use gparted or whatever takes your fancy. Plenty of help on the net for this so I won't go into it.
2) Hibernation was removed from Ubuntu so you need to get it back into you shutdown menu again:
Open:
- Code: Select all
sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
add:
- Code: Select all
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
3) There are some modules that prevent hibernation so edit:
- Code: Select all
sudo nano /etc/modprobe.d/blacklist.conf
add:
- Code: Select all
blacklist tpm_tis
blacklist mei
to the end of the file to blacklist those modules. note: temporarily removing them using rmmod made the whole process fail in my case so probably best to blacklist them as above and reboot.
Reboot.
What are they:
tpm_tis - Trusted Platform Module which I don't need. Causes the failed to thaw error.
mei - Support for IT management. If IT isn't managing your box, you can blacklist it safely it seems. Causes the watchdog error.
4) It seems Grub2 in 12.04 does not know to boot from swap so:
find your swap partition:
- Code: Select all
sudo fdisk -l
and take note of the location of your swap i.e. /dev/sdz99
edit:
- Code: Select all
sudo nano /etc/default/grub
add:
- Code: Select all
GRUB_CMDLINE_LINUX="resume=/dev/sdXY"
where /dev/sdXY is the partition identified above
save the file
Run:
- Code: Select all
sudo grub-mkconfig -o /boot/grub/grub.cfg
or
- Code: Select all
sudo update-grub
will probably do nicely
5) Hibernate using the new option which should now be present in your shutdown menu.
Resources:
https://help.ubuntu.com/12.04/ubuntu-he ... rnate.html
http://ubuntuforums.org/showthread.php?t=1970325
http://superuser.com/questions/383140/l ... ibernation
http://gordonazmo.wordpress.com/2011/02 ... erkat-fix/