https://bugs.kde.org/show_bug.cgi?id=520804

            Bug ID: 520804
           Summary: kwin_wayland SIGSEGV in GL shader/EGL/GBM path causes
                    Wayland session/app disconnects on hybrid AMD + NVIDIA
                    Bazzite system
    Classification: Plasma
           Product: kwin
      Version First 6.6.4
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: scene-opengl
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Summary:
kwin_wayland SIGSEGV in GL shader/EGL/GBM path causes Wayland session/app
disconnects on hybrid AMD + NVIDIA Bazzite system

Product:
kwin

Component:
wayland-generic or scene-opengl/compositing if available; otherwise general

Version:
6.6.4

Platform:
Fedora/Bazzite Linux x86_64

Severity:
crash

Description:
On 2026-05-29 at 13:40:20 PDT, the KDE Wayland session abruptly went black and
most/all graphical applications exited. The system did not reboot; uptime
remained from 2026-05-27 18:31 PDT.

The logs show kwin_wayland crashed with SIGSEGV, after which many clients
reported that the Wayland compositor connection had broken.

This has happened at least twice on this machine:
- Wed 2026-05-27 15:13:25 PDT: kwin_wayland SIGSEGV
- Fri 2026-05-29 13:40:20 PDT: kwin_wayland SIGSEGV

I do not have exact reproduction steps yet. At the time of the May 29 crash,
this was a normal desktop session with multiple apps open. The visible symptom
was all screens going black and apps closing.

Observed result:
KWin/Wayland compositor crashed. Wayland clients lost the display connection
and many apps exited.

Expected result:
KWin should not crash; if rendering/GPU state changes fail, the desktop session
should remain alive or recover without killing client apps.

Relevant crash excerpt:
```
PID: 6071 (kwin_wayland)
Signal: 11 (SEGV)
Timestamp: Fri 2026-05-29 13:40:20 PDT
Command Line: /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0
--xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority
/run/user/1000/xauth_REDACTED --xwayland
Storage:
/var/lib/systemd/coredump/core.kwin_wayland.1000.[REDACTED_BOOT_ID].6071.1780087220000000.zst
(inaccessible)

Stack trace of thread 6071:
#0  0x0000000000000000 n/a (n/a + 0x0)
#1  0x00007fb3f510b50e can_skip_compile (libgallium-26.0.4.so + 0x45250e)
#2  0x00007fb3f510e53c _mesa_glsl_compile_shader (libgallium-26.0.4.so +
0x45553c)
#3  0x00007fb3f503504a _mesa_compile_shader (libgallium-26.0.4.so + 0x37c04a)
#4  0x00007fb41597b208 KWin::GLShader::compile(...) (libkwin.so.6 + 0x1b9208)
#5  0x00007fb41597b527 KWin::GLShader::load(...) (libkwin.so.6 + 0x1b9527)
#6  0x00007fb41598285d KWin::ShaderManager::generateCustomShader(...)
(libkwin.so.6 + 0x1c085d)
#7  0x00007fb4159828f6 KWin::ShaderManager::generateShader(...) (libkwin.so.6 +
0x1c08f6)
#8  0x00007fb41598318b KWin::ShaderManager::shader(...) (libkwin.so.6 +
0x1c118b)
#9  0x00007fb415964373 KWin::EglContext::checkSupported() const (libkwin.so.6 +
0x1a2373)
#10 0x00007fb41595e700 KWin::EglContext::create(...) (libkwin.so.6 + 0x19c700)
#11 0x00007fb415b494a5 KWin::EglGbmBackend::contextForGpu(...) (libkwin.so.6 +
0x3874a5)
#12 0x00007fb415b507d0 KWin::EglGbmLayerSurface::createSurface(...) const
(libkwin.so.6 + 0x38e7d0)
#13 0x00007fb415b5101b KWin::EglGbmLayerSurface::createSurface(...) lambda
(libkwin.so.6 + 0x38f01b)
#14 0x00007fb415b51195 KWin::EglGbmLayerSurface::createSurface(...) const
(libkwin.so.6 + 0x38f195)
#15 0x00007fb415b51c23 KWin::EglGbmLayerSurface::checkSurface(...)
(libkwin.so.6 + 0x38fc23)
#16 0x00007fb415b51fad KWin::EglGbmLayer::preparePresentationTest()
(libkwin.so.6 + 0x38ffad)
#17 0x00007fb41583420f KWin::Compositor::composite(...) (libkwin.so.6 +
0x7220f)
#18 0x00007fb412c2a51a doActivate(...) (libQt6Core.so.6 + 0x16951a)
#19 0x00007fb41586218a KWin::RenderLoop::frameRequested(...) (libkwin.so.6 +
0xa018a)
```

Representative client fallout immediately after crash:
```
kwin_wayland[6071]: segfault at 0 ip 0000000000000000 sp 00007ffc9969b0b8 error
14
dolphin: The Wayland connection broke. Did the Wayland compositor die?
plasmashell: The Wayland connection broke. Did the Wayland compositor die?
ptyxis: Lost connection to Wayland compositor.
signal-desktop: Error reading events from display: Broken pipe
kwin_wayland_wrapper: (EE) failed to read Wayland events: Broken pipe
```

NVIDIA kernel messages shortly after new KWin instance started:
```
NVRM: VM: invalid mmap context
```
This repeated many times at 13:40:24 PDT. I do not see OOM-kill logs around the
crash window.

System information:
```
Bazzite image: ghcr.io/ublue-os/bazzite-dx-nvidia
Bazzite version: 43.20260420
Image digest:
sha256:a76a5bcf34907b62c30598c6d6799f1948bd2226ffcd689ce085ceeb2bdc162c
Kernel: Linux HOST 6.17.7-ba29.fc43.x86_64
kwin: kwin-6.6.4-2.fc43.x86_64
plasma-workspace: plasma-workspace-6.6.4-1.fc43.x86_64
qt6-qtbase: qt6-qtbase-6.10.3-1.fc43.x86_64
nvidia-driver: nvidia-driver-595.58.03-1.fc43.x86_64
NVIDIA kernel module version: 595.58.03

GPU hardware:
01:00.0 NVIDIA Corporation AD104M [GeForce RTX 4080 Max-Q / Mobile]
[10de:27a0], driver: nvidia
09:00.0 AMD/ATI Raphael [1002:164e], driver: amdgpu

nvidia-smi:
NVIDIA GeForce RTX 4080 Laptop GPU, driver 595.58.03
```

Attachments available:
- coredumpctl-kwin-6071.txt
- journal-kwin-crash-window.txt
- system-info.txt
- gdb-backtrace-kwin-6071-root.txt

Note on backtrace quality:
Full `sudo coredumpctl debug 6071` output is attached as
`gdb-backtrace-kwin-6071-root.txt`. The core was present on disk and GDB
produced a 1,576-line `thread apply all bt full` plus `info registers` output.
The crashing thread includes:
```
Thread 1 (Thread 0x7fb40b98dcc0 (LWP 6071)):
#0  0x0000000000000000 in ??? ()
#1  0x00007fb41257c290 in <signal handler called> () at /lib64/libc.so.6
#2  0x00007fb3f5226f10 in disk_cache_has_key () at /lib64/libgallium-26.0.4.so
#3  0x00007fb3f510b50e in can_skip_compile () at /lib64/libgallium-26.0.4.so
#4  0x00007fb3f510e53c in _mesa_glsl_compile_shader () at
/lib64/libgallium-26.0.4.so
#5  0x00007fb3f503504a in _mesa_compile_shader () at
/lib64/libgallium-26.0.4.so
#6  0x00007fb41597b208 in KWin::GLShader::compile(unsigned int, unsigned int,
QByteArray const&) const () at /lib64/libkwin.so.6
#7  0x00007fb41597b527 in KWin::GLShader::load(QByteArray const&, QByteArray
const&) () at /lib64/libkwin.so.6
#8  0x00007fb41598285d in
KWin::ShaderManager::generateCustomShader(QFlags<KWin::ShaderTrait>, QByteArray
const&, QByteArray const&) () at /lib64/libkwin.so.6
#9  0x00007fb4159828f6 in
KWin::ShaderManager::generateShader(QFlags<KWin::ShaderTrait>) () at
/lib64/libkwin.so.6
#10 0x00007fb41598318b in
KWin::ShaderManager::shader(QFlags<KWin::ShaderTrait>) () at
/lib64/libkwin.so.6
#11 0x00007fb415964373 in KWin::EglContext::checkSupported() const () at
/lib64/libkwin.so.6
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to