After some tinkering around, I found that this is what you need:
1: Make sure your swap partion is greater than the amount of RAM you have, because the system will dump all active software on the swap partition.
2: Make sure your swap partition actually exist and is mounted correctly. In MATE, go to control center -> disks -> check if a swap partition exists. If it does, click on it. You will get the device number in the describtion. If you don't have a swap partition, find a guide on Google on how to create one.
3: The get the UUID of the partion, in my case /dev/sda7:
Code: Select all
sudo blkid /dev/sda7
Code: Select all
sudo gedit /etc/fstab
Code: Select all
UUID=8a4ade5e-7020-4c37-b179-ff07c49ff688 none swap sw 0 0
6: Make sure the system is configured to wake up from hibernation using the right partition:
Code: Select all
sudo gedit /etc/initramfs-tools/conf.d/resume
Code: Select all
RESUME=UUID=8a4ade5e-7020-4c37-b179-ff07c49ff688
Code: Select all
sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Code: Select all
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[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
ResultActive=yes
Code: Select all
sudo mount -a
Code: Select all
sudo update-initramfs -u -k all
This should be all you need to get hibernate as an option in both shutdown menu and in power menu in control center.