swaywm/swayidle

before-sleep not triggering when going into hibernation, hybrid-sleep, or suspend-then-hibernate

ivanmlerner opened this issue · 1 comments

Hibernation, hybrid-sleep and suspend-then-hibernate are not triggering the before-sleep command.

before-sleep listen to (e)logind's Prepare for sleep event.

Check sudo busctl monitor to see if the events get sent and at what time.

Generally speaking, I recommend not relying on logind for running hooks. If you want something to happen before suspending the machine, just do it where you initiate suspend but before going through with it.