Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK
Scientific analysis of Linux optimizations for gaming performance.
1Introduction
Gaming performance on Linux, especially regarding input latency and frame rates, can potentially surpass Windows. However, verifying these claims requires reliable measurement methods. This article explains how we measured latency performance of different Linux configurations using specialized hardware.
2Measurement Method
We developed a custom device consisting of a light sensor and USB-connected mouse simulator. By measuring the time between mouse click and screen change detection, we can measure true end-to-end system latency. This method provides objective data instead of subjective impressions.
3Tested Configurations
We compared three main configurations: X11 and Wayland display servers, Variable Refresh Rate (VRR) on/off states, and the low-latency version of DXVK. Thousands of measurements were taken for each configuration at 500Hz refresh rate.
4X11 vs. Wayland Results
Contrary to common belief, our tests showed that modern Wayland implementations don't have worse latency than X11. Particularly with KDE Plasma 6.7 and NVIDIA 610 drivers, Wayland delivered latency levels comparable to X11.
5VRR Impact
Variable Refresh Rate technology surprisingly didn't reduce latency in our tests. In fact, we sometimes got better latency results with VRR disabled. This suggests VRR doesn't provide expected benefits on high refresh rate monitors.
6DXVK Low-Latency Fork
The low-latency version of DXVK showed significant improvements, especially with VRR enabled. This fork optimized frame timing, delivering about 15% lower latency on average. Its integration with proton-cachyos package makes it easier to use.
7Hardware Configuration
Tests were conducted with AMD Ryzen 7 5800X3D CPU, NVIDIA RTX 4070 SUPER GPU, and 500Hz QD-OLED monitor. Only one monitor was connected, and background processes were minimized. This high-performance hardware made latency differences more noticeable.
8Software Environment
We used CachyOS distribution with custom kernel and proton-cachyos-native packages. KDE Plasma 6.7.2 desktop environment was configured with special NVIDIA settings for both X11 and Wayland. All tests were performed in fullscreen mode with focus.
9Flip Mode vs. Compositing
We examined differences between 'flip mode' (direct scanout) and compositing in Wayland. KWin Debug Console confirmed flip mode activation. Tests showed flip mode significantly reduces latency in Wayland.
10DXVK Configuration Details
Optimized dxvk.conf files were used for different scenarios. With VRR off, 500 FPS cap was set; with VRR on, 497 FPS cap was applied. Low-latency mode used special frame pacing settings with 480 FPS cap and 70ms offset.
11Result Reliability
Hundreds of measurements per test scenario ensured statistically significant results. The measurement device's 24µs resolution and 12,000 samples/click capacity guaranteed high accuracy.
12Conclusion and Recommendations
Tests show modern Linux systems can compete with Windows for gaming performance. Wayland is no longer worse than X11, DXVK low-latency fork provides noticeable improvement, while VRR doesn't deliver expected benefits on high refresh rate systems. For gaming performance, we recommend Wayland + DXVK low-latency combination.