Summary: | Compositor latency causes input lag | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | jackyzy823 |
Component: | input | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | duha.bugs, lee295012, nate, rolf.schroeder, xaver.hugl |
Priority: | NOR | ||
Version First Reported In: | 6.2.3 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | redacted-journal-log.txt |
Description
jackyzy823
2025-01-05 14:23:59 UTC
You're right, it is a Libinput issue. Generally when this happens, it's because Libinput enabled pointer hysteresis because it detected that the hardware wasn't providing great enough precision, which can also sometimes happen if the system is under load. IMO this is a terrible mis-feature and 100% of the time when it's triggered for me across four laptops, it's made the situation worse than it would have been without it. You can open a bug report about this at https://gitlab.freedesktop.org/libinput/libinput/-/issues Update: I opened a ticket on https://gitlab.freedesktop.org/libinput/libinput/-/issues/1074 when i encounter the problem the third time. and they said it is "not our bug" . > so the delay here is caused by the compositor, presumably because it's busy rendering things. I don't know what to do know. :( Some updates: due to 6.12+ kernels bug on glitching display, i revert to kernel 6.8.9 and the other KDE/plamsa components remain the newest. and seems that the input lag didn't happen again ( at least for two weeks) . So maybe we should blame on kernel ? Some updates: I encountered this again with 6.12.11-100.fc40.x86_64. in the log i found `Feb 19 00:12:42 code01 kernel: amdgpu 0000:62:00.0: [drm] *ERROR* dc_dmub_srv_log_diagnostic_data: DMCUB error - collecting diagnostic data` So i tried to restart amdgpu module (with the method in https://unix.stackexchange.com/a/553834) `sudo cat /sys/kernel/debug/dri/<GPU_ID>/amdgpu_gpu_recover` , and the system recovered , the lag disappeared. I believe I have the same issue. I am running the following system: ``` Operating System: NixOS 24.11 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.1 Kernel Version: 6.6.76 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 PRO 8840U w/ Radeon 780M Graphics Memory: 61.5 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 21MCCTO1WW System Version: ThinkPad T14 Gen 5 ``` The machine is completely new so I initially thought this was a hardware problem. I check Windows 11, tty1 as well as Ubuntu Live (24.04, X11) and none of the them could reproduce the lag. Since it works fine on tt1 (i.e. I do not feel any lag while typing), I presume it's KDE/Wayland related and no hardware issue. I could not find any obvious (error) messages related to amdgpu but `sudo cat /sys/kernel/debug/dri/<GPU_ID>/amdgpu_gpu_recover` seems to have helped here, too. I have GPU_ID 1 and 128 (i.e. two subfolders in .../dri) and only `cat` the first one. After a couple of minutes of playing around with the system, my impression is that get lag is gone. Thanks a lot! As a short update here: I currently have an alias `recover-amdgpu` (`sudo cat /sys/kernel/debug/dri/1/amdgpu_gpu_recover'`) which I only use when necessary. Because: At work, I connect the machine (Thinkpad T14) to a docking station (which has an external monitor connected to it) - here, I *never* experience the issue. When working without the docking station (i.e. "mobile"), I *always* have the problem. It manifests already during login (i.e. typing the password lags). The alias has work always except for a single time. Upon invocation, the screen turns black, comes back again and KDE reports a little information about "desktop effects" (not always). The one time it did not work, the screen turned off/on several times until eventually the command prompt appeared again. However, the lag did not go away. The only thing I did differently here was to activate the Night Light. I rebooted and `recover-amdgpu`'ed and it worked again (Night Light was then already enabled since I had activated in just before). For me, the problem is now gone. I am currently running Operating System: NixOS 24.11 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.2 Kernel Version: 6.6.85 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 PRO 8840U w/ Radeon 780M Graphics Memory: 61.5 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 21MCCTO1WW System Version: ThinkPad T14 Gen 5 I believe the problem only ever occurred with Night Light enabled (in the past). ok, cool |