This was done in Linux Mint 19.1, Cinnamon, so have no idea if it works on other versions, tho I don't see why it shouldn't, just make sure your version is also using systemd.
The configuration is made on a full disk encryption, specifically LUKS on LVM.
AS A GOOD PRACTICE, REMEMBER TO MAKE COPIES OF ANY FILE YOU CHANGE, SO THAT YOU CAN REVERT THIS EASILY IF ANYTHING GOES WRONG.
Check /etc/fstab to find out where your swap partition is mounted on boot:
sudo cat /etc/fstab
In my case, it was on:
/dev/mapper/mint--vg-swap_1 none swap sw 0 0
So we will use the part that says: /dev/mapper/mint--vg-swap_1
2.- Edit the grub so that it enables hibernating to that swap partition,
sudo vim /etc/default/grub
And ADD the value we got from step one, to the line that reads: GRUB_CMDLINE_LINUX_DEFAULT=
In my case, that line looks like this after the change:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=dev/mapper/mint--vg-swap_1"
After editing and saving the file, update grub:
Wait for it to finish, and restart the machine.
(Optional) After you come back, check that hibernation is properly working now:
3.- Add the hibernation option to Mint's power menu:
Create/open the following file:
sudo vim /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
And add this content to it, and save it:
[Re-enable hibernate by default in upower]
[Re-enable hibernate by default in logind]
If Everything went nicely, now you should have the new options in the power menu, and power settings, also you can enable now a fully functional hybrid-sleep.
As an extra step, in my case I'd like my laptop to hibernate after 2 hours into sleep, so if you want this you need to do this extra steps:
1.- Create the file /etc/systemd/sleep.conf
sudo vim /etc/systemd/sleep.conf
And add this value to it (The number represents seconds you want to pass in sleep, after which the computer will switch to hibernation, so you can put it in 60 seconds or something short just to check it's working and after that you can put whatever ammount of time you want):
2.- Modify logind.conf so that it goes to suspend-then-hibernate mode instead of normal suspend.
sudo vim /etc/systemd/logind.conf
And modify this two lines for sleep key and closing the lid actions if that's how you want it:
3.- Lastly, disable cinnamon-settings from overriding dlogin.conf, just remember that whatever you change in dlogin.conf will override whatever you configure in power settings:
dconf write /org/cinnamon/settings-daemon/plugins/power/inhibit-lid-switch false
4.- Reboot, and check that everything is working as intended.
Hope it works for you guys, it was a game changer for my laptops battery to be able to have it encrypted, and with working hibernation and suspend-then-hibernate mode
Please let me know if you have further questions, and also if you make it work with some other mint version so that I can update it accordingly. Be safe and have fun!