You are not logged in.
.
Last edited by leminhman0312 (2024-09-22 15:36:46)
Offline
You have left "#AllowHybridSleep=yes" as per default, which is a different target than "AllowSuspendThenHibernate=", and
The amount of time the system spends in suspend mode before the system is automatically put into hibernate mode. Only used by systemd-suspend-then-hibernate.service(8).
Perhaps you need "AllowHybridSleep=no"?
Offline
.
Last edited by leminhman0312 (2024-09-22 15:37:05)
Offline
If you set
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
and restart logind (or reboot), is the lid ignored on external power?
Cause if not, the state is simply not properly detected.
Sanity check: is there a parallel windows installation?
Offline
Ok. A couple questions: What's in the journal for the whole suspend-hibernate cycle after resume? How do you test changed settings (daemon-reload and logout/login)? What happens when you suspend manually from the terminal while docked, does it stay in suspend or hibernate as well?
Have a look at
systemd-inhibit --list
if there is something else handling the lid switch and hibernate key.
Offline
.
Last edited by leminhman0312 (2024-09-22 15:37:31)
Offline
.
Last edited by leminhman0312 (2024-09-22 15:37:53)
Offline
xfce4-power-manager 1000 maxwell 1330 xfce4-power-man handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch xfce4-power-manager handles these events block
Offline
Yes, that reads like there may be a clash between xfce4's power-manager and the logind.conf lid actions. https://wiki.archlinux.org/title/Xfce#L … gs_ignored describes the opposite and will help to test changing xfce's setting there.
Offline
.
Last edited by leminhman0312 (2024-09-22 15:38:40)
Offline
Meanwhile, the xfce4-power-manager gets suspend and hibernate working every single time.
Then why is this thread?
I guess you mean the invocation of some screen locker when suspending?
https://wiki.archlinux.org/title/Power_ … stem-sleep
https://gist.github.com/AladW/de1c5676d93d05a5a0e1
Offline
I find it confusing that the systemd-inhibit lists xfce4-power-manager while you use i3wm, but ok. So, the main problem remained when toggling "xfce4-power-manager/logind-handle-lid-switch".
If you want to rely on systemd for power management, what I would do is troubleshoot the systemd sleep.conf/login.conf on the console, i.e. without any WM:
First, remove any hibernate actions and configure it only for suspend-resume (whether on AC or battery, lid closed or button pressed) and not worry about screen locking for that. Once the suspend works consistently everytime, start i3wm again and check it continues to suspend only on AC.
Once that works, look into the screen locking and, finally, how to enable hibernate-after-suspend on battery.
That will hopefully find the culprit in your sleep.conf
Offline