Remove the unredirect fullscreen windows functionality
ClosedPublic

Authored by graesslin on Jul 15 2016, 9:17 AM.

Details

Summary

Rational: unredirect fullscreen windows is a weird beast. It's intended
to make fullscreen windows "faster" by not compositing that screen. But
that doesn't really work as KWin jumps out of that condition pretty
quickly. E.g. whenever a tooltip window is shown. KWin itself has a
better functionality by supporting to block compositing completely.
The complete code was full of hacks around it to try to ensure that
things don't break.

Overall unredirect fullscreen has always been the odd one. We had it
because a compositor needs to have it, but it never got truly integrated.
E.g. effects don't interact with it properly so that some things randomly
work, others don't. Will it trigger the screenedge, probably yes, but
will it show the highlight: properly no.

By removing the functionality we finally acknowledge that this mode is
not maintained and has not been maintained for years and that we do not
intend to support it better in future. Over the years we tried to make
it more and more hidden: it's disabled for Intel GPUs, because it used
to crash KWin. It's marked as an "expert" option, etc.

It's clearly something we tried to hide from the user that it exists.

For Wayland the whole unredirect infrastructure doesn't make sense
either. There is no such thing as "unredirecting". We might make use
of passing buffers directly to the underlying stack, but that will be
done automatically when we know it can be done, not by some magic is
this a window of specific size.

Test Plan

Compiles, cannot really test as I am an Intel user who never
had that working.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 5200.Jul 15 2016, 9:17 AM
graesslin retitled this revision from to Remove the unredirect fullscreen windows functionality.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma, VDG.
Restricted Application added a project: KWin. · View Herald TranscriptJul 15 2016, 9:17 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript

Could you please specify where exactly you'd like VDG input? It looks like a very technical change to us.

Could you please specify where exactly you'd like VDG input? It looks like a very technical change to us.

Let's say it like that: it's a change which could create backslash on social media.

Could you please specify where exactly you'd like VDG input? It looks like a very technical change to us.

Let's say it like that: it's a change which could create backslash on social media.

Well the only situation that I can think of where it is relevant is gaming - right? Perhaps watching videos might make sense but I dont really grasp when and how.

For most games there are no notifications from the desktop visible (that would be awful btw). Now the only game I play is CS:GO which is launched as full screen per default. In game you will never swap windows and never run risks of minimizing the full screen game, only when you ctrl-tab in CS and get to an overlay of the game with settings will you even have a mousecursor in game - if you then move to another monitor (which is the only scenario where using that mouse cursor causes the game to minimize since otherwise you alttab out and then its automatically minimized) and click another window the full screen game on the other monitor will minimize - which is really really not good in that game btw.

So the question is:

  1. Can we (Kwin) see when the app starts its own mouse cursor? I mean something spots it since otherwise I would hit hotcorners and swap monitors in game and not only when ctrl-tabbing to a cursor.
  2. Can we, when alt-tabbing to another window, make the fullscreen game turn into a windowed game and when alt-tabbing back turn it into fullscreen again?

Since if #1 is a "yes" then all we have to do is turn off hotcorners and edge effects etc when in game, and when the player ctrl-tabs to a mouse-cursor in game allow him or her to go outside of the screen (but still keep edges and hotcorners off) and not minimize the fullscreen window on the original monitor.
If #2 is a "yes" then we can instead of minimizing the fullscreen window turn it into a windowed version and back when it gets focus.

As for performance by turning off compositing - there is A LOT of magical thinking in games like CS:GO, small preferences that have very little real effect on the quality gets given these magical properties (check out "cs:go stretch window mode low res" as an example). If we can someone make turning of compositing to be something real - like "when you set compositing off at full screen there will be NO compositing until that full screen is turned off" and just enforce that on all monitors (because if you play a game and care about the compositing having a drain on FPS you dont give a shit if the other windows have shadows, as long as they are not glitched out and easy to interact with animations on them are meaningless).

Social, this is easy. If we can set up something that we can SHOW have a good effect on FPS what we introduce will be a feature. The issue is that currently no one understand what goes on when you turn compositing off - we just do it because you read somewhere that that is good for FPS. Now if we go "old compositing off thing didnt work AND we think that most people that need this play games like FPS games and RTS games so we made this thing which will ensure that every resource is poured into that window and nothing else" that will be a total win and nothing else.

Also - Martin, if you want I can try to screencast me playing and showing what happens on the multimonitor thing? If that helps I mean, not for your amusement. :)

Could you please specify where exactly you'd like VDG input? It looks like a very technical change to us.

Let's say it like that: it's a change which could create backslash on social media.

Well the only situation that I can think of where it is relevant is gaming - right? Perhaps watching videos might make sense but I dont really grasp when and how.

yes to both

So the question is:

  1. Can we (Kwin) see when the app starts its own mouse cursor? I mean something spots it since otherwise I would hit hotcorners and swap monitors in game and not only when ctrl-tabbing to a cursor.

No. The reason why the edge doesn't work any more is probably that either the game tries to raise it windows harder to that top than KWin - or (more likely) grabs the mouse pointer.

  1. Can we, when alt-tabbing to another window, make the fullscreen game turn into a windowed game and when alt-tabbing back turn it into fullscreen again?

no, well yes in theory, but in practice that would break the games.

As for performance by turning off compositing - there is A LOT of magical thinking in games like CS:GO, small preferences that have very little real effect on the quality gets given these magical properties (check out "cs:go stretch window mode low res" as an example). If we can someone make turning of compositing to be something real - like "when you set compositing off at full screen there will be NO compositing until that full screen is turned off" and just enforce that on all monitors (because if you play a game and care about the compositing having a drain on FPS you dont give a shit if the other windows have shadows, as long as they are not glitched out and easy to interact with animations on them are meaningless).

There are two things:

  1. a flag many games support to block compositing and KWin turns it off
  2. a window specific rule to do exactly that

No magic from our side needed, that's all specified.

Social, this is easy. If we can set up something that we can SHOW have a good effect on FPS what we introduce will be a feature.

We already have, see above :-)

To add a little bit: this change does neither aim at improving the situation for gamers nor does it try to make the situation worse. The complete option is - in the case of KWin - pointless as we have better ways to save resources. The social aspect is only because people believe the option brings something and they believe we hate gamers if we remove it. That the option didn't work in most cases doesn't mean anything.

There are two things:

  1. a flag many games support to block compositing and KWin turns it off
  2. a window specific rule to do exactly that

    No magic from our side needed, that's all specified.

Social, this is easy. If we can set up something that we can SHOW have a good effect on FPS what we introduce will be a feature.

We already have, see above :-)

Well in that case, all we have to do is publicly say "The option 'Suspend compositor for fullscreen windows' did not really work reliably, and since we'd rather have no feature than a broken feature, we've removed it.
If a fullscreen application you use does not disable compositing itself (like many games do, for example) and suffers performance loss due to compositing, you can set an application-specific KWin rule to block compositing for it, by doing this: [instructions for setting a rule]. This will work more reliably than the aforementioned option ever could." and we're all set!
People do not hate us for removing a feature as long as we explain them how to get the same functionality, even less so if the alternative actually works better.

remove the feature, leave the checkbox.
remove the checkbox one or two versions later.
somebody complaints *then*, offer a reality check...

not very nice, but probably effective.

allowing vsync on xrender compositing would btw. be a ("the") usecase here.

This revision was automatically updated to reflect the committed changes.
kkong added a subscriber: kkong.May 20 2020, 5:31 PM