You are not logged in.

#1 2025-11-30 10:40:53

gen2arch
Member
Registered: 2013-05-16
Posts: 206

SOLVED: kwin_wayland regression in Multi-GPU Multi-monitor setups

Hi,

since last update I get uninterrupted errors in journal, every GUI action (e.g. switching workspace) triggers a new error:

kwin_wayland[1620]: 0x500: GL_INVALID_ENUM error generated. Invalid <face>.
kwin_wayland[1620]: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"
kwin_wayland[1620]: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
kwin_wayland[1620]: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
kwin_wayland[1620]: Failed to create framebuffer: Invalid argument
kwin_wayland[1620]: Failed to create framebuffer: Invalid argument
kwin_wayland[1620]: 0x500: GL_INVALID_ENUM error generated. Invalid <face>.

Display manager is SDDM, in kernel cmd line we have:

nvidia_drm.modeset=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1

There seems to be no degradation of functionality, at least no immediately evident one; just the errors in the log.

This Arch install is on a notebook; here is some hw and Graphics stack version info:

inxi -Fxz

System:
Kernel: 6.17.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
Desktop: KDE Plasma v: 6.5.3 Distro: Arch Linux
CPU:
Info: 24-core (8-mt/16-st) model: 13th Gen Intel Core i9-13980HX bits: 64
type: MST AMCP arch: Raptor Lake rev: 1 cache: L1: 2.1 MiB L2: 32 MiB
L3: 36 MiB
Graphics:
Device-1: Intel Raptor Lake-S UHD Graphics vendor: Micro-Star MSI
driver: i915 v: kernel arch: Xe bus-ID: 0000:00:02.0
Device-2: NVIDIA AD103M / GN21-X11 [GeForce RTX 4090 Laptop GPU]
vendor: Micro-Star MSI driver: nvidia v: 580.105.08 arch: Lovelace
bus-ID: 0000:01:00.0
Display: wayland server: X.org v: 1.21.1.21 with: Xwayland v: 24.1.9
compositor: kwin_wayland driver:
gpu: i915,nv_platform,nvidia,nvidia-nvswitch resolution: 1: 5120x2880~60Hz
2: 3840x2160
API: EGL v: 1.5 drivers: iris,nvidia,swrast platforms:
active: gbm,wayland,x11,surfaceless,device inactive: device-2
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 25.2.7-arch1.1
glx-v: 1.4 direct-render: yes renderer: Mesa Intel Graphics (RPL-S)
API: Vulkan v: 1.4.328 drivers: nvidia surfaces: N/A devices: 1
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
de: kscreen-console,kscreen-doctor gpu: nvidia-smi wl: wayland-info
x11: xdpyinfo, xprop, xrandr
Info:
Memory: total: 128 GiB note: est. available: 125.49 GiB
used: 6.58 GiB (5.2%)
Processes: 513 Uptime: 2h 5m Init: systemd
Packages: 1523 Compilers: clang: 21.1.6 gcc: 15.2.1 Shell: Zsh v: 5.9
inxi: 3.3.40

Thanks.

Last edited by gen2arch (2025-12-02 13:57:59)

Offline

#2 2025-11-30 13:00:28

gen2arch
Member
Registered: 2013-05-16
Posts: 206

Re: SOLVED: kwin_wayland regression in Multi-GPU Multi-monitor setups

@admin: Sorry for the noise, but would this post better go in "Applications & Desktop Environments"?

Offline

#3 2025-11-30 18:32:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,486

Re: SOLVED: kwin_wayland regression in Multi-GPU Multi-monitor setups

You can https://bbs.archlinux.org/misc.php?report=2275308 your post if you want it to be moved.
Which versions where actually changed?
The errors show up in https://bbs.archlinux.org/viewtopic.php?id=303829 and quite some other google hits, doesn't seem to be a particularly new thing.
Any chance you've a HDR monitor?

Offline

#4 2025-12-01 03:15:51

gen2arch
Member
Registered: 2013-05-16
Posts: 206

Re: SOLVED: kwin_wayland regression in Multi-GPU Multi-monitor setups

seth wrote:

Any chance you've a HDR monitor?

In fact I do: the 4k built-in screen as well as the external (5k) one are HDR. How might this affect the error?

Offline

#5 2025-12-01 08:26:34

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,486

Re: SOLVED: kwin_wayland regression in Multi-GPU Multi-monitor setups

HDR showed up a lot along those errors, I guess the conversion causes "<image> and <target> are incompatible"
=> what if you disable it, https://wiki.archlinux.org/title/KDE#HDR ?

Offline

#6 2025-12-02 13:52:34

gen2arch
Member
Registered: 2013-05-16
Posts: 206

Re: SOLVED: kwin_wayland regression in Multi-GPU Multi-monitor setups

seth: sorry for the delayed reply. took a while to sort it all out, but it is solved now:

1. On my machine the errors in the journal are independent of HDR: HDR active on internal display > no error; external *non-HDR* display attached, the error returns!
2. Main reasons seems to be a combination of Multi-GPU + Multi-monitor setup.

BTW: exactly matching Bug report!
https://bugs.kde.org/show_bug.cgi?id=511852

Solution:

1. identify the GPU enumeration on your machine:

lspci -k | grep -A3 -E "VGA|3D"

compare with output from

ls -l /dev/dri/by-path

Mine has: "card1" = Nividia, "card2"=Intel.

2. tell KWin in which order to prefer DRM devices for displays / compositing. I want Nvidia="card1" to be used preferably. The goal here is to keep compositor and scan-out on one GPU, or at least a path the driver likes better: define a systemd user variable:

systemctl --user edit plasma-kwin_wayland.service

with this content:

[Service]
# Prefer NVIDIA (card1) over Intel (card2) for KWin because of external-monitor bug
Environment=KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card2

The corresponding file is: "~/.config/systemd/user/plasma-kwin_wayland.service.d/override.conf"
Then: systemctl --user daemon-reload; logout, re-login.
Errors in the journal are gone.
If I swap preferences (Intel first): errors return.
Here is an explanation GTP5.1 Thinking was offering:

The more plausible picture now:

Before: KWin probably defaulted to Intel as primary, but external 5K was hanging off NVIDIA → KWin had to do cross-GPU buffer sharing (render on Intel → scan out via NVIDIA) → that’s where the buggy FBO/scanout path got hit and spammed the logs.

Now: KWin renders and scans out on NVIDIA (for the external screen at least), so the weird cross-GPU path is no longer used → no more GL/FB errors.

This matches your experiments perfectly: the problem appears only when an external monitor is active (very likely on the NVIDIA side), and vanishes when you force KWin to treat NVIDIA as the main GPU.

Offline

Board footer

Powered by FluxBB