SUMMARY Plasma Wayland (5.25.1) freezing glitches on gaming.. Morelikely a hiccups of freezes.. STEPS TO REPRODUCE 1. Login to Plasma Wayland 2. Run Games 3. Wait several sec OBSERVED RESULT freezes happen.. need to do Alt + Tab to fix this but happen every several sec EXPECTED RESULT Normal gaming time SOFTWARE/OS VERSIONS Linux : Arch Linux KDE Plasma Version: 5.25.1 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.5 Mesa : 22.1.2-1 ADDITIONAL INFORMATION I only tested to game with fullscreen and borderless option.. that is Apex Legends and Control.. Which is both of em installed on my Machine and from steam with Proton 7.0.3.. Hardware Specifications Laptop : MSI Delta 15 CPU :Ryzen 7 5800H GPU0 : RX 6700M GPU1: Vega 8 Monitor Freesync : Enabled Logs There is no stack trace or Coredump but i see repeat message on journalctl kwin_wayland[1335]: kwin_wayland_drm: Atomic commit failed! This should never happen! Invalid argument kwin_wayland[1335]: kwin_wayland_drm: Presentation failed! Invalid argument and some of em are kernel: [drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin framebuffer with error -22 kernel: [drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin framebuffer with error -22
This sounds a lot like a driver bug, if the atomic test works, the atomic commit must not fail. I assume you're running the games on the dedicated GPU, but displaying them on the laptop screen? Does setting one or both of these environment variables make a difference? KWIN_DRM_USE_MODIFIERS=0 KWIN_DRM_NO_DIRECT_SCANOUT=1
(In reply to Zamundaaa from comment #1) > This sounds a lot like a driver bug, if the atomic test works, the atomic > commit must not fail. > > I assume you're running the games on the dedicated GPU, but displaying them > on the laptop screen? > Does setting one or both of these environment variables make a difference? > KWIN_DRM_USE_MODIFIERS=0 > KWIN_DRM_NO_DIRECT_SCANOUT=1 No.. I try to run the game on dedicated GPU but on external monitor which is connected directly to the dGPU.. the laptop monitor is disabled.. but i will try your method and will report it..
(In reply to Zamundaaa from comment #1) > This sounds a lot like a driver bug, if the atomic test works, the atomic > commit must not fail. > > I assume you're running the games on the dedicated GPU, but displaying them > on the laptop screen? > Does setting one or both of these environment variables make a difference? > KWIN_DRM_USE_MODIFIERS=0 > KWIN_DRM_NO_DIRECT_SCANOUT=1 Alr.. tried that by exporting those env var and making sure its already loaded.. same issue still happen..
Where did you export them? kwin_wayland needs to get them. Easiest way to ensure that is to put them into /etc/environment and rebooting
(In reply to Zamundaaa from comment #4) > Where did you export them? kwin_wayland needs to get them. Easiest way to > ensure that is to put them into /etc/environment and rebooting oh yeah turns out the testing was wrong on my end.. yeah after adding those env var the problem seems gone..Do u know exactly what happen here?
Had the same issue, and it has been fixed by those env variables (at least it hasn't crashed so far).
(In reply to McCak from comment #5) > (In reply to Zamundaaa from comment #4) > > Where did you export them? kwin_wayland needs to get them. Easiest way to > > ensure that is to put them into /etc/environment and rebooting > > oh yeah turns out the testing was wrong on my end.. yeah after adding those > env var the problem seems gone..Do u know exactly what happen here? Sorry about missing your response. The issue is caused by KWin directly using buffers from the game to drive the display (direct scanout); the driver tells KWin that doing that will work and yet when actually trying to present an image it fails. I'll ask around if compositors are expected to handle this situation but I think this is something the driver has to prevent 100% of the time or things will get a lot more complicated for compositors. Either way, this is a driver bug, can you report it to https://gitlab.freedesktop.org/drm/amd/-/issues? The relevant things to mention are that atomic commits fail with direct scanout on the dedicated GPU, and the error message you found before (kernel: [drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin framebuffer with error -22). If you link the issue here I'll try to provide any additional information that could help
- Dmesg log (full log) - Xorg log - Any other log(In reply to Zamundaaa from comment #7) > (In reply to McCak from comment #5) > > (In reply to Zamundaaa from comment #4) > > > Where did you export them? kwin_wayland needs to get them. Easiest way to > > > ensure that is to put them into /etc/environment and rebooting > > > > oh yeah turns out the testing was wrong on my end.. yeah after adding those > > env var the problem seems gone..Do u know exactly what happen here? > > Sorry about missing your response. The issue is caused by KWin directly > using buffers from the game to drive the display (direct scanout); the > driver tells KWin that doing that will work and yet when actually trying to > present an image it fails. > > I'll ask around if compositors are expected to handle this situation but I > think this is something the driver has to prevent 100% of the time or things > will get a lot more complicated for compositors. > > Either way, this is a driver bug, can you report it to > https://gitlab.freedesktop.org/drm/amd/-/issues? > The relevant things to mention are that atomic commits fail with direct > scanout on the dedicated GPU, and the error message you found before > (kernel: [drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin > framebuffer with error -22). If you link the issue here I'll try to provide > any additional information that could help I already report it to there and this is the link https://gitlab.freedesktop.org/drm/amd/-/issues/2075 just ask me there if u need some info..
good, let's continue tracking it there then