https://bugs.kde.org/show_bug.cgi?id=526735
Bug ID: 526735
Summary: Wayland/NVIDIA: cursor plane updates locked to 4.167ms
vblank cadence under 1000Hz input (0-4.7ms queuing
lag)
Classification: Plasma
Product: kwin
Version First 6.7.5
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: wayland-generic
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 196885
--> https://bugs.kde.org/attachment.cgi?id=196885&action=edit
Lag probe script
Summary:
On Wayland with NVIDIA atomic KMS, KWin commits hardware cursor plane position
updates strictly once per compositor frame (vblank cadence) rather than per
input event. With a 1000 Hz mouse on a 240 Hz display, cursor position changes
occur at a rigid 4.167 ± 0.16 ms cadence (960 updates in 4.0 s across 4008
mouse reports). This forces a uniform queuing delay (median 2.24 ms, max 4.74
ms) before pointer motion reaches the hardware plane, causing noticeable
pointer trailing compared to X11 (where pointer updates are applied immediately
per-event).
Steps to reproduce:
1. Environment: Plasma 6.7.5, Wayland session, NVIDIA RTX 4070 SUPER (driver
615.71.09), output DP-4 at 2560x1440 @ 239.992 Hz.
2. Continuously move a 1000 Hz polling rate mouse (verified via evdev: 1.000 ms
median inter-report interval, zero dropped reports).
3. Sample the hardware cursor plane state from
/sys/kernel/debug/dri/<nvidia-device>/state at ~3.5 kHz while simultaneously
logging evdev input events.
(Reproducer script attached: cursor_lag_probe.py)
Actual results:
- Input stream: 4008 motion reports in 4.00 s (~1002 Hz; median 1.000 ms, zero
dropped reports).
- Hardware cursor plane position changes: exactly 960 in 4.00 s (~240 Hz).
- Inter-update interval statistics: median 4.134 ms, mean 4.167 ms (exactly
1/240 s), std 0.161 ms, min 3.681 ms, max 4.743 ms (rigid frame-locked
cadence).
- Input-to-plane queuing latency (time from evdev motion report to next plane
position change):
median 2.236 ms, p10 0.579 ms, p90 3.919 ms, min 0.265 ms, max 4.740 ms.
- Subjective result: cursor noticeably lags behind hand motion in rhythm/FPS
games (e.g. osu!lazer). Under a Plasma X11 session on the exact same machine,
cursor updates feel instantaneous.
Expected results:
Under atomic KMS, cursor plane updates should be dispatched asynchronously /
per-event (matching the ~1000 Hz input stream) rather than coalesced to the
vblank frame commit, minimizing pointer lag to sub-millisecond levels.
Notes & Prior Reports:
- Bug 452117 ("mouse pointer is synchronized or not using hardware cursor") was
marked RESOLVED FIXED in 6.0, but frame-synchronized cursor plane updates
persist under atomic KMS on NVIDIA.
- Unlike Bug 525229 (which discussed cursor speed variation across frame
boundaries), this report specifically measures the input-to-plane latency
penalty imposed by frame-synchronized cursor commits.
- Workaround status: The suggested workaround `KWIN_DRM_NO_AMS=1` causes a hard
session freeze on NVIDIA driver 615.71.09 immediately after SDDM authentication
(requiring a hard power reset; verified via automated drop-in test).
- `KWIN_FORCE_SW_CURSOR=1` redirects rendering into the scene graph, but does
not solve the underlying ~1-frame latency.
Environment:
- Arch Linux, kernel 7.2.8-arch1-2 (PREEMPT_DYNAMIC, HZ=1000, high-res timers)
- Plasma 6.7.5, KWin 6.7.5, Qt 6.11.2, libinput 1.32.0-1
- NVIDIA GeForce RTX 4070 SUPER (AD104), proprietary driver 615.71.09
- Displays: DP-4 2560x1440 @ 239.992 Hz (primary), HDMI-A-2 1920x1080 @ 143.981
Hz
- kwinrc: allowTearing=true; Compositing type: OpenGL (EGL)
- Mouse: LAMZU wireless (1000 Hz verified via evdev)
--
You are receiving this mail because:
You are watching all bug changes.