Live data from Hacker News

Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

marco-nett.de

221–230 of 297 posts

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#221

Earlier quoted context omitted.

The context here is the article's author is a twitchy FPS player, those extra 3ms are something that community agonizes over. I appreciated how much effort was put into controlling the variables in this test. There's a whole lot of witchcraft associated with these kinds of efforts and he sat down and did the measurements and got real numbers. My hat is off to OP.

ping is going to dominate over 3ms in pretty much every situation. And the non-xwayland numbers are all within a single ms of each other. --- Not to undermine the measurements of the author (agree with you, it's a cool effort), but my read is that this was basically proof that it doesn't matter.

Lag compensation means ping is an entirely different phenomena with different effects from input latency. While details vary between games for the most part pieces of the game like hitting enemies (but not being hit yourself) and moving your own character are operating on a local simulation with zero latency from ping.

There are weird consequences of this, someone can shoot you after you duck behind a wall because you hadn't yet in their version of the game. An enemy moving left right repeatedly is likely vibrating in your version of the game faster than the rules of the game would otherwise allow. Etc. Ping matters, but it's not comparable to input latency. Input latency really does mean that you can click at the right time and miss your enemy. It really does delay how fast your camera spins when you move your mouse. Etc.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#222

Earlier quoted context omitted.

I can tell down to about a 3ms difference in lag. Actually even down to 1ms, it's not all its cracked up to be, lemme tell you.

You think you can and will inevitably fail to do it in blind testing.

I can tell, doesn't mean I can react usually.

Adapting is doable, but after years of rhythm games, yeah, no.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#223

One thing that's lovely about Linux is this kind of analysis is not only possible, but meaningful. These results will get reported back to the graphics software authors and the distribution packagers and the ecosystem will improve. There's no sense with Microsoft that kind of improvement is possible. I recently switched to Linux after years on Windows desktop, mostly because the KDE Plasma desktop feels snappier than…

Bazzite or CacheyOS (if you wish to do gaming and have more rope to hang yourself mainly because you can more easily affect the system if it isn’t trying to enforce immutability).

TBH with the onslaught of LLM CLI’s like Claude I am a lot more promiscuous in my Linux OS choices as of late. I used to stick to Ubuntu because that was the Linux I knew, but the “interface” has become the same to me because I just ask Claude to help me achieve a semantic goal without having to score the web for the appropriate keys.

Who knows, maybe I’ll eventually swing the other way and give NixOS a try finally.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#224

Earlier quoted context omitted.

Forced on who, by who? It is the DE/WM people that is driving the thing.

It is absolutely not the DE/WM devs driving this, it's the wayland folks saying that xorg would no longer be maintained. They literally just dumped an Ikea box of protocols on the table without even bothering to provide a decent sample implementation and said 'good luck!'

the Wayland folks are the X11 folks though

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#225

I appreciate the article, it's cool to see such small differences across all those settings! It says they learned to solder, if you see solder joins that look like those in the first picture, keep learning! Those are some dry joins, which can easily lead to failure, or intermittant signal loss. Soldering can be a touchy sport!

OP here, thank you for the feedback. I will keep it in mind for the next time I'm soldering something.

The main trick is getting the pad/component hot enough that you're adding solder to them, not to the iron. The end result should look like the solder is a smooth fillet, not jaggy/crystalized bumps. Now to tweak my nixos gaming rig with your settings thanks to your research!

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#226

Earlier quoted context omitted.

I think Linux is about choice some folks opinions notwithstanding. It's an ecosystem where many different devs have chosen to go about the same thing many different ways. You the user then get to pick from amongst those varied and interesting choices. It however isn't about all or indeed any of those devs being obligated to support any particular choice. You can only buy a place at the table with money or sweat and m…

>Arguably the problem isn't the display server No. If you tell users they should switch to a new display server, you shouldn't be surprised if no one takes you up on it if you don't provide basic feature parity. If you tell DE/WM devs they should use your new protocol, but say it's now their responsibility to do all these things that the old display server did for them, don't be surprised if it doesn't get much tract…

Was there some other reason distros switched to Wayland? I've always heard X11 was just not maintained well and had too much tech debt, not so much about the security.

From what I remember, Wayland is a thinner layer than X11, basically handing clients pointers to shared buffers for them to write into, which seems better than X11's server approach. Thought maybe people were eager to switch for latency reasons, but this benchmark is showing otherwise. And would think Wayland is more efficient too, but I haven't noticed or heard of a difference.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#227
post #119

Earlier quoted context omitted.

> I tried to be an early adopter of wayland ~ 5 years ago. Found all sorts of things broken Yeah, because it wasn't ready. Pretty much no one recommended using it back them, if you thought it was ready you were either misguided or misled. It's time to put your skepticism aside and give it another try, there is a pretty good chance it's going to work great now. Even Valve Steam OS is now adopting it. It's a pretty goo…

People were declaring it ready in 2016 10 years ago and talking about how people needed to switch off the working "obsolete" X and switch ASAP to the broken wayland. It is completely counterfactual that "pretty much no one" was recommending it in 2021

Yeah, people were definitely recommending Wayland in 2021. That's when Ubuntu made it default.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#228

One thing that's lovely about Linux is this kind of analysis is not only possible, but meaningful. These results will get reported back to the graphics software authors and the distribution packagers and the ecosystem will improve. There's no sense with Microsoft that kind of improvement is possible. I recently switched to Linux after years on Windows desktop, mostly because the KDE Plasma desktop feels snappier than…

> One thing that's lovely about Linux is this kind of analysis is not only possible, but meaningful. If only they'd actually DO something with this meaningfulness. I love and use Linux as my daily driver, but desktop environments and everything around it have become so complicated yet worse than before. In the past a simple config file with intuitive setting names inside of them could make you do anything you wanted.…

I think this is misguided.

> a PDF viewer can't even independently choose its own text and background color without the desktop environment messing with it

It can, it just chose to reuse the theming settings of it's platform (be it QT or GTK, or whatever) instead of forcing them.

The desktop environment is simply setting the defaults for the platform and most applications use them instead of forcing colors and themes and font.

And you can just try many combinations of themes + window managers + whatever app that fits in a desktop environment you want.

Maybe what's exactly to your liking doesn't exist yet, but the beautiful part it that it's a lot easier to make it for Linux than for any other OS because everything is open.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#229
post #13

Earlier quoted context omitted.

I've been using Linux since the mid 1990's. I'm no newbie to any of this. I literally can't tell the different between X11 and Wayland when using either of them and I don't care about all the arguing. This is just Vim vs Emacs and Gnome vs KDE all over again. At this point when I see people complaining about it I just click off the page. It's all stupid and pointless.

To put it in perspective: an average eye blink is 100-150 ms. The worst outcome in this test was with XWayland adding 3ms of latency. Maybe this is truly important for some exceptional pro gamers but for the majority of the world it is as you say, stupid and pointless.

This was with a nvidia 4070 attached to a 500 hz monitor. Even so P95 difference between worst and best was closes to 5ms. Meanwhile 60 hz monitors are incredibly common and every time a 16.7 ms frame deadline it causes an additional 16 ms of latency worse this is inconsistent and spiky and will be noticeable.

The length of a blink is irrelevant. People notice latency especially inconsistent latency. The perception of xwayland being laggy in latency sensitive context like gaming is accurate.

Re: Measuring Input Latency on Linux: X11 vs. Wayland, VRR, and DXVK

#230
post #130

Earlier quoted context omitted.

And all the gaslighting. Using X forward basically every day but being told it is useless and broken and nobody needs it...

There is a wayland equivalent. It's called waypipe. In my experiences it often works better than x11 forwarding.

Unfortunately, there's no wayland server for windows, so you can't use waypipe there without pulling in a linux vm or similar.
Post reply on HN