Created attachment 168736 [details] The output of "qdbus org.kde.KWin /KWin org.kde.KWin.supportInformation" SUMMARY When window decorations are disabled, a window's expanded geometry can be 0 for a very short period of time after being opened. Frame geometry seems to always have a correct value. When an offscreen effect is active, KWin attempts to allocate a 0 by 0 texture in OffscreenData::maybeRender, which fails, but KWin uses that texture anyways. This results in the entire screen turning black with the following messages being logged in the journal: kwi 21 10:35:49 thinkpad kwin_wayland[1628]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11 kwi 21 10:35:49 thinkpad kwin_wayland[1628]: kwin_scene_opengl: 0x2: GL_INVALID_VALUE in glTexStorage2D(width, height or depth < 1) kwi 21 10:35:49 thinkpad kwin_wayland[1628]: kwin_scene_opengl: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" kwi 21 10:35:49 thinkpad kwin_wayland[1628]: kwin_scene_opengl: Can't enable invalid framebuffer object! This issue only occurs on Wayland. I found two programs it can reliably reproduced with: - Cryptomator (1.12.4) - GIMP (2.10.36) It doesn't seem to occur with Qt or other GTK applications. STEPS TO REPRODUCE 1. Create a window rule that disables the titlebar and frame 2. Enable an offscreen effect, such as colorblindness correction 3. Open GIMP (sometimes this alone can cause the bug) 4. Repeatedly open and close a dialog by pressing CTRL+N and ESC. If the issue does not occur after a few attempts, restart GIMP and try again. OBSERVED RESULT The entire screen turns black and flickers until repainted. EXPECTED RESULT The screen shouldn't turn black. SOFTWARE/OS VERSIONS Linux: NixOS 24.05, Linux 6.8.7 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 ADDITIONAL INFORMATION I've attached videos of the issue occurring with GIMP and Cryptomator along with the output of "qdbus org.kde.KWin /KWin org.kde.KWin.supportInformation".
Created attachment 168737 [details] A video of the issue occurring when opening Cryptomator
Created attachment 168738 [details] A video of the issue occurring when using GIMP
I can confirm this issue. I experience this while exiting native Wayland OpenGL games. Operating System: Arch Linux KDE Plasma Version: 6.1.0 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.9.6-2-cachyos (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz Memory: 15.6 ГиБ of RAM Graphics Processor: AMD Radeon RX 6700 XT июн 24 23:42:51 oleg-pc kwin_wayland[47517]: <Unknown File>:97: TypeError: Cannot read property 'translucencyWindowTypeAnimation' of undefined июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_VALUE in glTexStorage2D(width, height or depth < 1) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_VALUE in glTexStorage2D(width, height or depth < 1) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_FRAMEBUFFER_OPERATION in glClear(incomplete framebuffer) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_FRAMEBUFFER_OPERATION in glDrawArrays июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) июн 24 23:43:07 oleg-pc kwin_wayland[47517]: kwin_scene_opengl: 0x2: GL_INVALID_FRAMEBUFFER_OPERATION in glDrawArrays
Created attachment 171178 [details] Same problem when exitting games
Issue is still relevant Operating System: Arch Linux KDE Plasma Version: 6.2.4 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.0 Kernel Version: 6.12.1-2-cachyos (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz Memory: 15.6 ГиБ of RAM Graphics Processor: AMD Radeon RX 6700 XT
Still happens Operating System: Arch Linux KDE Plasma Version: 6.3.0 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2 Kernel Version: 6.13.2-2-cachyos (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 9800X3D 8-Core Processor Memory: 62.5 ГиБ of RAM Graphics Processor: AMD Radeon RX 6700 XT Manufacturer: ASUS
For me, this mostly happens with SDL applications using Wayland backend (games, scrcpy) when they shutdown.
As of kwin 6.3.2 and SDL 3.2.6 I can no longer experience this. Marcin, can you confirm?
Nevermind, it's still happening
i just got this as well i had the built in Slide animation enabled which apparently doesn't check for .expandedGeometry().isValid()
sorry, it's the "Glide" effect
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7589
I can confirm MR 7589 fixes the issue!
(In reply to Oleg from comment #3) > I can confirm this issue. I experience this while exiting native Wayland > OpenGL games. Can you run the game with WAYLAND_DEBUG=1 please, and attach the output of that here? While the MR fixes the effect (and is valid on its own), there shouldn't be any (Wayland) windows that have a visible size of zero. It would be good if we can figure out the underlying issue of that too.
Created attachment 180964 [details] Quake3e with WAYLAND_DEBUG (In reply to Zamundaaa from comment #14) > Can you run the game with WAYLAND_DEBUG=1 please, and attach the output of > that here? > While the MR fixes the effect (and is valid on its own), there shouldn't be > any (Wayland) windows that have a visible size of zero. It would be good if > we can figure out the underlying issue of that too. Yes, here
Git commit 91c2389a78fdd56b69537092bc5ddac2e11ad03c by Xaver Hugl. Committed on 06/05/2025 at 10:18. Pushed by zamundaaa into branch 'master'. effect/offscreeneffect: guard against allocating zero-size textures This also fixes a potential crash during a GPU reset (when allocating the texture fails) M +8 -0 src/effect/offscreeneffect.cpp https://invent.kde.org/plasma/kwin/-/commit/91c2389a78fdd56b69537092bc5ddac2e11ad03c
(In reply to Oleg from comment #15) > Created attachment 180964 [details] > Quake3e with WAYLAND_DEBUG > > (In reply to Zamundaaa from comment #14) > > Can you run the game with WAYLAND_DEBUG=1 please, and attach the output of > > that here? > > While the MR fixes the effect (and is valid on its own), there shouldn't be > > any (Wayland) windows that have a visible size of zero. It would be good if > > we can figure out the underlying issue of that too. > > Yes, here Thanks!
Git commit 7da2894b2e431461c78d124a03480b189457d048 by Xaver Hugl. Committed on 06/05/2025 at 11:12. Pushed by zamundaaa into branch 'Plasma/6.3'. effect/offscreeneffect: guard against allocating zero-size textures This also fixes a potential crash during a GPU reset (when allocating the texture fails) (cherry picked from commit 91c2389a78fdd56b69537092bc5ddac2e11ad03c) Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com> M +8 -0 src/effect/offscreeneffect.cpp https://invent.kde.org/plasma/kwin/-/commit/7da2894b2e431461c78d124a03480b189457d048
can someone check if chromium windows still have a size of 0x0 with the new code?
That commit doesn't change the visible size of effect windows, it just removes the problematic consequences of it.
oh yeah i was wondering if the MR would address this too > there shouldn't be any (Wayland) windows that have a visible size of zero. ..but couldn't see it. i'll test this when i am back at my machine too. plasma's default glide effect + closing any chromium browser used to result in crazy black flickering
Although it was fixed for most apps like SDL based I can still experience this on Plasma 6.3.5 with gamescope Wayland backend <pre> 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_VALUE in glTexStorage2D(invalid width, height or depth) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_VALUE in glTexStorage2D(invalid width, height or depth) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) 14.05.2025 22:11 kwin_wayland kwin_scene_opengl: 0x4: GL_INVALID_OPERATION in glBindFramebuffer(non-gen name) </pre>