Bug 480015 - KDE Plasma (Wayland) Microstuttering in demanding DX12 games with VRR, perfectly smooth on X11
Summary: KDE Plasma (Wayland) Microstuttering in demanding DX12 games with VRR, perfec...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.10
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2024-01-18 20:13 UTC by mcdarkjedii
Modified: 2024-03-16 03:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mcdarkjedii 2024-01-18 20:13:08 UTC
SUMMARY
***
First of all, apologies if there is already a similar issue open, but I couldn't find anything similar.

Make sure you're running KDE Plasma on Wayland. Have adaptive sync set to automatic or always.
Play a demanding DX12 game that supports VRR such as Cyberpunk 2077 & The Witcher 3.
Make sure the graphical settings are fully maxed out, so you won't exceed your monitor's refresh rate.
Move mouse around slowly, don't flick it, much easier to do this with an analogue stick.
There will be visible microstutters.

Compositor set to smoothest animations & lowest latency.
Reduce latency by allowing screen tearign artifacts in fullscreen windows toggled on and off.
In game settings both Borderless Windowed & Exclusive Fullscreen, Vsync off & on (slightly reduces stuttering but doesn't eliminate it)
Alt tabbing out and in again. Closing the plasmashell process.
Changing the default Proton/Wine version to GE.
Switching to the Liquorix kernel. Xanmod kernel.
It's less severe in more up to date distros like Arch Linux & Opensuse Tumbleweed.
Still happening on Arch even when running KDE 6 from kde-unstable repo.
All of these still don't fix the microstutters.

However playing a much less demanding DX12 game like Deep Rock Galactic will be butter smooth.
Logging in to an X11 Plasma session (with VRR enabled) completely gets rid of the microstutters.
And if I run Gnome 45 (Wayland) on Arch with the VRR patches for mutter & gnome control center it will also run smoothly.

***


STEPS TO REPRODUCE
1. Make sure you're running KDE Plasma on Wayland
2. Open a demanding DX 12 game.
3. Turn camera slowly (easiest done with a controller)

OBSERVED RESULT
-Minor stutters, most noticeable when turning the camera at slower speeds.

EXPECTED RESULT
-No visible stutters, butter smooth camera movement. 
Like on X11 or Gnome + VRR patched mutter & control panel.
And of course, Windows 10/11 with Freesync enabled.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Nobara Linux 39
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION

Kernel Version: 6.7.0-204.fsync.fc39.x86_64 (64-bit)
R7 5800x3d
32GB DDR4 3200Mhz
RX 6800XT
4TB NVMe PCIe 3.0 SSD
Comment 1 mcdarkjedii 2024-01-19 23:13:19 UTC
Ok, an update.
After doing a very minimal install of KDE Plasma on Arch., the stuttering on Wayland is pretty much gone.
Runs as smooth as Gnome on Wayland with the VRR patches.

As for any other distro that comes with KDE preinstalled, that's a different matter.
Switching to X11 on those completely gets rid of the stuttering while Wayland still suffers.

I'll update this big report if I figure out what specific package/service is to blame on Wayland.
Comment 2 Nate Graham 2024-02-15 19:59:41 UTC
Please do update us if you find out what the issue was, yeah.
Comment 3 Bug Janitor Service 2024-03-01 03:46:48 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 4 Bug Janitor Service 2024-03-16 03:47:01 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!