Bug 472663 - Wayland compositor performance affects mouse cursor
Summary: Wayland compositor performance affects mouse cursor
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.27.6
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
: 463955 (view as bug list)
Depends on:
Reported: 2023-07-26 13:21 UTC by Linus Kardell
Modified: 2023-09-16 05:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Note You need to log in before you can comment on or make changes to this bug.
Description Linus Kardell 2023-07-26 13:21:27 UTC
When the kwin_wayland compositing can't keep up, it doesn't just make the desktop stutter, it also makes the cursor stutter. This can be noticed due to bug 452119, but I notice especially now because my laptop has switched to llvmpipe after an update for some reason, making kwin_wayland run at about 1-2 FPS. On X11, by contrast, the mouse cursor remains perfectly smooth even if the compositor performs poorly.

Operating System: openSUSE Tumbleweed 20230724
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.4-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
Memory: 29.3 Gibyte of RAM
Graphics Processor: llvmpipe
Manufacturer: Acer
Product Name: Aspire A315-41
System Version: V1.18
Comment 1 Zamundaaa 2023-07-31 15:31:31 UTC
This can't be fixed in the foreseeable future with llvmpipe as long as it doesn't support either implicit or explicit synchronization with KMS. Fixing it with other drivers is in the works though
Comment 2 Linus Kardell 2023-08-01 11:54:27 UTC
Is https://invent.kde.org/plasma/kwin/-/merge_requests/3828 supposed to improve this?
Comment 3 Zamundaaa 2023-08-01 14:13:37 UTC
I don't think it will make a big difference; it reduces latency when the system can keep up but otherwise it still requires rendering to be fast enough.
https://invent.kde.org/plasma/kwin/-/merge_requests/4268 will make it so that rendering being too slow will be less bad, but it will still drag the cursor refresh rate down to how fast the rest of the screen can render.
I'll close this bug report with a link to the merge request once there's one that actually makes big improvements in this area
Comment 4 Zamundaaa 2023-09-11 13:10:30 UTC
Git commit 4c397a95263d9c8e73d536ab1c2ac2caaeec60e2 by Xaver Hugl.
Committed on 11/09/2023 at 15:02.
Pushed by zamundaaa into branch 'master'.

backends/drm: split commits for the cursor and primary plane

And reorder and merge atomic commits where possible to ensure the cursor always
stays smooth

M  +29   -2    src/backends/drm/drm_commit.cpp
M  +9    -3    src/backends/drm/drm_commit.h
M  +99   -15   src/backends/drm/drm_commit_thread.cpp
M  +1    -0    src/backends/drm/drm_commit_thread.h
M  +45   -30   src/backends/drm/drm_pipeline.cpp
M  +1    -2    src/backends/drm/drm_pipeline.h

Comment 5 Fushan Wen 2023-09-16 05:05:45 UTC
*** Bug 463955 has been marked as a duplicate of this bug. ***