Announcement

Collapse
No announcement yet.

KWinFT 5.20 With Aims For Better Wayland/X11 Experience Than KDE Plasma 5.20's KWin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by tildearrow View Post
    They will never bring full-screen unredirection back...
    Can you expand on that? If I think what it is, then fullscreen redirection is immensely helpful when there's need to as minimal input lag as possible (for example in some fast paced games), that means even forcefully disabling v-sync as that brings out most of the lag.
    Where and when have kwin devs mentioned their issues with this?

    Comment


    • #32
      Originally posted by JonnyRobbie View Post

      Can you expand on that? If I think what it is, then fullscreen redirection is immensely helpful when there's need to as minimal input lag as possible (for example in some fast paced games), that means even forcefully disabling v-sync as that brings out most of the lag.
      Where and when have kwin devs mentioned their issues with this?
      Sure.

      The purpose of full-screen unredirection is, indeed, reducing latency by letting a full-screen application bypass the compositor and paint directly to the screen.
      This does not disable VSync. Instead, the application chooses whether to do VSync or not.

      Their issues were mentioned years ago on this blog post:

      Originally posted by mgraesslin
      Removal of unredirect fullscreen windows

      Unredirection of fullscreen windows has been a kind of blue-headed step child in KWin’s compositing infrastructure for a long time. It’s a feature not loved by the developers, not properly integrated, but you have to support it. For those not knowing the feature: it excludes an area from compositing and let’s the fullscreen window be rendered the normal way in X11 (unredirect). The idea is that you get slightly better performance if you bypass the compositor.

      The functionality was never fully integrated into the compositor. It was way too easy to break out of the condition (e.g. a tooltip), but at the same time effects which should break it, had no way to do it (e.g. Present Windows should either not activate or end it). The weirdest oddity of the feature is that we had to hard disable it for all Intel drivers due to crashes. We don’t know whether this is still the case but after having had such a bad experience with it in the past, we decided to never turn it on again. Which means it’s a feature not even supported by all devices.

      We developers did not spent much time on the feature as we think it doesn’t make much sense as KWin has a better infrastructure in place: blocking compositing. Applications are allowed to specify that compositing should be blocked. This results in KWin shutting down the compositor, freeing all resource related to it (e.g. destroying the OpenGL context), so all power to the running game. As the compositor is shutting down, you don’t have weird interactions like tooltips jumping out or effects not working properly.

      There is a standardized way for applications to request this and we see that many games and applications (e.g. Kodi) make use of it. This is the preferred way in our opinion. Given that this mode is fully supported, we decided to remove unredirect fullscreen windows from KWin’s compositor. This streamlines our implementation and gives us one feature to concentrate on and make sure that it works exactly as our users need it. On Wayland the architecture looks different: there is no such thing like unredirect fullscreen, but we can ideally just pass the buffer to the DRM device. The idea is that we do the best optimized way whenever possible.
      In a summary, in Plasma 5.8 they effectively removed the full-screen unredirection feature from KWin, because they considered the feature a "hack" with several "flaws" which also caused issues/crashes on Intel cards, and encouraged people to switch to their specific approach of disabling compositing ("block compositing")

      However, the "block compositing" path has more flaws in my opinion:

      ​​​​​​1. It is more of a hack than full-screen unredirection.
      2. There is a delay when re-enabling compositing (say, if the application quits or you switch windows). It is very visible, and looks ugly. Full-screen unredirection does not have this issue.
      3. You have to add support for this in your applications. Full-screen unredirection does this for you, without having to add any support.
      4. Some applications (mostly ones based on SDL2) misbehave, and disable compositing even when windowed (which can get really annoying).
      5. I actually never had a crash when using full-screen unredirection on my Intel laptop.

      Comment

      Working...
      X