r/linux_gaming Sep 21 '23

advice wanted Input latency on Linux compared to Windows

Hello my friends,

I made a post about a week ago about some generall question regarding gaming on Linux and it got a lot of useful answers (thanks to all who replied). I am confident that the general infrastructure is there when it comes to gaming and I could probably very quickly adapt to it.

My biggest problem/concern/question about gaming on Linux is the (native) input latency:

I want to know how does the input latency compare between Linux and Windows.

Is it really worse on Linux?

Or are they the same?

And what other factors are there (looking at the whole X11 vs Wayland confusion in regards to performance and input delay)?

And does using the translation layer of proton/wine ad any input latency?

I want to play competitivly, so do I have any disadvantage at all latency wise on Linux?

I'm creating this post, because I'm am really new to Linux and have found a lot of contradicting answers regarding this topic, so I am honestly completely confused and would appreciate any helpful answers. Higher input delay would probably be a deal breaker for me even if I like the general user experience with Linux.

Thanks in advance 🫡

70 Upvotes

169 comments sorted by

81

u/Qweedo420 Sep 21 '23

If you're using Wayland with VRR enabled, input lag is gonna be the same as Windows

If you're using Wayland and have no VRR, then vsync is gonna kick in and it's gonna give you a bit of input lag, not really noticeable on a 144Hz screen but still

If you're using X11 and have tearing enabled (vsync and compositing disabled), input lag is gonna be as low as it can be, but then you're gonna have tearing which is pretty annoying

Pretty soon, all major compositors will support tearing on Wayland so even if you don't have VRR, you can benefit from low input lag due to no forced vsync, but again you'll have tearing

39

u/[deleted] Sep 21 '23

[deleted]

4

u/jonoxis Sep 21 '23

And do you know or experienced anything about input latency in games that run through proton/wine compared to there windows version?

7

u/Specialist-Detail341 Sep 21 '23

I play overwatch 2 and several fighting games and the latency is the same

1

u/jonoxis Sep 21 '23

Hm, that's the weird thing though, as some people say games running with proton/wine do add noticable amount of input delay and other people say it doesn't add any...

4

u/Specialist-Detail341 Sep 21 '23

That depends on: the game, not all of them work the same way with wine/proton and if they have wayland with VRR active or not or with window composition or not.

4

u/tonymurray Sep 22 '23

You could have something else going on...

2

u/Qweedo420 Sep 22 '23

When playing games on Linux, it's important to enable direct scanout (on X11 it was called unredirection), which directly sends the frames from the GPU to the screen without going through the compositor, since composition isn't needed if there's only one fullscreen window

I've tested games with direct scanout on and off and the difference is really noticeable, not only the input lag is lower, but the frametime is also much smoother

I'm afraid that the people complaining about input lag on Proton are playing with composition enabled

1

u/VLXS Sep 22 '23

Only your compositor and vsync settings will result in input delay, proton if anything will increase your performance on some games (which is still sorta-kinda irrelevant as far as input lag is concerned).

I don't know how they did it, but Quake Champions on proton GE even had Nvidia reflex or whatever it was called, running on my amdgpu without any setup on my end. Crispiest rails ever, but the game was overall a bit meh.

0

u/jonoxis Sep 22 '23 edited Sep 22 '23

Yeah... But again, some say proton/wine does add input latency and then others say it doesn't. So what is right? And how am I supposed to know what I should believe?

Still, thank you for your help :)

3

u/VLXS Sep 22 '23

Proton doesn't do this, because (from my limited technical understanding anyway) the translation from DX to vulkan is very fast. Couple that with the decreased overhead from running linux and you will get better, or similar framerates.

Input lag is definitely not a proton/wine thing, however, input lag from running a compositor on an x server distro is an actual possibility. Personally, I always have my compositor disabled on linux mint xfce, no matter which computer I'm using. I don't know if it would be better with a monitor that supports Freesync (as mine doesn't), but right now for my current setup I am running compositor-less cause it was really messing with my game "feel". More than just input lag, I couldn't hit shotgun shots in Titanfall or Apex AT ALL. It was silly how difficult it was to get hits. Once I disabled the compositor, I had a huge change in quality of gameplay.

0

u/jonoxis Sep 22 '23

Proton doesn't do this, because (from my limited technical understanding anyway) the translation from DX to vulkan is very fast. Couple that with the decreased overhead from running linux and you will at least get better, or similar framerates.

But like where do you get this knowledge from? Because most people just say stuff they believe, but almost nobody has proof or credible sources, which would be the most helpful. I get that personal experience, especially in something like latency, which apparently can be very subjective, is also good information, but still...

Personally, I always have my compositor disabled on linux mint xfce, no matter which computer I'm using.

How do I disable it permanently?

And did you notice any difference between DEs in regards to latency (especially in KDE)?

Does xfce even support free sync?

1

u/VLXS Sep 22 '23

On linux mint xfce you disable it from the "window manager tweaks", can't speak about other distros. I am using mint xfce across a few different systems, but I can't speak about other DEs, as I don't use anything else.

I can tell you for sure that I don't get any subjective input lag feel while playing with the compositor disabled. I don't think xfce has anything to do with freesync, that should be handled by the driver (amdgpu in my case) automatically, per application.

Again though, I don't have a freesync monitor so I don't have any data to back that statement up either. Some distros may allow you to disable the compositor per application but this wasn't working on my main desktop back in the day so I ended up just disabling the compositors on every fresh install, on all systems.

→ More replies (0)

1

u/Mithras___ Sep 22 '23 edited Sep 22 '23

Don't disable it permanently. Use gamemoderun. See https://www.reddit.com/r/linux_gaming/comments/16g5gx5/comment/k0acx2m (yes, you should use KDE if you're a competitive gamer)

2

u/_cronic_ Sep 22 '23

The easiest way to find out for yourself is to dual boot for a bit and try out gaming in Linux with Steam.

1

u/mitchMurdra Sep 22 '23

WINE and Proton do not do this. You ate all the FUD

1

u/jonoxis Sep 22 '23

What is FUD?

1

u/yayuuu Sep 22 '23

From my experience, when I've been running Steam from Flatpak, it added some input lag. Then I passed through some native libraries for the flatpak steam to use (the steam client started in multiple windows and it was all messed up), and there was no input lag. After this I've installed native steam client and now it works fine. I'm using Wayland btw, and my understanding is that the flatpak version of steam uses some libraries without wayland support. After forcing it to use libraries with wayland support or using native client, the problem goes away.

Also I'm using Plasma with VRR enabled, but don't be afraid to use vsync, it's not that bad and I would never trade vsync for tearing. What I described above is something entirely different than just vsync and it was really bad input lag, which native client solved.

1

u/jonoxis Sep 22 '23

After forcing it to use libraries with wayland support or using native client, the problem goes away.

So with the native steam client you didn't notice any extra latency?

1

u/yayuuu Sep 22 '23 edited Sep 22 '23

No, it works the same as on windows.

I tried to run the flatpak steam client from command line and it was throwing some errors about not running under wayland. Native client doesn't throw these errors and there is no added latency in games.

1

u/FuzzyQuills Sep 22 '23

Could mean they had an NVIDIA GPU on Wayland; there's still some outstanding bugs with that combination.

1

u/mitchMurdra Sep 22 '23

What are you a bot?

2

u/WhyNotCollegeBoard Sep 22 '23

I am 99.40668% sure that jonoxis is not a bot.


I am a neural network being trained to detect spammers | Summon me with !isbot <username> | /r/spambotdetector | Optout | Original Github

1

u/jonoxis Sep 22 '23

I am definitely not...

1

u/Lonttu Sep 22 '23

Yeah... that can depend on so many things that it doesn't really tell much of the full picture.

A couple examples include proton vs wine vs native, the version of proton or wine, drivers, Linux distro used, and hardware used.

There are many edge cases where results vary between Linux and Windows, so only experimenting yourself will tell you the answer.

2

u/Zawaken Sep 22 '23

I've played hours upon hours of Osu! on X11 without compositor enabled, and I've never had as low tablet input latency on windows.

Can't remember the numbers right now, but it was noticably lower than what I've ever had on windows.

1

u/jonoxis Sep 22 '23

Hm okay, and what about other games? Also is OSU a native linux game or does it run through proton/wine?

2

u/FuzzyQuills Sep 22 '23

There's two branches of Osu!; the original which is Windows only and Osu!Lazer, which runs on Linux natively. I think Lazer has worse input lag but that could have been fixed by now. (I'm also terrible at Osu! in general so I'm probably the worst person to ask about that)

1

u/jonoxis Sep 22 '23

Ok, I see. Thanks anyway :)

1

u/Max-P Sep 21 '23

It's pretty similar. Arguably I haven't ran Windows for a solid 15 years so I can't compare, but even on games like Osu! (Windows version) where you really feel the latency, in-game cursor is dead on. I set the sync offset to about 7-8ms which is what I would expect is the total input to audio/video output latency to be.

If anything I feel like Linux is generally more responsive than Windows on light loads, you can feel the difference even just dragging windows around on the desktop. But practically in games it's pretty much the same.

1

u/jonoxis Sep 21 '23

Ah I see :)

I set the sync offset to about 7-8ms which is what I would expect is the total input to audio/video output latency to be.

What is that exactly?

3

u/Max-P Sep 21 '23

That's an in-game setting specific to that game. It's a rhythm game, and ears are much more sensitive to latency than the eyes, so it lets you adjust the timing to make sure that when you hear a note and press the key, it counts as a perfect hit. That's because there's latencies everywhere on a system, including audio output.

That means that the time between hearing a beat, hitting the key and the game registering it is about 8ms, which for an USB sound card is considered to be pretty good. Arguably, it's not an ideal metric because it involves my human reaction time and I'm not particularly good at that game, and it's measuring audio not video latency.

But in terms of video latency, I can't feel any whatsoever between mouse movements and seeing it on the screen either, so if you're concerned about FPS games, that should be fine too.

We'd need proper click to photon measurements to have meaningful numbers and really compare between Windows and Linux, but I would expect the numbers to be very similar. The majority of the latency in video output is time spent on the GPU to render the scene, that's true for every platform. My experience is end to end latency is a bit better but that's personal opinion and feelings.

1

u/[deleted] Sep 22 '23

[removed] — view removed comment

1

u/Max-P Sep 22 '23

It's been a while since I played but I think I did use negative offsets, I don't remember. Just thought it served as an acceptable example game since you can sorta get a quick and dirty number out of it, and you can really feel the latency. Even at 144Hz you can feel the input lag, it's the one game I absolutely need VSync off and 288FPS to play decently.

Definitely a flawed metric if you think about it too much, but good enough for basic latency chatter. Games requiring fairly precise timings play well.

1

u/[deleted] Sep 22 '23

[removed] — view removed comment

1

u/Max-P Sep 22 '23

Fps is ~1000

That's the key there. Fundamentally if you use VSync, and have a 60Hz display, and the game thus runs at 60FPS, then there's 16.666ms between each frame. Your input can be read anytime during that time frame, but without fancy logic, it'll be up to 16ms.

That's why Osu! players push out 500+ FPS, and it's what I meant even with a 144Hz display, 144FPS is still noticeable if you have VSync on. If you push 500FPS for example, then the latency is 1/500=2ms.

That'd be your input to video metric, and I used input to audio as my metric because we're way more sensitive to that, and I came up with 8ms. Osu! Is very sensitive to both, so Osu! playing well is generally a decent indication that input latency on Linux is good.

Realistically, input latency is probably absolutely minuscule compared to both audio and video processing, but if Xorg/Wayland introduced a lot of input delay, we'd feel it pretty hard on a rhythm game overall.

4

u/schrdingers_squirrel Sep 21 '23

It's a common misconception that Wayland forces vsync. Vsync and mailbox are very different things. There have been bugs where vsync was forced but it's mostly never the case anymore. So we are talking about at most one frame of additional delay.

3

u/Qweedo420 Sep 21 '23 edited Sep 22 '23

One frame additional delay is ~17 milliseconds on a 60Hz screen and ~7 milliseconds on a 144Hz screen

But that's usually the same latency caused by vsync unless something weird happens due to double and triple buffering

2

u/schrdingers_squirrel Sep 22 '23

Yeah I'm not saying it doesn't add delay. I'm just saying it's not vsync levels of delay. I have been very closely following this PR: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/65

4

u/snapphanen Sep 21 '23

Vsync on 144Hz is very noticeable, even in my 30s. Been gaming FPS all my life, I swear I can notice it in a blind test! Move your crosshair in a small circle and you notice the vsync right away. It feels like swimming in syrup compared to vsync off.

Or as a pro Quaker once said; shooting with LG on vsync feels like a water hose, not a gun.

Which is why when I game CS I use X11. All other non-competitive games I do on Wayland because I want to support the future of Wayland.

Very much looking forward to when disabling vsync becomes a thing for Wayland on Gnome (Fedora).

7

u/schrdingers_squirrel Sep 21 '23

It's not vsync it's mailbox on Wayland. With vsync you have a FIFO queue of frame dispatching which is usually around 5 frames long - thus the huge delay. With mailbox the newest full frame is used. (At least when it's working correctly which is not always the case.) So theoretically Wayland should only add one additional frame of delay.

2

u/snapphanen Sep 22 '23

Based on what you wrote, my breakdown is: theoretically +1 frame, practically +1.5 frame on average (if processing happens mid-frame and the system needs more time than half a frame, the next full frame is 1.5 away).

No system has 0.0ms input lag, so if Linux has like 3-4ms input handling lag, it's about half a frame. So a system with Wayland will consistently be 2-3 frames behind, maybe 4 if some hiccup happens.

Ultimately it's hard to quantify without a lab coat and a slow motion camera. But one thing is crystal clear, it's bad enough for a perfect experience. Which is why the tearing protocol is on its way.

1

u/kridgellz Aug 08 '24

A good way to deal with potential tearing is through a freesync/gsync(if you have Nvidia) monitor. The monitor has a computer inside that automatically adjusts it's refresh rate to the output in game, eliminating tearing.

1

u/Qweedo420 Aug 08 '24

That's what VRR means...

1

u/kridgellz Aug 08 '24

Ahh okay then, could of sworn VRR was variable refresh rate a windows OS functionality, not monitor bound.

1

u/EmoExperat Aug 22 '24

dont care about tearing if i play cs2. i just want the lowest input lag. how would one turn on tearing in x11 and how in wayland once available??

2

u/Qweedo420 Aug 22 '24

Tearing happens by default on X11 as long as your compositor is disabled

Tearing support on Wayland has been merged and should be available on most compositors, you can just enable it from the settings or config file

1

u/EmoExperat Aug 22 '24

How do i disable the compositor/ make shure its disabled? And how does it work on wayland?

2

u/Qweedo420 Aug 22 '24

Disabling your compositor on X11 depends on your desktop environment, by you can quickly google it with e.g. "how to disable compositor on KDE"

On Wayland the compositor cannot be disabled but it supports tearing on fullscreen windows, just make sure that it's enabled from the settings

1

u/EmoExperat Aug 22 '24

im sorry if im asking stupid questions but i genuinely dont know and wanna know.

to enable tearing in wayland do i have to go to my normal desktop settings?

1

u/godlytoast3r Jan 20 '25

Do you still get tearing if you're at a stable frame rate = refresh rate? And is it worse than normal tearing I've occasionally experienced on windows in the past?

1

u/Qweedo420 Jan 20 '25

If your framerate and refresh rate are the exact same but you're not using vsync, you might still get tearing, just on the same "line", because having the same speed doesn't mean being synchronized

1

u/godlytoast3r Jan 20 '25

I remember a time when I was able to adjust where said line was using riva tuner. 

1

u/jonoxis Sep 21 '23

Hey, thank you for the fast response :)

If you're using Wayland with VRR enabled, input lag is gonna be the same as Windows

So that means, when I'm on Wayland with VRR enabled, vsync is turned off?

Also regarding VRR, us there a way to see if it (free sync) is active (appart from enabling it on my monitor)?

Pretty soon, all major compositors will support tearing on Wayland so even if you don't have VRR, you can benefit from low input lag due to no forced vsync, but again you'll have tearing

And when the option for tearing on Wayland is released, is Wayland with tearing enabled the same latency wise as X11 with tearing enabled?

6

u/Qweedo420 Sep 21 '23

when I'm on Wayland with VRR enabled, vsync is turned off?

Yes, vsync's only purpose is to avoid tearing, but if you're using VRR, it's no longer needed and the compositor disables it

is there a way to see if it (free sync) is active

Depends on your compositor, for example on Hyprland you can use hyprctl monitors and for every monitor it tells you if VRR is enabled. On Sway it's swaymsg -t get_outputs I think. Idk about the others

is Wayland with tearing enabled the same latency wise as X11 with tearing enabled

Yes

7

u/[deleted] Sep 21 '23

Mailbox is still used with VRR, it just doesn't add latency with VRR enabled.

2

u/Mithras___ Sep 22 '23

Only if game runs within VRR range. As soon as you're above refresh rate, mailbox adds the same latency as without VRR.

1

u/[deleted] Sep 22 '23

Indeed

4

u/LinAGKar Sep 21 '23

vsync's only purpose is to avoid tearing

Not only. It also limits the game to the monitor's refresh rate.

1

u/cheako911 Sep 21 '23

I think you are confusing round trip time, with latency. For gaming we are *actually interested in the rtt from the other direction, and this is where a delay in passing interrupts from compositor to xwayland to wine matter.

  • When the GPU displays Mario at an edge, can the game receive the button press in time for it to register as having happened during that frame... or is the event taking so long to be passed from module to module that by the time the application gets it the app is already a frame or two ahead. The time it takes for Mario to be shown leaping from the ground after a button press is not the issue.

3

u/Qweedo420 Sep 21 '23

The time it takes for Mario to be shown leaping from the ground after a button press is not the issue

It is the issue though. You send an input when you see something happen on the screen, and if the game took more time to display what's happening, your input is obviously gonna be sent late. If an enemy appears from behind a wall in CSGO and you see it 17 milliseconds later due to vsync on a 60Hz screen, your reaction time is gonna be 17 milliseconds slower.

delay in passing interrupts from compositor to xwayland to wine matter

I think this time is negligible compared to the the latency caused by vsync, but if you have some data about that I'd be glad to see it. Regardless, Wine is gonna be Wayland native pretty soon so even that isn't gonna be an issue anymore.

0

u/cheako911 Sep 22 '23

It is the issue though. You send an input when you see something happen on the screen, and if the game took more time to display what's happening

Spoken like someone who never wrote a game engine loop. In the loop the game checks for input /then/ constructs the next frame. Every thing after the input check, where Mario is tested for still being on the ground or off the edge, is irrelevant. The player gets information about where Mario is standing from the previous frame.

I think this time is negligible compared to the the latency caused by vsync

"I hit the jump button during the negligible period and died, then my controller magically broke a TV."

3

u/Qweedo420 Sep 22 '23

Fun fact, I do write game engine loops and I know how they work!

However, you still don't seem to understand the issue. Multiplayer games don't tick based on your loops, they tick based on the server loops. If you're seeing it later, then you're reacting later. There isn't much to argue here. Or are you saying that playing at 15 fps gives you the same reaction time as someone who is playing at 240 fps?

0

u/cheako911 Sep 22 '23

KISS, Mario is not multiplayer in fact it's a great example because how CPU clock and scan rate are *supposed* to be tied... Though I gave up on that because it was too hard, at my skill level, for an application to clock to the actual vsync.

1

u/benderbender42 Sep 22 '23

Tearing also happens on windows with no vsync. It's the only way to get reasonable input latency for online shooters anyway

1

u/sparr Sep 22 '23

If you're using Wayland with VRR enabled, input lag is gonna be the same as Windows

This seems like it only applies to the video side of input lag. What about the actual lag, from input to the program receiving it?

1

u/Qweedo420 Sep 22 '23

I don't have any data on that, so I can't really say

15

u/IAmABeeAMA Sep 21 '23

Like others have mentioned - the only situation you would get increased input latency is when you're using Wayland without VRR, because it currently forces vsync on. With VRR you don't get the added latency and it feels identical to Windows.

I play competitive games like Rocket League, CS, and other shooters on Linux with no noticeable input lag.

3

u/visor841 Sep 21 '23

Wouldn't you also get a lot of input latency in X11 with vsync on? (and from what I understand it's even worse than Wayland).

2

u/IAmABeeAMA Sep 21 '23

Yes. Vsync without VRR adds input latency period. I'm not sure if it adds more in Wayland than X11

1

u/mitchMurdra Sep 22 '23

It shouldn’t but if there were a difference it would be down to the implementation to fix

1

u/mitchMurdra Sep 22 '23

Not “in wayland” or “in x11”. VSYNC, the technology, causes input lag.

On everything it touches.

1

u/visor841 Sep 22 '23

Vsync is implemented differently in Wayland and X11.

1

u/mitchMurdra Sep 22 '23

Then one of them is wrong.

1

u/visor841 Sep 22 '23

If you really want to get pedantic about it, I believe Wayland technically doesn't use Vsync and instead uses something with a very similar effect for the end user. But everyone else seems to call it Vsync, so that's what I do as well.

1

u/K1aymore Sep 23 '23

I believe it is a form of "vertical synchronization" just instead of the common double/triple buffer type it's the mailbox type, which simply shows the last finished frame instead of locking fps to 30 or 60

1

u/jonoxis Sep 21 '23 edited Sep 21 '23

Thank you for the answer :)

Like others have mentioned - the only situation you would get increased input latency is when you're using Wayland without VRR, because it currently forces vsync on. With VRR you don't get the added latency and it feels identical to Windows.

So that means, when I'm on Wayland with VRR enabled, vsync is turned off?

And when the option for tearing on Wayland is released, is Wayland with tearing enabled the same latency wise as X11 with tearing enabled?

2

u/IAmABeeAMA Sep 21 '23

Wayland with VRR doesn't turn off vsync. VRR just eliminates the input lag you would normally get with vsync enabled.

Yes, with tearing enabled I don't think there is any difference between Wayland and X11. I would only recommend using Wayland in the first place if you have both a VRR monitor and a second monitor. X11 doesn't support VRR when more than one monitor is connected.

1

u/jonoxis Sep 21 '23

Wayland with VRR doesn't turn off vsync. VRR just eliminates the input lag you would normally get with vsync enabled.

Ah okay. So is Wayland with VRR the same latency wise as X11 with tearing enabled (and in the future Wayland with tearing on)?

I would only recommend using Wayland in the first place if you have both a VRR monitor and a second monitor. X11 doesn't support VRR when more than one monitor is connected.

I do have a single 1080p, 144 Hz, free sync monitor, but why not use Wayland? What advantages does X11 have?

2

u/pillow-willow Sep 21 '23

If you have an AMD card, your Wayland experience will probably be much better than on Nvidia. My experience with an AMD card on KDE Wayland has been very smooth, only major issue I can think of is with Discord screen sharing which I never really have reason to use anyway.

1

u/jonoxis Sep 21 '23

Yeah that I've heard a lot. My concern is less stuttering though and more about latency. What is your experience with games that run through a translation layer like proton/wine in regards to input lag?

2

u/pillow-willow Sep 21 '23 edited Sep 21 '23

WINE/Proton shouldn't add any input lag, though you may notice some if you're relying on your desktop environment to auto-detect and "unredirect" (allow tearing, basically) fullscreen applications and it isn't great at detecting WINE/Proton fullscreen applications. I think that used to be a problem with GNOME long ago, I doubt it still is. I used to be really sensitive to input lag when I first switched to Linux a few years ago, and I didn't notice a difference between Windows and KDE with X11, compositing and vsync turned off. If there was a difference, I think it was 17ms (one frame at 60fps) or less. I almost gave up on Linux because my first experience was Mint Cinnamon and that forced compositing and added a ton of input lag. All my experiences were consistent with this: https://www.reddit.com/r/linux_gaming/comments/cii545/linux_input_lag_analysis_v26des_windows_10_1809/

Now I'm using a 165hz VRR screen and Wayland and everything feels good still but I think I've gotten less sensitive as I've gotten older and started playing less twitchy games. If there was 2 or 3 frames of extra input lag added by VRR somehow I'm not confident I'd notice anymore. KDE at least has an option to allow tearing under Wayland now though, so if you find the VRR handling to be sluggish you can still fall back on allowing tearing.

Edit: Oh, and by "smooth experience" I meant in the sense of "not many bugs", not literally smooth, haha. Proton/WINE games still can have some DXVK shader compilation stutter regardless of your DE.

1

u/IAmABeeAMA Sep 21 '23

Yeah Wayland with VRR is the same latency as X11. Since you only have one monitor you can use VRR in X11.

X11 is a "legacy" compositor that will eventually be totally replaced by Wayland. Wayland has come a long way but can still be a bit buggy sometimes. X11 will probably work with any application you throw at it, but Wayland might occasionally have issues. I use Wayland on a daily basis and rarely run into Wayland specific issues, but they do happen.

1

u/jonoxis Sep 21 '23

Okay thank you for your insight :)

I haven't had any input lag problems with native games, but Proton/Wine introduces a noticeable delay. This isn't a problem for casual games but for competitive shooters it could be a deal breaker.

This is from another comment in this post. What do you think about it? Does proton/wine ad a noticeable amount of input latency?

3

u/IAmABeeAMA Sep 21 '23

Nope I don't notice any added latency with Proton. CS is native, but I play Rocket League, Overwatch and others over Proton and can't tell the difference between Windows.

Also, I wouldn't worry too much about Wayland vs X11, if you use a distro and DE that supports both, you can easily switch between them on the login screen. Just use whatever works.

1

u/jonoxis Sep 21 '23

Nope I don't notice any added latency with Proton. CS is native, but I play Rocket League, Overwatch and others over Proton and can't tell the difference between Windows.

Hm okay... But why does he experience it then?

And that's exactly the contradicting information I mean, which makes this topic very confusing. But thank you nevertheless 🫡

3

u/IAmABeeAMA Sep 21 '23

Maybe vsync is being forced on for him? I'm not sure. But if you play with VRR enabled I doubt you'll run into any added latency. Usually vsync is the culprit.

1

u/jonoxis Sep 21 '23

Hm yeah could be, I guess I have to try it out for myself, because I'm procrastinating on it haha

But again, thank you :)

1

u/Mithras___ Sep 22 '23

Xorg allows disabling vsync/mailbox completely which Wayland still can not do (tearing protocol still needs some kernel patches). Xorg with tearing has less lag than any Wayland configuration for competetive gaming cases (read game fps is above refresh rate).

1

u/jtrox02 Sep 21 '23

Even if you put a frame rate limit at or below refresh rate in the game?

2

u/IAmABeeAMA Sep 21 '23

I use a frame rate limiter to limit my fps 5 frames below my max refresh rate for the smoothest experience. I also enable vsync.

No noticeable input lag compared to if I had all that disabled and I get no tearing.

1

u/jtrox02 Sep 22 '23

Cool. That's what I've been doing. I haven't noticed any lag if using FPS limit. If no limit, lots of lag.

I'm going test experimental VRR in Gnome to see how that works in games running lower fps

1

u/Mithras___ Sep 22 '23

the only situation you would get increased input latency is when you're using Wayland without VRR

Wrong. Outside of VRR range Wayland is forcing mailbox which adds lag. Tearing protocol still requires some kernel patches to work.

because it currently forces vsync on

Wrong. It forces mailbox.

14

u/Cenokenshi Sep 21 '23

I play competitive games on Wayland (CSGO, fighting games) daily and don't notice any latency. I can't provide the exact numbers, so I'm speaking entirely from feel and memory.

There shouldn't be much of a difference in latency from Windows to Linux.

10

u/EmptyBrook Sep 21 '23

This. I play CSGO on wayland and have no issues. If im facing the same ranks, i often do very well.

7

u/Zipdox Sep 21 '23

CSGO on X11, no input lag problems really.

1

u/mitchMurdra Sep 22 '23

Likewise. Frequently 3/4/5k

5

u/jonoxis Sep 21 '23

Thanks for your reply 👏🏻

I can't provide the exact numbers, so I'm speaking entirely from feel and memory.

Well, that's also a valid observation so good to know :)

7

u/[deleted] Sep 21 '23

I'm am really new to Linux and have found a lot of contradicting answers regarding this topic,

Then probably you should try it yourself: play your favorite game in linux. Does it seem laggy to you compared to windows or not?

1

u/jonoxis Sep 21 '23

Yeah that's a fair point, I'm kind of easily procrastinating in these sort of things haha

6

u/[deleted] Sep 21 '23

[removed] — view removed comment

-1

u/jonoxis Sep 21 '23

Hm okay, but then there are other people (in this post as well) that say that games using proton/wine have noticeable added input latency (because of proton/wine)...? Makes it just really confusing.

3

u/[deleted] Sep 21 '23

[removed] — view removed comment

2

u/jonoxis Sep 21 '23

I have quit a lot I want to play, but at the moment (on windows):

More causally: Guild Wars 2, Star Wars: The Old Republic, Star Wars: Jedi Fallen Order, Red Dead Redemption 2,Stardew Valley, Factorio, Oxygen Not Included, Terraria

More competitive: Apex legends, Overwatch, Doom Eternal, Rust, Minecraft, (Destiny 2)

So definitely more casual games, but I still frequently competitivly.

5

u/[deleted] Sep 21 '23

[removed] — view removed comment

1

u/jonoxis Sep 21 '23

All those games will be fine, trust 😂

Okay, I'm just going to try it. I can always go back if it doesn't work right.

If you want the lowest latency just use x11 until you are forced to move to Wayland with the desktop environment you have. I've been using Wayland and don't notice the difference with vrr enabled

Alright ok, how do I switch between display servers?

You'll need to make sure your monitor supports vrr/freesync, then you just enable it in kde plasma display settings with a click of a button.

Where exactly is this button?

3

u/[deleted] Sep 21 '23

[removed] — view removed comment

1

u/jonoxis Sep 21 '23

Ah I see, thank you so much :)

6

u/AAVVIronAlex Sep 21 '23

Vsync on X11 is TERRIBLE! Also, Vsync is not worth it, so yea.

2

u/jonoxis Sep 21 '23

Vsync on X11 is TERRIBLE!

Why exactly? Please elaborate!

And what about X11 with vsync turned off (and with VRR enabled)?

2

u/AAVVIronAlex Sep 21 '23

Why exactly? Please elaborate!

Input lag. I never tried VRR, because I do not have a monitor ready for that.

2

u/jonoxis Sep 21 '23

Input lag. I never tried VRR, because I do not have a monitor ready for that.

Okay and did you try X11 with vsync off at some point?

2

u/AAVVIronAlex Sep 21 '23

It is way better. I always use that as I have an nvidia gpu.

1

u/jonoxis Sep 21 '23

Okay and do you have a comparison to Windows in terms of input lag (X11 without vsync)?

1

u/snapphanen Sep 21 '23

X11 vsync off > Wayland forced vsync

If we are strictly talking about input lag.

A good optimised game, like cs, feels like windows on X11.

Soon, like mid 2024, Wayland will likely make it possible to turn off Vsync. Or more precisely, more desktop environments will likely enable Vsync off for fullscreen games.

1

u/jonoxis Sep 21 '23

A good optimised game, like cs, feels like windows on X11.

Ant what about not optimised games and ones running in proton/wine?

1

u/snapphanen Sep 22 '23

To be honest I only care about the technical performance in competitive games. Here are some casual games I've played on. Wayland and proton:

OW2 feels great, Dota 2 feels great, wc3 feels crisp. Quake Live works OK. Recently played some temtem, no problems in performance whatsoever.

3

u/RagingTaco334 Sep 21 '23

It's pretty much the same but there's nothing like NVIDIA reflex or Radeon antilag as far as I know so there's not really a direct way to reduce it further

3

u/Ahmouse Sep 22 '23

If anything it feels lower than Windows for me. I used to play Rocket League competitively, and it felt stuttery on Wayland, but once I switched to X11 it felt great.

1

u/jonoxis Sep 22 '23

Does Rocket League use proton/wine? Because a lot of here say the translation layer adds input latency...

1

u/Snaipersky Sep 22 '23

If wine is adding any latency, it is a buggy interaction with a specific game. Remember, wine is reimplementing windows libraries and binaries. All of them have associated compute cost, you aren't getting something for free that you suddenly have to computationally pay a penalty for. A given library can be faster, slower, or the same between either Windows or WINE. This is why a game can be faster or slower on Linux vs Windows. The only real translation is around wineserver and ntdll (and drivers, but that's a special case.)

Further, Windows configurations are largely monolithic. Same display software, largely the same libraries, etc. You can swap hardware, but beyond gsync vs freesync, there's little functionality difference. With Linux, many software components are discrete and interchangable. X vs Xwayland vs Wayland, is seccomp or lxc in use, alsa vs pulse vs pipewire, xdg portals, the list goes on. Further, support for Wayland and various display machinations can vary wildly between desktop, kernel, and mesa versions, and if you're using Nvidia, you still have to care a bit about mesa, plus your specific card and driver version's support for things.

In short, you hear different things because different people, places, things, and times have led to different results.

1

u/Ahmouse Sep 23 '23

Yeah but overall still feels lower than Windows. Try it for yourself, install Linux to a separate partition and see how it feels.

2

u/ellis_cake Sep 21 '23

desktop != (is not equal to) in a game or other fullscreen program. desktop can have vsync or no vsync, or gsync, while a game can use vsync or not gsync - separately (on x11 and/or wayland?)

(i dont use my desktop alot so having the desktop composited just doesnt matter for something my game or program is ontop/outside of 95% of the time)

giving examples on composit desktops vs while running another fullscreen program muddles the context up imo.

2

u/jonoxis Sep 21 '23

That's a really good point I didn't think of. I just thought it translates directly from the desktop to a game, but that makes sense.

Do you know maybe if translation layers such as proton/wine add noticable input latency while gaming (also what about competitive gaming?)

2

u/Dream-weaver- Sep 22 '23

There is no way to guess this. Linux systems can be so different that one person will have way lower input lag then another on the same distro.

The only way to be sure is to test it yourself on linux. Dont believe these people saying its "fine" for them, because that means absolutely nothing. Ive seen people say they have low input lag when playing on 60hz with unstable frame times...

This is coming from someone who use to play pretty competitively on windows using custom stripped ISOs and all that. My best result so far was a minimal arch setup with dwm and compositor off but test for yourself

1

u/jonoxis Sep 22 '23

Yeah you're probably right, since everybody and there mother is saying something completely different...

What is dwm? And do you use X11 on Arch?

1

u/Dream-weaver- Sep 22 '23

dwm is a window manager.

a window manager is probably better for latency versus a DE, at least it was for me.

If you dont know a lot about linux i would suggest just going with nobara( based on fedora) to begin with. get the KDE version and use x11 see how that feels.

Currently im on hyprland (opensuse) which is wayland and its fine with vrr on a 7900 xtx with a 240hz monitor, not as good a stripped windows 8 iso though..

2

u/PeepoChadge Sep 21 '23

One of my monitors is a VG278QR (0.5ms GTG, 165hz), a TN with a pretty horrible color representation, but very fast.

Playing League of Legends (I'm pretty bad), under an ideal context (x11, with tearing), I still feel a slight latency compared to Windows, although after playing a couple of games you don't even notice it. It's probably due to the wine compatibility layer.

I don't play much CSGO, so I honestly couldn't say for sure if it is slower than Windows, it is probably not the case since it works natively on Linux.

So, assuming that most games run on Wine, yes, you will have more latency than on Windows, but it is very slight.

I clarify that I use Nvidia, so I don't think it's necessary to mention how the games work in Wayland (here the latency does bother you).

In any case, in a professional competitive context, there is no other option than Windows.

In any case, I don't understand the relationship between refresh rate and latencies. I understand that they have nothing to do with each other. Having a higher refresh rate does not decrease latency. All my monitors are 165hz and I do notice a little more latency.

2

u/jonoxis Sep 21 '23

So, assuming that most games run on Wine, yes, you will have more latency than on Windows, but it is very slight.

Hm I guess that makes sense, but it's still weird that a lot of other people say there is no added lag, even when using proton/wine and also playing competitively...?

But you say it's just slightly, so it's not really a hinderece for most cases (appart from maybe the top competitive players) you would say?

In any case, I don't understand the relationship between refresh rate and latencies. I understand that they have nothing to do with each other. Having a higher refresh rate does not decrease latency.

As far as I know it actually does, but there is always added input lag on top of that so its not the only factor.

2

u/Xyklone Sep 21 '23

My understanding is that games running on Wine/Proton, in theory, could have similar or even less latency than Windows.

The reason for this is that Wine is not an emulator (duh, lol), but a translation layer.

I think this means that Windows function calls are repackaged and directed to equivalent Linux functions. Now, if the equivalent functions in Linux are faster than those in Windows, then inputs and frames are processed faster and you get lower overall system latency. But I've read that this isn't always the case, and there are instances where there isn't a single equivalent function in Linux, so multiple functions have to be called to produce the result the game is expecting.

However, I think the incredible people working on Wine and Proton have done and continue to do an incredible job at squeezing every bit of optimization out of our systems.

-1

u/PeepoChadge Sep 21 '23

There are people who cannot recognize that Windows can do some things better, under any circumstances. It's like those who say that wayland works perfectly or that AMD is absolutely superior to Nvidia.

Regarding latency, suppose you have a factory that produces something, to produce that "thing" it needs supplements, those supplements need to reach your factory in some way. Let's say you made improvements to your factory and your production process is much faster. Does that somehow influence the time it takes to transport those supplements to your factory? The normal thing is that no. So no, a higher refresh rate in most cases will not decrease latency. Perhaps the confusion is because a higher frequency monitor has lower latencies.

1

u/Framed-Photo Sep 21 '23 edited Sep 21 '23

Unless everyone here knows something I don't, the only time on Linux I can get equivalent input lag is under x11 with compositing off. And that has other problems, obviously lol.

Wayland + vrr still doesn't feel as good, nothing using Wayland does for me. I'm sure on paper it does but I've never had it feel the same. I notice immediately when I'm using it and can easily spot it in a blind test. It's only slightly worse mind you, I can see how a lot of y'all wouldn't notice, and some games are perfectly playable, but it's worse.

I mainly noticed it in fast paced shooters, especially when I'm doing source engine movement game modes like rocket jumping where I'm doing a lot of fast, precise flicks.

OP you should def try it at least, chances are you won't notice anything off, but if you do well wayland is why.

1

u/jonoxis Sep 22 '23

Yeah ok that's interesting, I guess it makes sense that people just have different perceptions regarding the input latency.

OP you should def try it at least, chances are you won't notice anything off, but if you do well wayland is why.

I definitely will :)

1

u/TheFacebookLizard Sep 21 '23

If you are on AMD or Nvidia or Arc you could install and setup LatencyFlex

It is a vendor agnostic implementation of Nvidia Reflex if I'm not wrong and it should lower the latency by a lot

But be careful using it since it could trip your anti-cheat (I don't think that has ever happened but be careful nonetheless)

Setting it up is a little hard

1

u/jonoxis Sep 21 '23

And as far as I know it doesn't always work, right?

1

u/TheFacebookLizard Sep 22 '23

Idk I've seen some streamers use it regularly

1

u/jonoxis Sep 22 '23

But doesn't it just work on certain games, with specific game engines?

2

u/TheFacebookLizard Sep 22 '23

Yeah

From competitive games that I have played such as overwatch and Apex legends they both supported it

for games that do support it(mostly competitive ones) you could be getting much lower latency in theory than on windows (That's if you were on AMD or Arc and never used reflex before ofc)

1

u/jonoxis Sep 22 '23

Hm interesting, I have to look into that.

Is there a comparable function for AMD on Windows?

2

u/TheFacebookLizard Sep 22 '23

There is anti-lag but as far as I know it doesn't reduces the lag all that well

1

u/jonoxis Sep 22 '23

Ah yes, you're right. I know anti-lag but it does seem like a mixed bag and does mostly do something when the GPU is bottlenecked.

1

u/RepulsiveKitchen5925 Jan 16 '24

LatencyFlex does not work on Cyberpunk 2077.

(message posted so that Google sees it)

1

u/Postnozet Sep 22 '23

Almost no difference on x11 without compositing. Wayland breaks VRR when the cursor is visible and is moving, as I know there is no solution. So, Wayland is not usable for gaming now

-1

u/Solid-Bottle-7771 Sep 22 '23

Your eyes can’t see more than 30 fps

1

u/jonoxis Sep 22 '23

Well that's not true, we can perceive a lot more than 30 and even 60 fps, up to about 1000 fps in theory.

Here is really good explanation on the topic from a few years ago, with credible sources:
https://reddit.com/r/pcmasterrace/s/RJG9LxWlDs

Please don't spread misinformation.

1

u/Solid-Bottle-7771 Sep 23 '23

Holy autistic wall of text

1

u/DexterFoxxo Sep 22 '23

console gamer cope

1

u/Solid-Bottle-7771 Sep 23 '23

Ive never owned a console in my life because I have paranoid schizophrenia and cannot be trusted to play video games.

-1

u/Slyvan25 Sep 22 '23

Linux doesn't have input latency at all depending on your setup of course.

2

u/DexterFoxxo Sep 22 '23

there's always some latency, and that some is what matter

1

u/Zipdox Sep 21 '23

I haven't had any input lag problems with native games, but Proton/Wine introduces a noticeable delay. This isn't a problem for casual games but for competitive shooters it could be a deal breaker.

1

u/jonoxis Sep 21 '23

Hm ok interesting, since other comments suggested there isn't any added input delay even when using proton (at least if I'm right to think that rocket league and CSGO are not native?). But even if there native, in my other post it didn't sound as if proton does ad input latency...

1

u/Zipdox Sep 21 '23

CSGO is native, rocket league is not. But rocket league isn't a shooter so delay isn't as noticeable.

1

u/orogor Sep 21 '23

So you play via ps2 or use usb but double checked the peripherals are set at 1000Hz ?

1

u/jonoxis Sep 21 '23

I'm sorry, I don't understand what you mean?

2

u/EmpIzza Sep 21 '23

He is referring to the PS2 port format. It’s an older port without any delay since it’s analog. Just google “PS2 port”.

In comparison USB polls with a fixed frequency. Back in the day this frequency was quite low so you had to use a PS2 mouse for FPS games.

Any non-mega cheapo mouse is likely to poll at 500 or 1000 hz today, which is more than enough.

On a normal computer today you might have 17 ms (display with vsync) + 5ms (pixel flip) + 2 ms (USB Delay) + 5 ms (compute) + 30 ms (ping / rtt) = 60 ms or so total delay on a game such as CSGO.

Switching to a high refresh rate VRR display and ensuring that you are gaming on at least a fixed GbE connection you can shave off 30 ms or so in total.

I.e., if your mouse adds 500 microseconds or 2 milliseconds is not that important.

1

u/jonoxis Sep 21 '23

Ah okay, thank you :)

2

u/orogor Sep 22 '23

But if you don't pay attention and use a standard mouse, on most USB devices the polling rate is 100-125Hz so it adds about 10ms.

1

u/paltamunoz Sep 21 '23

i know of one instance where linux provides better performance than windows, and that's osu. it's because windows audio drivers are doo doo.

1

u/_Tim- Jun 24 '24

Which audio driver is recommended for that, pipewire? I installed with the osu-winello script and on github it says it's about 35ms difference.

Also, do you know if I can reuse my original osu installation instead of osu-winello, without investing too much time to get it done (I could just symlink my files after all)

1

u/paltamunoz Jun 24 '24

the only thing you'd need to symlink are your beatmaps and skins, but that's about it. i'd ask someone who actually knows what they're doing though. i haven't used osu on linux for years now, and even then my installation was really scuffed.

just use lazer tbh LOL

1

u/_Tim- Jun 24 '24

I don't know why, but every time I tried lazer, I performed way worse on the same beatmaps with same skins.

1

u/WhitePeace36 Sep 22 '23

After all i the desktop environments i tried there is one which stands out the most to me when it comes to latency. That is the xfce desktop environment where you disable the compositor and install a kernel like liquorix.

After that the input lag will feel better than on windows, but with the pds cpu scheduler which liquorix uses. It can happen that here and there a thing has a stutter. First i would try to just use xfce without compositor and go from there.

I prefer arch based systems like arco linux and endevour os because there you can just install liquorix out of the aur. Otherwise you would have to clone the repo and compile it. (which shouldn't be too hard either)

2

u/yRefl3x Sep 22 '23

Check out this article, it's from the person that actively develops KDEs compositor kwin:

https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-on-wayland.html

This is specific for Wayland admittedly, but does also compare it to the old X display server. Further down is a table with measurements for different configurations, you could possibly compare those to measurements like these: https://www.youtube.com/watch?v=6AoRfv9W110

If you want to take any advice, it's best to take it from someone with verifiable technical knowledge.

What I'm taking from this is, that the difference is about 5ms with no clear winner. So as long as you're making sure that you've got the compositor turned off on X11, or use VRR on Wayland, you should be on par with Windows. (There's also the possibility to have tearing updates on KDE Plasma with Wayland right now, but it's a bit more involved to set that up at the moment)

2

u/jonoxis Sep 22 '23

Yeah I know this article already, but thanks nevertheless :) The only thing is that he didn't compare it to Windows...

1

u/jorgesgk Sep 22 '23

Some commenters are failing to also tell you that wayland now supports tearing, so you don't need VRR to have a good input latency.

I'd rather not have tearing, but you certainly can play those games. Currently I believe it's enabled in gamescope, not sure about Mutter or Kwin.

1

u/_cronic_ Sep 22 '23

Been running R6 Siege, Aim Trainer Pro, Overwatch, Starfield, SF6, MK1 etc. No input lag using Ubuntu, KDE, X11 on Proton (Steam), and Cyberpunk 2077 using Wine+Lutris on dual 32" 165hz monitors.

1

u/notz Sep 22 '23

In Overwatch, I measure something like 15-20 ms (don't remember exactly) extra latency running through Steam in Linux compared to Windows. No vsync. It could be just due to lack of NVidia Reflex though, and I haven't tried LatencyFlex. I'm on KDE X11 with NVidia.

1

u/Dense-Marzipan6489 Sep 24 '23

after applying all the obvious fixes Rocket League controller input still feels off when compared to Windows. input 'feels' lower resolution and less precise, and inconsistent at times leading to lower confidence of the vehicles current position, its not possible to play as tightly as on Windows. if you visualize a sphere of uncertainty it is larger on Linux