Bug 453663 - Reconfiguring KWin causes black flicker on X11.
Summary: Reconfiguring KWin causes black flicker on X11.
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.24.5
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-11 14:49 UTC by Roke Julian Lockhart Beedell
Modified: 2024-06-07 20:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
nate: Wayland-
nate: X11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2022-05-11 14:49:31 UTC
STEPS TO REPRODUCE
1. Invoke "kcmshell5 kcm_kwinrules".
2. Configure.
3. Apply configuration.

OBSERVED RESULT
The screen presents blackness whilst Plasma is re-drawn.

EXPECTED RESULT
The screen should not flash blackness, because what presents the graphical interface of Plasma should wait until the interface has been replaced before it attemps to present anything.

SOFTWARE/OS VERSIONS
Windows: Negative.
macOS: Negative.
Linux/KDE Plasma: Positive.
KDE Plasma Version: 5.24.5.
KDE Frameworks Version: 5.93.0.
Qt Version: 5.15.3.

ADDITIONAL INFORMATION
I worry that for slow computers, the blackness that I refer to may last some time whilst the screen re-draws. This is problematic because it could cause the user to expect that the modification has erroneously impacted their system, whereas it is merely applying the modification slowly. Remediation of this may be possible if the mouse utilises the loading-symbol before application commences, so that the last frame that remains demonstrates that something is occuring. Windows has remediated this problem by presenting a screen that is similar to what "http://ostechnix.com/wp-content/uploads/2022/05/Installing-Updates.png" depicts, so I believe that re-use of the animation that is presented during authentication by Plasma is probably ideal for KDE.
Comment 1 Nate Graham 2022-05-12 15:30:22 UTC
Can confirm.
Comment 2 Ismael Asensio 2022-05-12 22:10:40 UTC
I suspect this has not to do with rules, but with kwin reconfiguration (which in turn has to be called for the new rules to take effect).

Can you try `qdbus org.kde.KWin /KWin org.kde.KWin.reconfigure` to see if that's the case?

This flickering effect shouldn't happen on Wayland, just on X11, and I cannot think of a way that it could be avoided there (based on the fact that it never were).
Comment 3 Roke Julian Lockhart Beedell 2022-05-12 22:56:06 UTC
"qdbus org.kde.KWin /KWin org.kde.KWin.reconfigure" invokes the blackness.
Comment 4 Nate Graham 2022-05-12 23:38:50 UTC
Can confirm that it doesn't happen on Wayland. On X11, I wonder if we could hide the black flicker by using the new Blend effect. Do you think that would be technically feasible?
Comment 5 Ismael Asensio 2022-05-13 06:31:46 UTC
(In reply to Nate Graham from comment #4)
> Can confirm that it doesn't happen on Wayland. On X11, I wonder if we could
> hide the black flicker by using the new Blend effect. Do you think that
> would be technically feasible?

I'm not sure because as far as I understand reconfigure is kind of a soft reset for kwin, but it's worth investigating.

If it's possible it would be a nice solution.
Senior kwin devs might have a better clue here :)
Comment 6 Zamundaaa 2024-06-07 20:11:35 UTC
This can't really be worked around, turning compositing off and on again is just inherently glitchy with how X11 works