Bug 482677

Summary: Mouse stuttering when GPU usage is high and Hardware acceleration is used
Product: [Plasma] kwin Reporter: Zastrix Arundell <zastrixarundell>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate, xaver.hugl
Priority: NOR    
Version First Reported In: 5.27.10   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Zastrix Arundell 2024-03-07 09:49:03 UTC
SUMMARY
When GPU usage is high (mostly in games) the mouse cursor stutters when it's hardware accelerated. Making the mouse software accelerated with `KWIN_FORCE_SW_CURSOR=1` fixes the issue (but created artifacts).


STEPS TO REPRODUCE
1. Run a game
2. Uncap FPS to have GPU usage around 99%
3. Mouse stuttering (outside of game even)
4. Enable SW acceleration
5. No stutter on 99% GPU usage

OBSERVED RESULT
System stuttering

EXPECTED RESULT
No stutters (maybe some but not like this)

SOFTWARE/OS VERSIONS
Linux: ostree-image-signed:docker://ghcr.io/ublue-os/kinoite-main:latest
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
There's a reddit post with this issue as well: https://www.reddit.com/r/linux_gaming/comments/19694tk/everything_gets_laggy_when_gpu_gets_close_to_100/
Comment 1 Zamundaaa 2024-03-08 01:56:02 UTC
In 5.27 hardware cursor updates were still tied to the rest of the screen; it stuttering with very high GPU load wouldn't be entirely unexpected - and that's fixed in 6.0.
If it doesn't happen with the software cursor though, then that's a driver bug. Please report this to your GPU vendor (if it's AMD like in the Reddit post, you can do that at https://gitlab.freedesktop.org/drm/amd/-/issues)