Sleep is working, hibernate is working, but selecting “Standby, then hibernate” in power saving settings doesn’t work, it actually performs a normal sleep, and what is that unknown period it needs to jump from normal sleep to hibernate?
Operating System: Manjaro Linux
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.1-2-MANJARO (64-bit)
Graphics Platform: Wayland
The unknown period is only configurable through systemd config files, the HibernateDelaySec entry in /etc/systemd/sleep.conf can modify the default which depends on your system’s capabilities and is described in man systemd-sleep.conf (see the “suspend-then-hibernate” section).
With a laptop left connected to power, it seems it will always fail to hibernate after sleeping
If the system has battery and HibernateDelaySec= is not set, low-battery alarms (ACPI _BTP) are tried first for detecting battery percentage and wake up the system for hibernation. If not available, or HibernateDelaySec= is set, the system would regularly wake up to check the time and detect the battery percentage/discharging rate. The rate is used to schedule the next detection. If that is also not available, SuspendEstimationSec= is used as last resort.
After setting HibernateDelaySec to a value, now it works fine as it should.