Bug 514828 - Black screen after switching windows
Summary: Black screen after switching windows
Status: ASSIGNED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: 6.5.5
Platform: Arch Linux Linux
: VHI grave
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks: 506893
  Show dependency treegraph
 
Reported: 2026-01-19 12:55 UTC by Argy M
Modified: 2026-01-21 21:44 UTC (History)
3 users (show)

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


Attachments
kwin log via journalctl while reproducing the bug (98.61 KB, text/plain)
2026-01-19 12:55 UTC, Argy M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Argy M 2026-01-19 12:55:26 UTC
Created attachment 188684 [details]
kwin log via journalctl while reproducing the bug

SUMMARY
When switching between windows (Alt + Tab), sometimes I get a black screen, and cannot recover from it except by killing kwin_wayland. This happens seemingly at random, and can easily be reproduced (on my system) by repeatedly pressing Alt + Tab for anywhere between 5 and 30 seconds - but also happens during regular usage. It seems to happen between any two windows (including native KDE apps), and also happens even if the windows are not overlapping or touching at all.

STEPS TO REPRODUCE
1. Open any two application windows
2. Repeatedly press Alt + Tab, for anywhere between 5 and 30 seconds.

OBSERVED RESULT
Black screen

EXPECTED RESULT
One should be able to continue switching between windows indefinitely.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Kernel: 6.18.5-arch1-1
NVIDIA driver version: 580.126.09
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.2.2
Qt Version: 6.10.1

ADDITIONAL INFORMATION
I have not been able to reproduce this under X11.
I am attaching a kwin log, abridged for readability - the observed error messages flood the logs until kwin is killed.
I have tried to also produce a gdb trace but I can't seem to get debug symbols to work - I'm not sure if it would be useful as it's not a crash per se, let me know and I can try again again if necessary.
Comment 1 Zamundaaa 2026-01-19 14:31:09 UTC
> Jan 19 10:43:49 kelpie kwin_wayland[979]: QRhiGles2: Context is lost.
> Jan 19 10:43:49 kelpie kwin_wayland[979]: Failed to create RHI (backend 2)
> Jan 19 10:43:49 kelpie kwin_wayland[979]: Could not make egl context current! EGL_BAD_CONTEXT
That looks like the QPA context reset somehow deletes the normal EGL context. I can't think of a reason for why that would happen though, except maybe a bug in Qt.

Maybe KWin should consider being unable to make its context current the same as a GPU reset and rebuild everything from scratch. There's a good chance that would at least work around your problem.
Comment 2 Bug Janitor Service 2026-01-21 16:43:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8686