swaywm / swayidle

Idle management daemon for Wayland
MIT License
554 stars 50 forks source link

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

Open ivanmlerner opened 2 years ago

ivanmlerner commented 2 years ago

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

kennylevinsen commented 2 years ago

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.