What triggers the crash?
In KDE Neon’s experimental Wayland session the most common culprits are:
- Legacy NVIDIA driver families – 470.xx and 525.xx – which contain a known out‑of‑bounds write in the DMABUF feedback path that KWin’s compositor hits during a Wayland frame.
- Kernel 5.15+ when the driver is compiled with DMABUF feedback enabled. The interaction with KWin’s triple‑buffering (KWIN_TRIPLE_BUFFER=1) can trigger the segfault.
Confirmed work‑arounds
These steps are not officially supported but have been observed to reduce crash frequency in a repeatable Neon build:
- Upgrade the driver to the latest 535.xx series. The NVIDIA team back‑ported the DMABUF patch that fixes the out‑of‑bounds write.
sudo apt update
sudo apt install nvidia-driver-535
sudo reboot
- Disable triple buffering for Wayland. Edit
/etc/environment or add a session‑specific override:
export KWIN_TRIPLE_BUFFER=0
Then start a fresh Wayland session.
- Drop DMABUF feedback for the driver. If you cannot upgrade, add a Xorg config snippet to disable DMABUF feedback:
Section "Device"
Identifier "NVIDIA"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration" "true"
Option "RegistryDwords" "NvOptimusEnablement=0x00000000;PowerMizerEnablement=0x00000000"
EndSection
- Enable Wayland‑specific debug logging. Launch plasmashell with:
QT_LOGGING_RULES=qt.qpa.wayland=true plasmashell
Then inspect journalctl -u plasmashell for warnings that precede a crash.
- Collect a backtrace. After a segfault, run:
journalctl -u plasmashell | tail -n 200
or use the KDE crash handler to export the crash file for analysis.
Impact on automated GUI tests
Wayland’s non‑deterministic frame timing and the lack of a global X server mean tools that emulate mouse/keyboard events (xdotool, Sikuli) become unreliable. Tests that rely on xdotool will miss events or fail intermittently. Using wdm or kwin_wayland‑specific libraries, or running tests inside an Xwayland sandbox, restores determinism but adds overhead.
When to switch back to X11
If the above mitigations do not eliminate crashes or if your test matrix requires 100% deterministic event delivery, the safest path is to run the X11 ISO session. The X11 session is stable with NVIDIA drivers and fully compatible with existing automation tools.
Next diagnostic step
To fine‑tune the recommendation, could you confirm the exact NVIDIA driver version you are currently using? This will help determine if the 535.xx upgrade is already in place or if a driver downgrade might be necessary.