| Summary: | Exiting and playing Dota2 will generate a lot of logs with warning "kwin_wayland_drm: atomic commit failed: Invalid argument" | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Sigmund <qwe2968> |
| Component: | platform-drm | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | holubvojtech, nate, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 6.2.2 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/04b329a14a783f3c80c14b8413586e9a725531f3 | Version Fixed/Implemented In: | 6.2.4 |
| Sentry Crash Report: | |||
| Attachments: |
30000 logs
drm-debug.00 drm-debug.01 drm-debug.02 Output of drm_info |
||
|
Description
Sigmund
2024-11-05 15:02:30 UTC
Please attach the output of drm_info, so we can get basic information about your GPU and display setup. To figure out exactly why the driver fails the commit, we'll need to use drm debug logging. Just enable it, have the game fullscreen for a few seconds, and then you can disable it again. https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues describes how to do that, and how to get the logs from it. Created attachment 175578 [details]
drm-debug.00
Created attachment 175579 [details]
drm-debug.01
Created attachment 175580 [details]
drm-debug.02
(In reply to Zamundaaa from comment #1) > Please attach the output of drm_info, so we can get basic information about > your GPU and display setup. > To figure out exactly why the driver fails the commit, we'll need to use drm > debug logging. Just enable it, have the game fullscreen for a few seconds, > and then you can disable it again. > https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues describes > how to do that, and how to get the logs from it. I split one drm-debug log into three. Hope these logs can help. Ahhh, I think they are different things. For my logs are different from them and I use desktop. I also tried their solutions, didn't work. I can reproduce this by running `vkcube --present_mode 0` (VK_PRESENT_MODE_IMMEDIATE_KHR) and forcing fullscreen (ALT+F3 menu). This message appears when I actively move the mouse cursor over the screen - the cube rendering can be paused (SPACE). I had the same problem with Dead by Daylight (game is using system cursor in menu/lobby), enabling vsync in game settings stopped the message from appearing. If I remember correctly, this started with Plasma 6.2. Maybe it's related to the atomic tearing changes? `kwin_wayland_drm: atomic commit failed: Invalid argument` is the only message (one per frame), no kernel errors. Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.3 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.0 Kernel Version: 6.11.7-300.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor Memory: 31.2 GiB of RAM Graphics Processor: AMD Radeon RX 6700 XT Created attachment 175898 [details]
Output of drm_info
My drm_info
From the log, it's evident that KWin is trying to disable the cursor plane, so that it can enable tearing: [ 799.322487] amdgpu 0000:03:00.0: [drm:drm_ioctl] comm="DP-2" pid=1487, dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC [ 799.322488] amdgpu 0000:03:00.0: [drm:drm_atomic_state_init] Allocated atomic state 0000000016f80ea3 [ 799.322489] amdgpu 0000:03:00.0: [drm:drm_atomic_get_plane_state] Added [PLANE:76:plane-6] 000000007791a1e9 state to 0000000016f80ea3 [ 799.322490] amdgpu 0000:03:00.0: [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:76:plane-6] state 000000007791a1e9 [ 799.322490] amdgpu 0000:03:00.0: [drm:drm_mode_atomic_ioctl] need at least one CRTC for DRM_MODE_PAGE_FLIP_EVENT [ 799.322491] amdgpu 0000:03:00.0: [drm:drm_atomic_state_default_clear] Clearing atomic state 0000000016f80ea3 [ 799.322492] amdgpu 0000:03:00.0: [drm:__drm_atomic_state_free] Freeing atomic state 0000000016f80ea3 [ 799.322493] amdgpu 0000:03:00.0: [drm:drm_ioctl] comm="DP-2", pid=1487, ret=-22 [ 799.322495] amdgpu 0000:03:00.0: [drm:drm_ioctl] comm="DP-2" pid=1487, dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC that "need at least one CRTC for DRM_MODE_PAGE_FLIP_EVENT" means that the cursor plane is already disabled, so KWin is doing nonsense. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6817 Git commit 769c896cdb5fba5f4078b3cb310ccf98f7c26f3a by Xaver Hugl. Committed on 22/11/2024 at 14:09. Pushed by zamundaaa into branch 'master'. compositor_wayland: don't commit cursor changes if the layer wasn't actually enabled The drm backend doesn't handle changes that do this well, as it requests a pageflip event and the kernel can't give us a pageflip event for an already-disabled plane. M +5 -2 src/compositor_wayland.cpp https://invent.kde.org/plasma/kwin/-/commit/769c896cdb5fba5f4078b3cb310ccf98f7c26f3a Git commit b8a16bffa619adc34c9ea6911a71616a0ade3618 by Xaver Hugl. Committed on 22/11/2024 at 14:09. Pushed by zamundaaa into branch 'master'. backends/drm: reject cursor updates already in beginFrame This avoids rendering the hardware cursor image each time while tearing is enabled, only to then throw the result away when updating the plane fails M +1 -1 src/backends/drm/drm_egl_layer.cpp M +9 -4 src/backends/drm/drm_output.cpp M +1 -0 src/backends/drm/drm_output.h https://invent.kde.org/plasma/kwin/-/commit/b8a16bffa619adc34c9ea6911a71616a0ade3618 Git commit 04b329a14a783f3c80c14b8413586e9a725531f3 by Xaver Hugl. Committed on 22/11/2024 at 14:51. Pushed by zamundaaa into branch 'Plasma/6.2'. compositor_wayland: don't commit cursor changes if the layer wasn't actually enabled The drm backend doesn't handle changes that do this well, as it requests a pageflip event and the kernel can't give us a pageflip event for an already-disabled plane. (cherry picked from commit 769c896cdb5fba5f4078b3cb310ccf98f7c26f3a) M +5 -2 src/compositor_wayland.cpp https://invent.kde.org/plasma/kwin/-/commit/04b329a14a783f3c80c14b8413586e9a725531f3 Git commit 0539f18f7afcadbe95db991f85db6eb550d65041 by Xaver Hugl. Committed on 22/11/2024 at 14:51. Pushed by zamundaaa into branch 'Plasma/6.2'. backends/drm: reject cursor updates already in beginFrame This avoids rendering the hardware cursor image each time while tearing is enabled, only to then throw the result away when updating the plane fails (cherry picked from commit b8a16bffa619adc34c9ea6911a71616a0ade3618) M +1 -1 src/backends/drm/drm_egl_layer.cpp M +9 -4 src/backends/drm/drm_output.cpp M +1 -0 src/backends/drm/drm_output.h https://invent.kde.org/plasma/kwin/-/commit/0539f18f7afcadbe95db991f85db6eb550d65041 |