| Summary: | On device with nvidia dgpu, desktop extremely laggy and kwin spams kwin_wayland_drm: Presentation failed! Invalid argument | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | fanzhuyifan |
| Component: | platform-drm | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | major | CC: | kdedev, nate, postix, xaver.hugl |
| Priority: | NOR | Keywords: | regression |
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | drm-debug.log | ||
|
Description
fanzhuyifan
2024-07-17 05:02:46 UTC
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. |