| Summary: | SDL_WarpMouseInWindow breaks V-SYNC under Wayland/kwin | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | adrian.v.przekwas |
| Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nate, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 6.4.4 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/0480eb45adfe532888017cc1f36f23ba3d4dfca6 | Version Fixed/Implemented In: | 6.4.5 |
| Sentry Crash Report: | |||
| Attachments: |
testing app
testing app source code |
||
|
Description
adrian.v.przekwas
2025-08-27 20:14:03 UTC
Created attachment 184507 [details]
testing app source code
This is the WAYLAND_DEBUG output of a single frame of that test app:
> [2477892.765] {mesa vk display queue} -> wp_linux_drm_syncobj_surface_v1#79.set_acquire_point(wp_linux_drm_syncobj_timeline_v1#99, 0, 2743)
> [2477892.769] {mesa vk display queue} -> wp_linux_drm_syncobj_surface_v1#79.set_release_point(wp_linux_drm_syncobj_timeline_v1#100, 0, 2743)
> [2477892.771] {mesa vk display queue} -> wl_surface#4.attach(wl_buffer#97, 0, 0)
> [2477892.774] {mesa vk display queue} -> wl_surface#4.damage_buffer(0, 0, 2147483647, 2147483647)
> [2477892.777] {mesa vk display queue} -> wp_fifo_v1#80.set_barrier()
> [2477892.779] {mesa vk display queue} -> wp_fifo_v1#80.wait_barrier()
> [2477892.782] {mesa vk display queue} -> wl_surface#4.commit()
> [2477892.787] {mesa vk display queue} discarded wl_buffer#76.release()
> Frame time: 0
> [2477892.796] {Default Queue} -> zwp_pointer_constraints_v1#14.lock_pointer(new id zwp_locked_pointer_v1#104, wl_surface#4, wl_pointer#41, nil, 2)
> [2477892.800] {Default Queue} -> zwp_locked_pointer_v1#104.set_cursor_position_hint(0.00000000, 0.00000000)
> [2477892.804] {Default Queue} -> wl_surface#4.commit()
> [2477892.807] {Default Queue} -> zwp_locked_pointer_v1#104.destroy()
> [2477892.943] {Display Queue} wl_display#1.delete_id(104)
The issue is that the commit for the pointer constraint clears the fifo barrier, which it shouldn't do.
I'm not so sure SDL should be doing these commits either, but there's also definitely a bug in KWin here.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8047 Git commit fdd0a94e0013c0190e115a433588b294de4df144 by Xaver Hugl. Committed on 28/08/2025 at 19:46. Pushed by zamundaaa into branch 'master'. wayland/surface: don't clear fifo barrier on new commits Otherwise, the following sequence will cause presentation to be infinitely fast, despite fifo being used: - set_barrier - commit - commit - wait_barrier M +37 -0 autotests/integration/test_fifo.cpp M +1 -1 src/wayland/surface.cpp https://invent.kde.org/plasma/kwin/-/commit/fdd0a94e0013c0190e115a433588b294de4df144 Git commit 0480eb45adfe532888017cc1f36f23ba3d4dfca6 by Xaver Hugl. Committed on 29/08/2025 at 00:13. Pushed by zamundaaa into branch 'Plasma/6.4'. wayland/surface: don't clear fifo barrier on new commits Otherwise, the following sequence will cause presentation to be infinitely fast, despite fifo being used: - set_barrier - commit - commit - wait_barrier (cherry picked from commit fdd0a94e0013c0190e115a433588b294de4df144) Co-authored-by: Xaver Hugl <xaver.hugl@kde.org> M +37 -0 autotests/integration/test_fifo.cpp M +1 -1 src/wayland/surface.cpp https://invent.kde.org/plasma/kwin/-/commit/0480eb45adfe532888017cc1f36f23ba3d4dfca6 |