3 ms·
Windows solution to this is exclusive fullscreen, which bypasses the compositor. You can try Gamescope [1] from Valve, that's what Steam Deck uses - i think it
by zaptheimpaler 8mo ago
Windows solution to this is exclusive fullscreen, which bypasses the compositor.
You can try Gamescope [1] from Valve, that's what Steam Deck uses - i think its a compositor designed to minimize latency but support the few things games need. Some compositors like KDE Plasma KWin support a direct scanout mode which is the same idea as windows' exclusive fullscreen. You might need to look for support for something similar in niri.
[1] https://wiki.archlinux.org/title/Gamescope https://wiki.archlinux.org/title/Gamescope
- nickjj 8mo agoThanks, I have tried gamescope but it kills the performance of games for me. All games have a lot of stuttering when I use it. It also didn't reduce the input latency. Same hardware is liquid smooth on Windows. As far as I know niri enables direct scanout by default. It's an option you can disable if you want https://niri-wm.github.io/niri/Configuration%3A-Debug-Options.html#disable-direct-scanout https://niri-wm.github.io/niri/Configuration%3A-Debug-Option.... I do not have this set which indicates direct scanout is enabled. It's interesting because the latency is only when pressing keys on the keyboard. Mouse movement and button press latency feels as good as Windows, I can't perceive any delay. I tried 3 keyboards, it's all the same. I'm also not running anything like keyd or anything that intercepts keys. It's a vanilla Arch Linux system on both of the systems I tested.
- dietr1ch 8mo agoAre you perhaps being bit by Linux's default 2s USB-autosuspend? I bump that to 30s (60s?) in my kernel command line arguments
- nickjj 8mo agoIt is set to 2 seconds based on `cat /sys/module/usbcore/parameters/autosuspend` but the input latency only happens in games. Outside of games it's fine. Also in game, if I continue to press keys faster than waiting 2 seconds, it still lags. That makes it unlikely it's related to this auto suspend, especially since it only appears to happen when I use my 4k monitor, but I did set it to 30s just to rule it out and it made no difference. I brought it back to 2s afterwards.
- modeless 8mo agoYou don't need exclusive fullscreen on Windows to bypass the compositor. Fullscreen borderless windows also bypass the compositor. And in newer Windows versions the compositor can be bypassed even in regular windows using hardware overlays. Windows's desktop compositor DWM is actually very advanced, and I don't believe any Linux desktop compositor is anywhere close. It's one of the things I miss when leaving Windows.
- zaptheimpaler 8mo agoVery cool! Yeah I love borderless fullscreen mode, its very convenient.