Steam for Linux

Steam for Linux

Is there any correlation between input lag and using X.Org/Wayland (gamescope in particular)?
So I'm somewhat an avid cs2 player (please don't look at my hours :lunar2019crylaughingpig:) and it's commonly agreed upon that cs2 has a bad input lag problem. Now, no matter if it's true or not, since the vast majority of cs2 players is using Windows it got me curious if using Linux is putting me at an advantage or disadvantage. I have no plans to switch to the inferior OS so I began to wonder if there is any way I can improve the situation on my setup.

Are Wayland compositors more or less responsive to input than X.Org? Any kind of research done on this topic, no matter small or large?

If they are indeed more responsive, it might actually be worth looking into setting up a separate gamescope session just for Steam. (no plans on fully switching to Wayland, I prefer X w/ i3 much more)

P.S. ChrisTitusTech highly recommends setting up gamescope so if there are any extra reasons to use it please let me know.
< >
Showing 1-5 of 5 comments
Since Wayland canonically synchronizes every frame you see on your screen, based on the refresh rate of the current display, and allows heterogeneous sync monitors to be used at once (two monitors of different refresh rates), on one you may perceive more lag for your input than in another. The newer work on allowing tearing (basically desynchronizing frames), should help alleviate the intrinsic lag brought by synchronization.

So, the academic answer should be Wayland has higher input lag compared to X11 when AllowTearing is not used, also Wayland use of libinput seems to be a tad different than X11's (not sure exactly how, though). Keep in mind also, that most games run on Wayland will be ran through XWayland (X11 being the back end), although Proton should pull the merge of Wayland support from upstream Wine, most native games will still use the X11 backend, although I'd expect CS2 to have native Wayland support alleviating the X11 on Wayland overhead.
Delofon 6 Jul @ 7:29pm 
CS2 uses SDL so it does have Wayland support.

However, in heterogenous refresh rate display setups does the synchronization affect higher refresh rate displays anyhow? What if only one display/refresh rate is in use so there is no need for this synchronization? (not my case though but assume it is) Would Wayland theoretically perform better in that case?
Cray 7 Jul @ 5:50am 
I had issues with wayland so I went back to xorg for gaming purposes, but what I do recall was that it was less snappy than xorg. Every howto/post/article I've come across with some technical merit seems to arrive at the same conclusion too: xorg is better for gaming, especially fps/snapping.

ps tip, try replacing libinput driver in xorg with evdev. I'm a bit fuzzy on the details, but as I recall, libinput sits on top of evdev as an added abstraction layer, and therefore will add some latency to input.

your xorg conf files will probably be found in one/both of these locations:
/etc/X11/xorg.conf.d/
/usr/share/X11/xorg.conf.d/

the conf files are loaded in priority order of numbering, 10 before 20 and so on, so make an early conf for keyboard and mouse, like 20-keyboard.conf and put this in:

Section "InputClass"
Identifier "My Keyboard"
MatchIsKeyboard "yes"

Driver "evdev"

Sorry that I can't remember where I got this from, I pour over too much stuff on a weekly basis to remember most of it when I'm done, but this gives you a start, hopefully, and with a bit of searching on arch forums etc. you should find some good further info.

My experience with it was that it lowered input latency. Snapping is fun, so hope it helps!
Last edited by Cray; 7 Jul @ 5:51am
Wayland was comparable to windows, maybe exactly the same. But ever since Nobara updated to KDE Plasma 6 Wayland has been unusable for the overwhelming majority of games do to very high input latency.

The situation has only gotten worse since, Wayland on Nobara now has higher input latency at the desktop aswell, beyond what is incurred by the V-sync, and the mouse cursor now stutters across the screen as though the polling and report rate have been greatly reduced.

When using X make sure to disable the compositor, to turn off V-sync.
Wayland has gotten a lot better, still pretty crap with input lag.
Last edited by LeviathanWon; 9 Jul @ 4:45am
< >
Showing 1-5 of 5 comments
Per page: 1530 50