Problem
KWin Wayland repeatedly generates GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT and GL_INVALID_ENUM errors. This causes:
Micro-freezes — screen freezes for seconds, then recovers with "Desktop effects were restarted due to a graphics reset"
Full session crashes — errors accumulate and KWin crashes, forcing session restart/reboot
Worse after suspend — resuming from long suspend (hours/days) triggers massive error bursts and almost always crashes
Journal logs (typical burst)
kwin_wayland: 0x500: GL_INVALID_ENUM error generated. Invalid <face>.
kwin_wayland: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"
kwin_wayland: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
kwin_wayland: Invalid framebuffer status: "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
kwin_wayland: Failed to create framebuffer: Invalid argument
These repeat in rapid bursts (dozens per second during an episode).
Key finding
When setting KWIN_DRM_DEVICES=/dev/dri/card0 (AMD only), all framebuffer errors disappear completely. However, this breaks HDMI output because the HDMI port is routed to the NVIDIA GPU (card1).
This confirms the issue is specifically KWin rendering via NVIDIA GPU in Wayland.
What I've tried (nothing resolved the issue while keeping HDMI working)
KWin configuration (~/.config/kwinrc)
GLCore=true — did not resolve
Compositing Enabled=false — broke display (black screen on laptop panel)
Disabling blur, contrast, slide, diminactive effects — did not resolve
AnimationDurationFactor=0 — did not resolve