Desktop-wide tearing option for kwin_wayland

This is kinda a duplicate of this, but that one is somewhat different from this, anyway… Would it one day be possible to have some sort of Allow artifacts everywhere (or however else it could be called) toggle in display settings (or wherever else it could be…) that would make the entire desktop tear (not just fullscreen apps/games)?

Yes, this would effectively reverse all the work on ensuring that every frame is perfect (though the tearing protocol for fullscreen does too, to an extent), but this is pretty much the only reason I’m still on Xorg, which barely works for anything else (I mean, it runs, but… . And also the built-in keylogger thing.).

Allegedly it is, or was at one point, possible to patch kwin_wayland to tear all the time, but I wasn’t able to make this work myself… looks like a lot of stuff changed recently (kwin_x11 split probably) so nothing I found online really worked anymore.

As you can probably tell from my inability to figure that out, I can’t really contribute much of anything code-wise here, but would it at least be possible to confirm as to whether or not there’s a genuine limitation here, or if it’s just “imperfect frames not being something we’re going for” again.

Yes, I know that many apps (electron stuff, mostly) are dreadful at input latency and will suck regardless of desktop composition, however there’s still a lot (kitty and others) which don’t and which do feel better to use if your desktop isn’t vsynced, and no this isn’t just games… though this is an extremely niche feature request (most people seem content with Windows which is even worse than X11 compositing which is even worse than most of anything on any Wayland compositor), so I understand why nobody supports this, but…

(currently not on KDE for reasons (but test it specifically for this kind of thing all the time on external installs), font DPI scaling (or the lack thereof) stuff mostly, but will switch back eventually; not counting on this to be implemented because of how specific and niche it is.)

Not sure how insane of a request this is, since Wayland specifically isn’t supposed to tear and there were enough arguments over the tearing stuff that does exist, but could this at least be considered somehow? Yes, as I’ve said already, it’s an extremely niche thing and barely anyone wants tearing on the desktop, but still, would like to hear at least something about this.

I don’t have the hack anymore or knowledge of how I did it. Sorry. I am happy to see someone who shares my sentiment. I will likely never be able to use a Wayland compositor that isn’t Kwin as no desktop environment is as feature-rich as KDE, so I’m hoping sync controls get more attention eventually.

The state of tearing, and latency improvements in general, is still pretty bad. Tearing is still restricted to Vulkan clients running in fullscreen (OpenGL doesn’t work unless it’s running in Zink), doesn’t work with atomic KMS (which Kwin defaults to), only works on newer graphics hardware, and the way the Vsync buffers work is poorly explained and seems to default to double buffering with a triple buffer fallback if frames take too long?

As far as I understand there is nothing architecturally in Wayland that is requiring the compositor to Vsync in any specific way, or at all, besides mainly the aforementioned issues with atomic KMS and the fact that it could be considered off spec?? Wayland is supposed to be more flexible and supportive of compositors that want to do wacky things, I think if there were developer interest we could be in a better position than we are on Xorg in regards to user configurability. Louvre, for instance, has a demo that displays your Vsync status in the system tray and allows you to turn it on and off with a keyboard shortcut.

In my dream KDE there would be a “Sync settings” tab that lets you configure Vsync behavior like a game engine does, like changing the safety margin, the behavior when a frame is dropped (do we tear, stutter, adaptive sync or start increasing the delay?), and when tearing is allowed (fullscreen games, fullscreen applications in general, any application that requests tearing protocol (even windowed), or entire desktop override). I can deal with the way it works right now on my 240hz setup at home, but on 60hz (like I, and most people, use at work and school) every refresh is an eternity and most Vsync buffering strategies add catastrophic amounts of delay. I know my artist friend would also appreciate being able to exempt Krita from Vsync.