Bug 499533 - Frequently toggling fullscreen causing window flickering
Summary: Frequently toggling fullscreen causing window flickering
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 6.2.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-05 04:20 UTC by Li Jiajun
Modified: 2025-02-08 15:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
OBSERVED RESULT: flickering when toggling full-screen (3.78 MB, image/gif)
2025-02-05 04:20 UTC, Li Jiajun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Li Jiajun 2025-02-05 04:20:12 UTC
Created attachment 177981 [details]
OBSERVED RESULT: flickering when toggling full-screen

SUMMARY
If I continuously press full-screen toggling shortcut, frequently switch between full-screen modes, occasionally the underlying window is revealed, causing flickering.
Regarding the use case, there isn’t any particular scenario that demands rapid switching full-screen. So not a big deal anyway. Just Kwin would be better without the flickering. 

STEPS TO REPRODUCE
For firefox:
    1. Open Firefox
    2. Toggle fullscreen mode frequently (For firefox it’s long-press F11)
For other app (like mpv or konsole):
    1. Bind fullscreen shortcut key to whatever U like.
    2. Rapidly tap the full screen key (long-pressing seems works too).

OBSERVED RESULT
There will be split-second of exposing the window underneath the current one, causing flickering.
See upload gif:OBSERVED_RESULT.gif

EXPECTED RESULT
Getting window always showup and follow right z-index when switching full-screen mode.
For comparison, There is a Win11 24h2 one. Win11 not behave the best, there also some drawback on compositor.
See upload gif:EXPECTED_RESULT.gif

SOFTWARE/OS VERSIONS
Windows: Not affected
macOS: Not affected
Linux/KDE Plasma: Manjaro KDE Plasma 6.2.5 Wayland and X11
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.13.0-1-MANJARO (AMD64)

ADDITIONAL INFORMATION
    Initial conversation: https://discuss.kde.org/t/frequently-toggling-fullscreen-causing-window-flickering/29153
    Can reproduced on both:
        AMD 7840HS Laptop
        AMD Ryzen 3700x, Radeon Vega56 platform
    More system information, See upload txt: inxi.txt
Comment 1 Nate Graham 2025-02-08 15:28:04 UTC
This is an upstream AMD graphics driver issue; possibly https://gitlab.freedesktop.org/drm/amd/-/issues/3602 or a similar one. I experience it myself on a laptop with a AMD Radeon 780M GPU and a 120hz screen.