Hybrid sleep mode?

Hi,

I’m using Manjaro with Cinnamon 6.4.12.

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.

OK, first start with providing output of

$ cat /sys/power/mem_sleep

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:

1 Like

cat /sys/power/mem_sleep
s2idle [deep]

So I assume I need a script to handle the wakeup after a specific time and then go to hibernate?

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… :person_shrugging:

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.

[Sleep]
...
AllowSuspendThenHibernate=yes
SuspendEstimationSec=30min
3 Likes

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

2 Likes

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.

=======

In Cinnamon, “Enable Hibernate after suspend” should be available? Isn’t this what you are looking for?

3 Likes

Oh yeah, I think I missed that^^’

Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.