Radeon RX 5700 XT stuttering HW cursor
Brief summary of the problem:
HW cursor has been stuttering erratically in X11 since the kernel 5.3 (first to add Navi10 support), which also affect games and other more demanding applications by causing huge frame drops when cursor is being moved.
Stuttering used to happen only in X, Wayland (specifically KDE Plasma) remained unaffected (please see UPDATE section). However after the kernel 5.8 (KDE Plasma) Wayland session started stuttering too. SW cursor fixes stuttering in X, but not for Wayland.
There seem to be few reports that appear to be somewhat similar, some of which are marked as fixed, but none of them seem to be the same issue I'm experiencing. Similar reports:
Hardware description:
- CPU: Ryzen Threadripper 1950X
- GPU: Sapphire NITRO+ RX 5700 XT SE
- System Memory: 64GB
- Display(s): ASUS ROG Swift PG278QR
- Type of Diplay Connection: DP
System information:
- Distro name and Version: Fedora 33
- Kernel version: 5.10.10
- Custom kernel: Default Fedora-provided kernel
- AMD package version: No package
How to reproduce the issue:
Boot Linux (at least 5.3) with RX 5700 XT and SW cursor disabled. HW cursor in X11 session will stutter, but Wayland will run smoothly without any problems. Kernel 5.8 and newer will also break Wayland, SW cursor will work for X11 but not for Wayland.
As my monitor has a G-Sync module, I also tested RX 5700 XT with a Samsung SmartTV over HDMI just to be sure. There was no difference, cursor still stuttered.
Also, as a side note, I'm using 1000Hz mouse (which I can't lower due to problems between USB firmware and kernel). With 125Hz mouse the stuttering is sometimes almost unnoticeable, but it's still there and dropping frames.
UPDATE
After numerous re-runs of tests with various desktop environments and their native compositors, I noticed that in X11 session all DEs have a stuttering cursor with SWCursor being off. However in Wayland session only KDE Plasma stutters while other DEs/compositors (GNOME, Sway, Weston...) have zero problems. Take this as a grain or salt as I can't find the source of quote, but I remember someone mentioning that while KDE Plasma uses "true" hardware cursor, GNOME has turned away from it and is using software cursor instead, at least in Wayland session. If it's so, this might explain why every single DE/compositor but Plasma/KWin has no stuttering cursor with Wayland.