Linux latency measurements and compositor tuning [KWin Wayland]
6 hours ago
- #Linux Gaming Latency
- #Click-to-Photon Measurement
- #KWin Optimization
- Measurement of click-to-photon latency on Linux vs Windows using Teensy microcontroller and light sensor
- Tests conducted on desktop and laptop with RTX Ada GPUs and Zen 4 CPUs, using NixOS and Windows 11
- Investigation reveals desktop profile issues, Zed editor adding latency to other apps when open
- LG display settings: Black Frame Insertion adds a frame of delay, HDR has minor effect, ALLM not supported on Linux
- Game latency tests: Doom Eternal (Vulkan), Borderlands 3 (DX11/DX12), Hades 2 (DX12)
- Recommendations include using wine_wayland, late FPS limiting, VKD3D_SWAPCHAIN_LATENCY_FRAMES=1 for DX12, and VRR
- Network gaming tests with USB/IP and Moonlight show Windows slightly more responsive
- KWin latency issues: busy clients affect other windows, high predicted render times due to safety margins and timer precision
- Patched KWin reduces latency by optimizing timer precision, safety margins, and render time predictions
- Future work includes submitting patches upstream, testing FIFO_LATEST_READY_EXT, improving wl_shm speed, and Vulkan optimizations