I have used xss-lock with i3lock in the past with success. It makes sure that systemd-logind notifies over dbus when entering hibernation so that xss-lock starts the configured lockscreen.
Before that I had a script which locks manually and then calls systemctl hibernate.
Currently I am on Gnome, but I want to transition back to a more minimalistic DE like niri. Then I have to look on the options again to reliably lock my screen.
I have used
xss-lock
withi3lock
in the past with success. It makes sure that systemd-logind notifies over dbus when entering hibernation so thatxss-lock
starts the configured lockscreen.Before that I had a script which locks manually and then calls
systemctl hibernate
.Currently I am on Gnome, but I want to transition back to a more minimalistic DE like niri. Then I have to look on the options again to reliably lock my screen.