Closed aufkrawall closed 2 years ago
Will be done
Thanks a lot! Really amazing what you achieve for KWin.
Please test b76a58f8e. I have added this feature but need you to confirm this works.
Tested in mpv and works like a charm, no more stutter when I press my keyboard media buttons. Fantastic! :)
Perhaps the rule "force fullscreen unredirection: yes" on the other hand could also force compositing to stay disabled for transparent OSDs like the volume slider?
Perhaps the rule "force fullscreen unredirection: yes" on the other hand could also force compositing to stay disabled for transparent OSDs like the volume slider?
Then OSD items would be invisible (which of course you don't want) because that's not how fullscreen unredirection works. When an application is unredirected, it sort of "takes over" the X server (and the compositor as well), preventing any other client from being overlaid.
Hm, but it works with Compton.
Then you could use the block compositing approach instead, which achieves this. Note that by doing so there will be a delay to re-enabling compositing, since KWin is much more complex than Compton.
But I wonder: Why would you want a volume OSD element to be un-composited if you only see it for a few seconds?
Block compositing unfortunately is very annoying when alt + tabbing, as you manually have to switch it all the time.
The problem of the OSD element composited is that when it disappears, there is a frametime spike of several dozens, if not hundreds of milliseconds, so really nasty stutter. You can test that with vkquake by moving the camera via the arrow keys and then press the raise/lower volume button on your keyboard, if present. Rendering basically stops for a short time, while it remains totally fluid without compositing.
Compton by default also keeps compositing enabled with that overlay when using unredir-if-possible
.
But you can define rules to make it exclude window types for this, e.g.
wintypes: { normal: {redir-ignore=true;} }
(The Plasma overlay window is declared as "normal" window type for whatever reason).
There is a possibility that this needs to be ported to 5.17..
@tildearrow I've ported the patch to 5.18. Currently, full screen videos stutter to the point of becoming unusable on gsync(variable refresh rate) displays with compositing suspended/disabled, adding a window rule fixes this
Works. Thank you.
Does this need to be rewritten for the current version? It would probably make sense to exclude popular applications that don't trigger page flipping (likely ~everything with typical Qt/GTK UIs) by default.
...yup, exactly! It's time to do this...
It would be nice if it was possible to exclude single programs/windows from auto unredirect, e.g. media players for smooth OSD pop ups etc.
With KWin's given feature set, it is already possible to create rules to prevent single applications from turning off the compositor. Perhaps auto-unredirect could simply honor them as well?
That being said: When a window is unredirected and I press the media volume control buttons of my keyboard, the volume OSD triggers the compositing to be temporarily enabled. This allows transparency and an animation, however it also creates stutter when composting turns on and off. Would it be possible to implement an option to keep compositing also entirely turned off in such situations? It supposedly can also cause issues with FreeSync like flickering.