*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** SUMMARY STEPS TO REPRODUCE 1. Plug in external monitor on wayland session 2. Desktop becomes extremely laggy and kwin spams " kwin_wayland_drm: Presentation failed! Invalid argument" ADDITIONAL INFORMATION Only happens with kwin master, and not kwin 6.1.2. So this suggests some regression in between. Using the proprietary nvidia drivers. Happens with both 550.90 and 555.58. Will try a bisection when I have time.. Building kwin just takes soo long... SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.1.2 KDE Frameworks Version: 6.4.0 Qt Version: 6.8.0 Kernel Version: 6.9.9-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 20 × 13th Gen Intel® Core™ i9-13900H Memory: 15.2 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Zephyrus G16 GU603VV_GU603VV System Version: 1.0
First bad commit is 2799c270b4a7ac96971d6bcc889f347adfcaf558. See https://invent.kde.org/plasma/kwin/-/merge_requests/6041
Could you get a drm debug log for the failing commits? https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues KWin git master started to use the crtc drm properties for direct scanout with color management; this sounds a lot like the driver rejects commits that had a positive atomic test in actual presentation.
I forgot to mention that this is not consistently reproducible. Not sure what exactly triggers the problem. Sometimes rebooting fixes the issue, and sometimes not. Haven't been able to reproduce today. Will upload the drm logs when I see this again.
Created attachment 171771 [details] drm-debug.log
Is the external output actually connected to the NVidia GPU? The log says the failing atomic commits happen on the Intel driver. Sadly it doesn't explain *why* they fail though
(In reply to Zamundaaa from comment #5) > Is the external output actually connected to the NVidia GPU? The log says > the failing atomic commits happen on the Intel driver. Sadly it doesn't > explain *why* they fail though Yes, the external output is connected to the nvidia gpu. Also I realized that I get "kwin_wayland_drm: Presentation failed! Invalid argument" in the logs even when I disconnect the external monitor. I just didn't realize the issue was still occurring since the lagging gets much better.
The issue disappear after commenting out the degamma code here: https://invent.kde.org/plasma/kwin/-/blob/b9ace07d743ec78fe0a6d2ef9b3f445e38791a6b/src/backends/drm/drm_crtc.cpp#L62. Specifically, lines 62-65. Another piece of relevant information: the bug only seems to appear after waking from suspend to ram, but does not always happen after waking.
Should I file a report upstream to https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/?
Yes please. If it doesn't get resolved quickly, please ping me again about it; I think just not using the degamma lut on i915 would be acceptable for 6.2.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6188
Upstream bug report: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11810 For some reason cannot enter it into the url field.