Live data from Hacker News

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

marco-nett.de

141–150 of 297 posts

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

#141

Earlier quoted context omitted.

If I understand the semantics of it all correctly, in that sense, there is no such thing as "Wayland". It is all a little bit confusing compared to the X11 ecosystem. You don't run GNOME on Wayland. You run GNOME's Wayland compositor, which is an entirely different implementation than Plasma's Wayland compositor.

That's what I mean though. I've not used gnome for years, but I have a vague memory of gnome/mutter running on a single main thread which used to lock up quite a lot (javascript etc). And because in X it was X that used to manage things like rendering the mouse pointer every frame, whereas in Wayland it flipped to mutter having to do it directly, the stalls were way more obvious in wayland than X, which is where I th…

Yeah, I believe Mutter is directly responsible for a lot of bad rep Wayland gets. It got better in many areas, but the damage is done.

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

#142
post #37

SteamOS and Bazzite both use Xwayland through gamescope which is the worst option as it seems https://github.com/ValveSoftware/gamescope >Avoid XWayland. It added 3.13 ms of latency, more than all other effects combined.

gamescope is a custom wayland compositor that Valve built for gaming... In steam big picture mode there is no xwayland or anything, just gamescope. What you are reading from the readme notes that it calls into xwayland only when gamescope (wayland compositor) is nested within another compositor (say kwin or mutter). gamescope itself is wayland only, and when run on SteamOS is has no xwayland latency...

gamescope absolutely can have Xwayland child panes & this is currently the default on SteamOS running games with Proton, unless PROTON_ENABLE_WAYLAND=1 is set in the game options.

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

#143
post #90

Earlier quoted context omitted.

Yeah at 120hz each frame is 8ms. So you're only missing a single frame around 30% of the time. I certainly want my latency as low as I can get it. But I'm pretty skeptical that anyone is truly feeling the difference of a couple ms.

Try musicians that are used to playing extremely high speed semihemidemisemiquavers. We notice latency. Neil Peart could almost get sample-precise timing, he was so godlike.

Humans are good at predicting stuff, and they can notice when the expected doesn't happen.

But I wouldn't necessarily say that people can notice it everywhere in every state of mind. The medium, context etc all matter a lot.

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

#144
post #13

He seems confused at the end why people think wayland is so slow, but don't you think it's because of his xwayland result? People were probably running x11 games on wayland and noticed that significant lag. Just a wild guess. Very nice article, wish people did actual measurements like this more often, of all sorts of things.

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.

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

#146
post #22

It looks like consoles and PCs have settled on somewhat different gaming configurations. Consoles usually try to target a fixed output frame rate, while the resolution is often dynamic. On PCs, by contrast, the resolution stays static, while the frame rate and frame-time pacing are dynamic. How does this fit into the latency discussion? Especially in competitive gaming, I often see people targeting frame rates way be…

I have found that input latency is a LOT more acceptable with a controller than it is with a mouse.

Playing a cinematic game with a controller (especially with auto-aim) at 30FPS with vsync is fine. Playing a first person shooter with a mouse, or a game where you control your camera with a mouse, at 30FPS with vsync feels very bad.

That's my theory on why the priorities are different, at least.

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

#147

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…

> 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.

It wouldn’t surprise me if Microsoft could turn a knob and get telemetry data from millions of devices, and feed that back to the software graphics authors.

Certainly both Intel (https://www.techpowerup.com/312122/psa-intel-graphics-driver...) and Nvidia (https://nateshoffner.com/blog/2017/05/disable-nvidia-telemet...) collect such data themselves (opt-in in both cases, so they may not get much data from the most hard-core gamers)

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

#148

Earlier quoted context omitted.

My biggest problem with wayland was how it was basically forced on the community. It broke innumerable things for years , put all the responsibility for implementing things down on the DEs and WMs themselves. All of this hassle, forcing so much more work on DE/WM devs, for the sake of 'better security' in scenarios that don't really apply to 99% of linux users, with the promise of 'better latency' which this very art…

I don't know enough about this to have a favorite, just know the transition was rough. Like one day at work our DE had to get changed because of whatever reasons they couldn't use X anymore, and that affected more things like Chrome Remote Desktop. Years after I tried setting up Linux on an old PC and learned that Wayland is de facto default now, but not in Mint, even though Mint is supposed to be the easy one... and…

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 merely using something isn't contributing and doesn't get you a vote.

Arguably the problem isn't the display server its the fact that general linux usage tends to require a little understanding of what's going on under the hood than is strictly speaking desirable for joe average user especially when something doesn't work. EG needing to understand that your choice of display server is making your zoom calls not work and then having to open that whole can of worms.

The fix is honestly more labor. The trivial way to acquire more labor is with money which is hampered by the fact that so little is paid. If you want more polished stuff pay more.

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

#149
post #119

Earlier quoted context omitted.

My biggest problem with wayland was how it was basically forced on the community. It broke innumerable things for years , put all the responsibility for implementing things down on the DEs and WMs themselves. All of this hassle, forcing so much more work on DE/WM devs, for the sake of 'better security' in scenarios that don't really apply to 99% of linux users, with the promise of 'better latency' which this very art…

> 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

Post reply on HN