XScreenSaver(1)

πŸ’– XScreenSaver(1) πŸ’–

okay bestie, you opened the manual for xscreensaver-systemd β€” it ships as part of the whole XScreenSaver situation (yep, the XScreenSaver(1) manual, the General Commands Manual energy ✨) β€” and honestly? it's a tiny sidekick daemon with absolute main character energy. let's get into it 🫢


✨ NAME ✨

xscreensaver-systemd β€” lock the screen upon suspend, and inhibit screen-blanking during video playback. that's the whole job description, no cap πŸ’…

🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

xscreensaver-systemd is a helper daemon β€” a little background bestie β€” that xscreensaver(1) launches so everything can vibe with systemd(1) or elogind(8). It does exactly two things, and it does them iconically:

  • When the system is about to go to sleep (say, the laptop lid just got closed like a dramatic exit πŸ’€), it locks the screen right before the system sleeps, by running xscreensaver-command --suspend. Then when the system wakes up again, it runs xscreensaver-command --deactivate so the unlock dialog appears immediately. It pulls all of this off through the org.freedesktop.login1(5) D-Bus interface.
  • When another process asks for the screen saver to be inhibited (classic reason: a video is playing πŸ“Ί), this program periodically runs xscreensaver-command --deactivate to keep the display un-blanked. It keeps doing that until that other program asks it to stop, or just exits. This one goes through the org.freedesktop.ScreenSaver(5), org.gnome.SessionManager(5) and org.kde.Solid.PowerManagement.PolicyAgent(5) D-Bus interfaces.

πŸ’€ BUGS πŸ’€

Blanking-related problems take exactly two forms, bestie: 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 your desktop environment, xscreensaver-systemd will be unable to launch. This program has workarounds for Gnome and KDE, but if you're using something else, that might be a problem. iykyk 😭

πŸ“ 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 it does for video, so we genuinely can't tell them apart. not us getting fooled by a podcast 🎧
  • Chrome prevents your screen from blanking when playing short, looping videos. Which means your screen won't blank when Chrome is showing a Twitter page β€” because those animated GIFs aren't really GIFs, they're 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. Firefox ate and left no crumbs πŸ‘‘

🎬 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. 🫢


πŸ‘€ SEE ALSO πŸ‘€

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

Copyright Β© 2019-2022 by Martin Lucina and Jamie Zawinski. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. (yes bestie, that's the deal, and it's a good deal πŸ’–)

The software is provided "as is" and the author disclaims all warranties with regard to this software including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.

πŸŽ€ AUTHOR πŸŽ€

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


and that's the whole page, bestie β€” no notes, every flag and every warning preserved, periodt ✨ this one's from X Version 11, 6.09 (07-Jun-2024) πŸ’œ go forth and never let your screen blank mid-movie 🌈

πŸ“¦ where this page comes from