I tried installing pm-utils and invoking
sudo pm-hibernate but that didn't work.
Can you be more specific? As @Lewis noted, hibernate is disabled by default (even in Ubuntu). If you wish to hibernate manually with
pm-hibernate examine the pm-utils logs (
less /var/log/pm-suspend.log) for clues.
If everything appears to be successful in there you more than likely just need to add a parameter to your boot options so the kernel knows where (eg your swap partition) to attempt to resume the system from.
Firstly you should make sure your swap partition is larger than your RAM.
sudo fdisk -l and
free -h can be used to check this. Note the device ID of your swap partition.
If so, edit your grub config via
sudo scratch-text-editor /etc/default/grub and search for the line with
GRUB_CMDLINE_LINUX_DEFAULT then add the resume option to the end containing the device ID of your swap partition.
Similar to this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/sda2"
Be sure to run
sudo update-grub afterwards to apply the changes.
Add Menu Item
You can add a hibernate option to the wingpanel power dropdown by creating the following file in a terminal.
sudo touch /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
sudo scratch-text-editor /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Add the following, save the file then reboot. Source.
[Re-enable hibernate by default]
[Re-enable hibernate by default for login1]
[Re-enable hibernate for multiple users by default in logind]