logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

xscreensaver-systemd - lock the screen upon suspend, and inhibit screen-blanking during video playback.

Author

       Martin Lucina <martin@lucina.net>, 4-Jun-2019

X Version 11                                   6.08 (10-Oct-2023)                                XScreenSaver(1)

Bugs

       Blanking-related  problems  take  two  forms:  failing to connect to D-Bus; and other programs requesting
       stupid things.

   D-BUS
       Only one program at a time can register with systemd(1) or elogind(8) for screen-saver-related events, so
       if another screen saver is running as a part of the desktop  environment,  xscreensaver-systemd  will  be
       unable  to  launch.  This program has workarounds for Gnome and KDE, but if you are using something else,
       that might be a problem.

   CHROME&CHROMIUM(101.0)* Playing only audio in Chrome will prevent your screen from  blanking.   Chrome  sends  the  exact  same
         "inhibit" reason for audio as for video, so we can't tell them apart.

       * Chrome  prevents  your  screen  from blanking when playing short, looping videos.  This means that your
         screen won't blank when Chrome is showing a Twitter page (because those  animated  GIFs  aren't  really
         GIFs, they are MP4s).  This affects Tweetdeck as well.

         The  proper  way  to fix this would be for Chrome to stop inhibiting once a video loops.  That way your
         multi-hour movie inhibits properly, but your looping GIF only inhibits for the first few seconds.

       Firefox does not have either of these problems.

   MPLAYER(2:1.4)
       Makes no attempt to inhibit the screen saver.  Use VLC instead.

   MPV(0.33)
       Makes no attempt to inhibit the screen saver.  Use VLC instead.

   VARIOUS
       Most programs fail to re-enable screen blanking if they crash or are killed while  playing.   We  try  to
       detect  when this has happened, but that might not work with all versions of systemd, resulting in screen
       blanking remaining permanently disabled.  If that happens, killing and restarting xscreensaver-systemd is
       a workaround.

Description

       The  xscreensaver-systemd  program  is  a  helper  daemon  launched  by xscreensaver(1) for systemd(1) or
       elogind(8) integration.  It does two things:

       * When the system is about to go to sleep (e.g., the laptop lid has just been closed) it locks the screen
         just before the system sleeps, by running xscreensaver-command--suspend.  When  the  system  wakes  up
         again, it runs xscreensaver-command--deactivate to make the unlock dialog appear immediately.  It does
         this through the org.freedesktop.login1(5) D-Bus interface.

       * When  another  process asks for the screen saver to be inhibited (e.g. because a video is playing) this
         program periodically runs xscreensaver-command--deactivate to keep the display  un-blanked.   It  does
         this   until  that  other  program  asks  for  it  to  stop,  or  exits.   It  does  this  through  the
         org.freedesktop.ScreenSaver(5),                     org.gnome.SessionManager(5)                     and
         org.kde.Solid.PowerManagement.PolicyAgent(5) D-Bus interfaces.

Name

       xscreensaver-systemd - lock the screen upon suspend, and inhibit screen-blanking during video playback.

See Also

X(1),  xscreensaver(1),   xscreensaver-settings(1),   xscreensaver-command(1),   systemd(1),   sd-bus(3),
       elogind(8)

Synopsis

xscreensaver-systemd[--verbose][--version]

See Also