Bug 513593

Summary: Mouse lag on Nvidia Optimus on Wayland
Product: [Plasma] kwin Reporter: Alberto Salvia Novella <es20490446e>
Component: libinputAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: es20490446e, ngoquang2708
Priority: NOR    
Version First Reported In: 6.5.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alberto Salvia Novella 2025-12-19 23:12:55 UTC
PROBLEM
- On Wayland, if you run any game on the dGPU, the mouse will experience severe input lag.

CAUSE
- The mouse is still rendered by the iGPU, which is unaware that the dGPU is running at maximum speed. So the iGPU stays at its lowest clocks.

TEST-CASE
1. Download: https://www.thedarkmod.com
2. Run it with: __GLX_VENDOR_LIBRARY_NAME="nvidia" ./thedarkmod.x64
3. Move the cursor around

SYSTEM
- Zenned OS
- Plasma 6.5.4
- Frameworks 6.21.0
- Qt 6.10.1
Comment 1 Alberto Salvia Novella 2025-12-19 23:16:41 UTC
Here's how to temporally max the iGPU clocks:

On Intel:
cat /sys/class/drm/card*/gt_RP0_freq_mhz | sudo tee /sys/class/drm/card*/gt_min_freq_mhz

On AMD:
echo performance | sudo tee /sys/class/drm/card*/device/power_dpm_force_performance_level
Comment 3 Alberto Salvia Novella 2025-12-19 23:28:24 UTC
Still I don't know if this shall be fixed in kwin, or in the nvidia-persistenced daemon in nvidia-open.

For the time being I have worked-around the bug on optimus-manager:
https://github.com/Askannz/optimus-manager/commit/d3376ef0a2fc2f5a9901790a8ee358125fc63951