Bug 511852

Summary: Journal entries like: GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
Product: [Plasma] kwin Reporter: Evert Vorster <evorster>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: inwrongman, norbert, qtm4ig, yjcoshc
Priority: NOR    
Version First Reported In: 6.5.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Evert Vorster 2025-11-09 08:20:17 UTC
SUMMARY
This seems somewhat similar to https://bugs.kde.org/show_bug.cgi?id=496898, but there does not seem to be any memory leak. 
Kwin is at version 6.5.2, but the picker above did not allow me to pick that version, so I picked the closest one.

After the latest nVidia driver update, to version 580-105, I am seeing the following lines in my journal at regular intervals:
```
Nov 09 09:37:09 Evert.Scar kwin_wayland[1497]: 0x500: GL_INVALID_ENUM error generated. Invalid <face>.
Nov 09 09:37:09 Evert.Scar kwin_wayland[1497]: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"
Nov 09 09:37:09 Evert.Scar kwin_wayland[1497]: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
Nov 09 09:37:09 Evert.Scar kwin_wayland[1497]: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
Nov 09 09:37:09 Evert.Scar kwin_wayland[1497]: Failed to create framebuffer: Invalid argument
Nov 09 09:37:09 Evert.Scar kwin_wayland[1497]: Failed to create framebuffer: Invalid argument
```

I'm reporting it here, because it is kwin_wayland that is throwing the error, and the system seems to be running fine. In fact, with the latest nVidia drivers there are a lot of bugs that have simply gone away. 
Specifically this bug was affecting this system the worst: 
https://forums.developer.nvidia.com/t/bug-external-monitor-fails-to-wake-up-from-powersave-mode-if-refresh-rate-is-higher-than-30hz/316612

Again, to be perfectly clear, this error does not seem to be affecting my system in any way. It is rock stable and running fast. However, kwin is reporting an error, and I would like to make you aware of it.

Over the web, it seems that people were having this exact error reported, and that it had gone away by setting nvidia modeset and fbdev to true with kernel parameters. Both these are now set by default with the nVidia drivers without the need for kernel parameters:
```
evert@Evert ~ [1]> sudo cat /sys/module/nvidia_drm/parameters/modeset
Y
evert@Evert ~> sudo cat /sys/module/nvidia_drm/parameters/fbdev 
Y
```

I can only conclude that nVidia is doing something different now, and because it is working so well (for me at least) people are going to be both unwilling to change their drivers, and bombarding you with bug reports. 

STEPS TO REPRODUCE:
Just run your system normally.

OBSERVED RESULT
Errors reported in the journal

EXPECTED RESULT
No errors reported in the journal

SOFTWARE/OS VERSIONS
      /\          evert@Evert
     /  \         -----------
    /    \        OS: Arch Linux x86_64
   /      \       Host: ROG Strix G733PYV_G733PYV (1.0)
  /   ,,   \      Kernel: Linux 6.17.7-3-cachyos
 /   |  |   \     Uptime: 17 mins
/_-''    ''-_\    Packages: 1665 (pacman), 7 (flatpak)
                  Shell: fish 4.1.2
                  Display (NE173QHM-NZ2): 2560x1440 @ 1.33x in 17", 240 Hz [Built-in]
                  Display (BenQ EX3210U): 3840x2160 @ 1.5x in 32", 144 Hz [External] *
                  DE: KDE Plasma 6.5.2
                  WM: KWin (Wayland)
                  WM Theme: Oxygen
                  Theme: Oxygen (Oxygen) [Qt], Breeze [GTK2/3/4]
                  Icons: oxygen [Qt], oxygen [GTK2/3/4]
                  Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
                  Cursor: Oxygen-22-White-Valentine (48px)
                  Terminal: konsole 25.8.3
                  Terminal Font: Hack (12pt)
                  CPU: AMD Ryzen 9 7945HX3D (32) @ 5.46 GHz
                  GPU 1: AMD Radeon 610M [Integrated]
                  GPU 2: NVIDIA GeForce RTX 4090 Laptop GPU [Discrete]
                  Memory: 5.90 GiB / 62.00 GiB (10%)
                  Swap: 0 B / 100.00 GiB (0%)
                  Disk (/): 131.44 GiB / 150.00 GiB (88%) - btrfs
                  Disk (/home): 2.72 TiB / 3.40 TiB (80%) - btrfs
                  Disk (/home/evert/Videos): 2.76 TiB / 3.39 TiB (81%) - btrfs
                  Local IP (enp7s0u2u2c2): 192.168.88.88/24
                  Battery (GA50358): 69% [AC Connected]
                  Locale: en_GB.UTF-8

ADDITIONAL INFORMATION
Full journal for this boot:
http://0x0.st/K9yy.txt

Also worth noting is that while this is an Arch install, I am using CachyOS packages specifically optimized for my laptop.

I did see some screen freezes on the internal panel of the laptop which may or may not be related to this, but this was cured by setting amdgpu.dcdebugmask=0x10.
Comment 1 qtm4ig 2025-12-09 08:12:37 UTC
I have the same issue on archlinux but with plasma 6.5.х and nvidia 590.44.x or 580.105.x drivers
...
Dec 09 11:08:17 cosx kwin_wayland[2277]: 0x500: GL_INVALID_ENUM error generated. Invalid <face>.
Dec 09 11:08:17 cosx kwin_wayland[2277]: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"
Dec 09 11:08:17 cosx kwin_wayland[2277]: 0x502: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
Dec 09 11:08:17 cosx kwin_wayland[2277]: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
Dec 09 11:08:17 cosx kwin_wayland[2277]: Failed to create framebuffer: Invalid argument
Dec 09 11:08:17 cosx kwin_wayland[2277]: Failed to create framebuffer: Invalid argument
...
plasma 6.4.х  is ok
Comment 2 Norbert Preining 2026-01-08 14:36:51 UTC
Same here, Arch up-to-date.
Comment 3 gman 2026-01-18 12:25:33 UTC
Hi there, same bug here in Fedora, using kwin Version 6.5.5, Release 1.fc43. Laptop with a integrated amd gpu, a discrete nvidia gpu and an external monitor.
Same errors in logs. There _seems_ to be no regressions related to these errors, but still, there must be a reason for the errors to occur.

I've found a topic which describes possible reason and a workaround: https://bbs.archlinux.org/viewtopic.php?id=310531
> 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
> [Service]
> # Prefer NVIDIA (card1) over Intel (card2) for KWin because of external-monitor bug
> Environment=KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card2
I've tried  this workaround and it indeed eliminates the errors. However, I don't want kwin to run primarily on the nvidia gpu, so I decided against it.

from inxi:
> System:
>  Kernel: 6.18.5-200.fc43.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
>  Desktop: KDE Plasma v: 6.5.5 Distro: Fedora Linux 43 (KDE Plasma Desktop Edition)
> CPU:
> Info: 8-core model: AMD Ryzen 7 6800H with Radeon Graphics bits: 64
>  type: MT MCP arch: Zen 3+ rev: 1 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
> Speed (MHz): avg: 1096 min/max: 404/4787 boost: enabled cores: 1: 1096
>   2: 1096 3: 1096 4: 1096 5: 1096 6: 1096 7: 1096 8: 1096 9: 1096 10: 1096
>  11: 1096 12: 1096 13: 1096 14: 1096 15: 1096 16: 1096 bogomips: 102207
> Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
> Graphics:
>  Device-1: NVIDIA GA104M [Geforce RTX 3070 Ti Laptop GPU] vendor: Lenovo
>    driver: nvidia v: 580.119.02 arch: Ampere bus-ID: 01:00.0
>  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt [Radeon 680M]
>    vendor: Lenovo driver: amdgpu v: kernel arch: RDNA-2 bus-ID: 35:00.0 temp: 40.0 C
>  Display: wayland server: Xwayland v: 24.1.9 compositor: kwin_wayland
>  driver: X: loaded: amdgpu,nvidia unloaded: modesetting,nouveau,radeon
> dri: radeonsi gpu: amdgpu,nv_platform,nvidia,nvidia-nvswitch resolution:
> 1: 2560x1440~60Hz 2: 1920x1080
>  API: EGL v: 1.5 drivers: kms_swrast,nvidia,radeonsi,swrast platforms:
>    active: gbm,wayland,x11,surfaceless,device inactive: device-2
>  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: amd mesa v: 25.2.7 glx-v: 1.4
>    direct-render: yes renderer: AMD Radeon 680M (radeonsi rembrandt LLVM
>    21.1.5 DRM 3.64 6.18.5-200.fc43.x86_64)
>  API: Vulkan v: 1.4.328 drivers: radv,nvidia,llvmpipe surfaces: N/A
> devices: 3
>  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
>   de: kscreen-console,kscreen-doctor gpu: nvidia-settings,nvidia-smi
>    wl: wayland-info x11: xdriinfo, xdpyinfo, xprop, xrandr