I was wondering if it is possible to config hibernation in a way, my laptop is first going to sleep when the lid is closed and after e.g. 30 min. it goes to hibernation.
I would prefer this way over going directly to hibernation, since this would avoid unnecessary writes to my ssd and faster response, when using the laptop right after closing the lid.
Archlinux wiki provides some hints how to manage ACPI events whose actions can be configured in /etc/systemd/logind.conf or /etc/systemd/logind.conf.d/*.conf:
I think you need the right configuration in /etc/systemd/logind.conf and /etc/systemd/sleep.conf probably in combination with a script or udev rule. I’ve never tried it…
The topic calls it “Hybrid sleep” mode, but that is something else entirely. (Be glad you don’t have it, as some low budget laptops only come with it.)
That alone should do it. No scripts or udev rules.
logind.conf is only if you want to do the HandleLidSwitch=suspend-then-hibernate action, and things like that (related to this anyway).
But the suspend then hibernate is all in sleep.conf.
The gist of it from my experience is that If you have a swap partition already setup properly and hibernation works by itself, your desktop environment should have an option for “suspend-then-hibernate” sort of behaviour.
I have not used Cinnamon but on KDE it works like: If you have sleep as the handler for any event, it provides you option to choose what kind of sleep mode you prefer. The way this is exposed can vary for each DE.
From a random search I did, there is a similar toggle in Cinnamon power settings to enable this behaviour it seems, you should look into any Cinnamon docs you can find just to confirm.
For general tips on setting up swap and power options, there is the Arch Wiki after all
Seems like it is maybe the default behavior, but i have never tested it. I have configured and tested sleep (s2idle) and hibernation. And everything in the abovementioned 2 config files is commented.
Here is how it looks on xfce - obviously there is the setting in xfce and then systemd which should work by default.