Inhibit Sleep and Locking with xss-lock

I’m trying to figure out how to inhibit sleep and locking. I started using xss-lock as my locker, and it is working out great. Much better than my previous manual locking setup with i3lock. However, it seems that caffeine-ng doesn’t properly inhibit the auto sleep / lock behavior.

After some research, it seems that caffeine-ng communicates with gnome-session-manager, while xss-lock relies on Xserver’s DPMS signaling and systemd-logind.service.

It seems that xset s off turns off screen blanking, and xset -dpms prevents signaling to the monitors telling them to sleep. I haven’t thoroughly tested these yet to see if they work as expected.

The problem is I like my little caffeine systray icon. Is there an alternative to caffeine or a way I can make it work with xss-lock?

Looking at caffeine-ng’s repository, it has this section:

caffeine-ng works with the following screensavers / screenlockers:

  • Anything that implements the org.freedesktop.ScreenSaver API (this includes KDE, amongst others)
  • gnome-screensaver
  • mate-screensaver
  • XSS
  • Xorg + DPMS
  • xautolock
  • xidlehook.

It seems like it should work with xss-lock, but it is not. :frowning:

You didn’t say what DE you are using and if it may be in Wayland mode or X11 mode.

I’m using X11 with Awesome WM

What exactly is the non-proper? Explain the behavior.

What command do you use for screen locking? How does it work?

Have you checked the journal for helpful messages?

is xss-lock works with org.freedesktop.portal.Inhibit you could give Stimulator ( a try. Although it might be a bit heavy being only available for flatpak.

It means it does not inhibit the automatic sleep and locking behavior enacted by xss-lock

xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & is my locker command initiated by .xinitrc. xss-lock is the program that is handling the “automatic” portion of the behavior.

I haven’t found anything useful in the journal. What messages should I be looking for?