Bug 464730

Summary: [X11/Wayland] Games Stuttering/Drop FPS periodically till ATL+Tabbed
Product: [Plasma] kwin Reporter: Echoa <echoa>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, xaver.hugl
Priority: NOR Keywords: regression
Version First Reported In: 5.26.90   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Echoa 2023-01-24 10:52:45 UTC
SUMMARY

Testing out the Latest KDE Plasma Beta on Arch Ive encountered that a couple of my games after a short period of play begin stuttering excessively and frame rate drops to 30-33fps. The games in question are Generation Zero, No Mans Sky, and Monster Hunter World.

Generation Zero and Monster Hunter World do it most readily, GZ begins stuttering and dropping frames to the point of being unplayable, MHW does it as you load into the game. No Mans Sky on the other hand is hard to pin down as the games performance can be a bit wonky at the best of times. This continues until you alt+tab out of the game and then back in. This fixes the issue for a short period till you again have to alt+tab.

Changing compositor settings doesnt change the situation regardless of what settings for latency or smoothness are used and this doesnt occur on the latest stable 5.26.5 release or on other DEs. My best guess is this is related to Kwin as i cant think of anything else that may cause this. I havent yet reproduced this on an X11 session.

Please let me know if any other information is needed

STEPS TO REPRODUCE
1. Run/Play one of the Listed games (or possibly others may also do it) on wayland
2. Game begins to stutter down to 30-33fps 
3. Alt+Tab 

OBSERVED RESULT

Game Stutters/Drops FPS till you alt+tab

EXPECTED RESULT

Game Shouldnt stutter


SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

System
-------
Ryzen 5600x
RX 6800 Mesa 22.3.3
32gb Ram
Arch Linux 6.1.7-zen1-1-zen
Comment 1 Echoa 2023-01-24 11:40:13 UTC
Just a quick update, I was able to also reproduce this behavior on X11 as well so it seems to not be Wayland specific
Comment 2 Zamundaaa 2023-01-25 13:55:26 UTC
Does it also happen on X11 with compositing disabled (press Shift+Alt+F12 to toggle it)?
Comment 3 Echoa 2023-01-26 02:01:56 UTC
(In reply to Zamundaaa from comment #2)
> Does it also happen on X11 with compositing disabled (press Shift+Alt+F12 to
> toggle it)?

I does not happen when compositing is disabled. It usually happens within 5min of playing but after 20min i still had no framerate issues when disabled
Comment 4 Echoa 2023-01-27 04:55:52 UTC
Another update on this, running the games through a nested gamescope session with launch options 

gamescope -W "screen width #" -H "screen height #" -f -e --    

(in case anyone hasnt used it substitute screen height and width in place of "screen width #" and "screen height #")

also seems to eliminate the issue, might it be possible that the games arent being recognized as full screen? Could possibly explain why having  gamescope create the fullscreen window seems to fix it also.
Comment 5 Bug Janitor Service 2023-02-11 03:51:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Echoa 2023-02-15 20:45:18 UTC
Im going to close this report as resolved, with the release of 5.27 i can no longer reproduce this issue after 8hrs of gameplay