Bug 495843

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-drmAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: holubvojtech, nate, xaver.hugl
Priority: NOR    
Version: 6.2.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
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
Created attachment 175549 [details]
30000 logs

SUMMARY
Exiting and playing Dota2 generates a lot of logs with message "kwin_wayland_drm: atomic commit failed: Invalid argument". These messages are taking up a lot of my storage.

I played dota2 for half an hour and there were about 30w warnings with the same content in logs. It is insane.

[System information generated by Steam](https://gist.github.com/1nj0k/a75a7a174e076e72b863a0d8e35edd8f)
[Steam Runtime Diagnostics](https://gist.github.com/1nj0k/d68f3af37b8486d7a48bd8d334a205a5)

I also reported it in github.(https://github.com/ValveSoftware/Dota-2/issues/2845)

STEPS TO REPRODUCE
1. Launch dota2
2. Exit it and check logs or play dota2 than check logs

OBSERVED RESULT
1. Too many logs with warning "kwin_wayland_drm: atomic commit failed: Invalid argument"

EXPECTED RESULT
1. No warning

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.6-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 9950X 16-Core Processor
Memory: 60.4 GiB of RAM
Graphics Processor: AMD Radeon RX 7800 XT
Comment 1 Zamundaaa 2024-11-05 16:03:07 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.
Comment 2 Sigmund 2024-11-06 13:21:15 UTC
Created attachment 175578 [details]
drm-debug.00
Comment 3 Sigmund 2024-11-06 13:22:56 UTC
Created attachment 175579 [details]
drm-debug.01
Comment 4 Sigmund 2024-11-06 13:24:21 UTC
Created attachment 175580 [details]
drm-debug.02
Comment 5 Sigmund 2024-11-06 13:27:36 UTC
(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.
Comment 6 Nate Graham 2024-11-08 21:25:59 UTC
Maybe https://gitlab.freedesktop.org/drm/amd/-/issues/2075?
Comment 7 Sigmund 2024-11-09 07:08:40 UTC
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.
Comment 8 Vojtěch Holub 2024-11-18 01:17:21 UTC
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
Comment 9 Vojtěch Holub 2024-11-18 01:50:23 UTC
Created attachment 175898 [details]
Output of drm_info

My drm_info