Wayland does not support screen savers: it does not have any provision that allows screen savers to even exist in any meaningful way. If you value screen savers, that’s kind of a problem.

Adding screen savers to Wayland is not simply a matter of “port the XScreenSaver daemon”, because under the Wayland model, screen blanking and locking should not be a third-party user-space app; much of the logic must be embedded into the display manager itself. This is a good thing! It is a better model than what we have under X11.

But that means that accomplishing that task means not just writing code, but engaging with whatever passes for a standards body or design committee in the Wayland world, and that is… how shall I put this… not something that I personally feel highly motivated to do.

  • There’s already a wayland protocols extension in “testing”, called ext-session-lock-v1 [1]. Sway, river and other wlroots compositors already support it.

    The ext-session-lock-v1 protocol is significantly more robust than previous client-side Wayland screen locking approaches. Importantly, the screenlocker crashing does not cause the session to be unlocked. [2]

    [1] https://wayland.app/protocols/ext-session-lock-v1

    [2] https://github.com/ifreund/waylock

  •  spauldo   ( @spauldo@lemmy.ml ) 
    link
    fedilink
    English
    121 year ago

    Other than rumors that HiDPI stuff works better on Wayland (which only affects me on my laptop since I was stupid enough to buy a 4k one), I’ve seen no real reason to switch away from X. It’s always just worked for me, and has since the 90s.

    Maybe I’ll reevaluate again in another decade. Perhaps Wayland will be finished by then.

      • “Screensaver” isn’t a feature of X - it’s functionality provided by XScreenSaver which uses X mechanisms to detect user inactivity, lock the screen and display an animation.
        Equivalent mechanisms exist in Wayland, but XScreenSaver doesn’t have logic to interact with them. This can be solved by either teaching XScreenSaver how to talk to these new mechanisms (difficult as it was developed for X from the ground up) or implementing something new.
      • Network transparency already exists (and has for some time) in the form of waypipe.
      • xset isn’t a feature of X - it’s a utility to control it. Since Wayland compositors aren’t X, it makes sense for them to be controlled differently.
    •  lea   ( @lea@feddit.de ) 
      link
      fedilink
      7
      edit-2
      1 year ago

      Last I checked you couldn’t even control dpms monitor standby with xset and there was no equivalent.

      xset is xorg. The equivalent depends on your compositor, e.g. kscreen-doctor --dpms off for KDE Plasma and swaymsg "output * dpms off" for Sway.

  • Right so just installed xscreensaver - automatic blanking and locking is indeed broken BUT it does display all the pretty animations just fine! (at least on Sway)
    Don’t really have time to mess around with it but maybe try figuring out which mechanism is used for screen locking in your environment (in Sway’s case it’s swayidle) and get it to start xscreensaver right before calling the real locker program?
    BTW you can get xscreensaver-settings to come up by unsetting the WAYLAND_DISPLAY variable:

    env --unset=WAYLAND_DISPLAY xscreensaver-settings
    

    Philosophical BS: I don’t think it’s correct to say that Wayland doesn’t support screen savers, but rather that it doesn’t support XScreenSaver, or, more accurately, the mechanisms it uses for screen locking and idle-detection.
    As others have pointed out, equivalent functionality has already been implemented and is used by various screen lockers. What appears to be missing is something to take this functionality, and display an animation instead of just locking the screen.
    I noticed that all of XScreenSaver’s animations are actually separate binaries in /usr/lib/screensaver/ so we basically need a locker that speaks Wayland’s locking protocol, but also takes and runs those binaries in full screen mode.
    Or maybe XScreenSaver’s dev can be convinced to add support once the protocols are stable?