Bug 475808

Summary: [FeatureRequest] Implement Explicit Sync for xwayland
Product: [Plasma] kwin Reporter: Marcelo Bossoni <mmbossoni>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED LATER    
Severity: wishlist CC: kde
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Marcelo Bossoni 2023-10-18 20:17:04 UTC
SUMMARY
New NVIDIA beta drivers are unusable with xwayland apps (mainly games) on wayland due to them kind of requiring explicit synchronization now.
Since Plasma 6 wants to be Wayland first it is paramount for explicit sync to be implemented.
NVIDIA have the biggest market share on gaming setups, unfortunately.


STEPS TO REPRODUCE
1. Use new 545 drivers in a wayland session and a monitor with high refresh rate (144hz+)
2. Play a demanding game that renders at 70fps
3. Open discord in xwayland mode

OBSERVED RESULT
Check all kind of weird stuff happening, like flickering on screen and old frames being drawn.
Check discord in xwayland mode also have the famous "rubberbanding"

EXPECTED RESULT
Game is smooth
discord doesn't have the rubberbanding effect

Some links
https://forums.developer.nvidia.com/t/feature-g-sync-freesync-under-wayland-session/220822/46
https://forums.developer.nvidia.com/t/new-545-beta-only-renders-update-game-if-window-is-unfocused-otherwise-it-will-have-0-fps/269759

ADDITIONAL INFORMATION
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/90
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967
https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/59
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317
Comment 1 David Edmundson 2023-10-18 21:01:11 UTC
Thanks for the summary, we're aware of the upstream discussion.

We are adding support for this, but we can't go faster than upstream.