r/linux_gaming • u/kimjongundotcom • Jul 27 '19
Linux input lag analysis V2(6DEs + Windows 10 1809)
Hello again! I've redone the tests i did in my previous tests due to lack of accuracy and other feedback i've received. the method didn't change from last time, other than only CS:GO being tested this time(local listen server on cs_workout with harmless bots, i always looked up from CT spawn and measured screen changes by firing the desert eagle.) and the sample size was bumped up to 10; so assuming i didn't fuck up the measuring, there should be (1000 / 240) multiplied by 2 ms of inaccuracy in a worst case scenario due to rounding.(and if i did wrongly measure, add another 4.16ms of fuzzing).
VERSIONS OF SOFTWARE USED + HARDWARE USED :
SOFTWARE :
Windows 10 1809(17763.615) on NVIDIA 430.53
Linux 5.1.14 on NVIDIA 430.26(Mageia 7)
Cinnamon 4.0.10
KDE Plasma 5.15.4
GNOME 3.32.0
IceWM 1.5.4
Enlightenment 0.22.4-4
LXDE 7
Everything on X11. The ingame framerate was roughly the same on both Windows and Linux.(approx. 280FPS)
Linux was launched with the "make-linux-fast-again.com" kernel options. Windows had the spectre/whatever patches disabled.
HARDWARE :
I9-9900k on MSI Z390 motherboard with NVIDIA Geforce 980ti
Logitech G603(Wireless 1ms with the 1000hz mode)
Samsung C24FG70(144hz 1ms VA)
Samsung S9+(240FPS recording)RESULTS : Sorted by :(Avg. latency, min, max, most common value)
Windows fullcreen windowed
38.3333ms, 33.3333ms, 45.8333ms, 37.5ms
Windows fullscreen exclusive
24.5833ms, 20.8333, 29.1667ms, 25ms
Cinnamon
88.3333ms, 79.1667, 91.6667ms, 91.6667ms
Enlightenment
30.8333ms, 20.8333ms, 41.6667ms, 33.3333ms
GNOME
29.1667ms, 20.8333ms, 50ms, 33.3333ms
IceWM
25.8333ms, 20.8333ms, 33.3333ms, 25ms
KDE (no composition)
28.75ms, 20.8333, 37.5ms, 29.1667ms
KDE (forced composition)
45ms, 33.3333ms, 54.1667ms, 45.8333ms
KDE(no composition, no nvidia allow vblank sync)
27.9167ms, 20.8333ms, 33.3333ms, 33.3333ms
LXDE
28.75ms, 20.8333ms, 37.5ms, 25ms
Note : the third KDE test is with the option in the NVIDIA control panel "allow sync to v-blank" disabled, but it appears that it did nothing.Conclusion :
Judging from the minimum values, it appears that there is zero difference for sure with all DEs that scored 20.8333ms minimum when put against Windows, for the "most common value" and averaged values the results are too close together to be judged accurate by the measurement method.
Questions/answers :
How do i make an even better measurement?
Well ideally you'll need a high refresh rate monitor that has a response time of the gods like a CRT, a 1000fps camera, an input device with a LED soldered on that lights up when you press it, and to top it all custom software to evaluate both 2D app and 3D fullscreen performance in a way so that you can have accurate measurements in spite of the monitor's relatively poor response time when scanning the pixels. Then you measure your recording and do (1000 / camera framerate) multiplied by your number of frames between the moment your LED lightened up and the screen changed. Then you do this dozens of times...
How can i ensure that i get the lowest latency on my setup?
The rule of thumb is : if the DE/Compositor supports fullscreen unredirection and the app/game properly does the fullscreen OR if you can disable the compositor, and nothing is messing with the input devices you are good to go apparently.
How do i know if the DE/WM/Compositor did fullscreen unredirection/compositing blocking properly?(GNOME/KDE)
You'll need a keyboard that has a mouse wheel or some way to get a similar popup to appear(laptop's fn keys should do it) :
GNOME: When the volume control popped up, the game's window should "glitch out" and go back to windowed mode. This means it did indeed do fullscreen unredirection apparently.
KDE : If you have kept the shadows effect turned on, there should be a shadow effect on the edges of the volume control popup if Kwin isn't turned off, if you see no shadow at the edges then Kwin was successfully turned off.
ISSUES :
Absolutely ALL of the compositors/WMs i've tested suffered from at least one of those :
- Horrible latency(so bad it's visible when dragging windows)(KDE, Cinnamon)
- Horrible v-sync stuttering, the least worst culprit is GNOME, KDE stutters so bad it looks like it's barely at 60fps until kwin is disabled with shift-alt-f12 and suddenly everything is smooth.(even slight stuttering is easily revealed with glxgears)
- Total inability to disable the compositor or otherwise disable the v-sync that causes the above issues to occur.
Note: GNOME appears to have been improved for 3.34.
Wayland just doesn't work at all on NVIDIA, sorry, i would've tested GNOME with xwayland if i could.
I couldn't test CS:GO against Wine either.(didn't know how)
I couldn't test G-Sync and other adaptive-sync implementations.
56
u/pr0ghead Jul 27 '19 edited Jul 27 '19
Don't use double negation. Say: "Absolutely ALL of the compositors/WMs i've tested suffered from at least one of those".
That said, thanks for the effort. Seems like Gnome is capable of low latency, it's just inconsistent. Surprised that Cinnamon is really bad, since Mint is often recommended to new users.
It's weird that you couldn't get Wayland to work even on Gnome. They supposedly have EGLStreams implemented so…
Anyway, looks like IceWM, LXDE and KDE are the winners.
13
u/RAZR_96 Jul 27 '19
You should try compton as well. The vsync it does is pretty good in my experience, with only a 3% performance impact. Also why couldn't you test Gsync? Does the Gsync Compatible option not work on your C24FG70?
4
u/ryao Jul 27 '19
You might want to try the kernel module parameter mentioned here:
https://www.reddit.com/r/linux_gaming/comments/9wjpkz/poor_gaming_performance_is_this_a_cpu_or_gpu/
The poor performance in certain Window managers that you mentioned can be a symptom of the MTRR issues that kernel module parameter works around.
3
u/[deleted] Jul 27 '19
I'd definitely use KDE, problem is that it has issues running overwatch. Using xfce currently and the input lag is not that bad. Maybe I because I haven't tried overwatch on other DEs yet.
2
u/GetOperational Aug 02 '19
Thanks for doing this. I'm sure this sort of testing is time consuming but until someone collects this kind of data all we can do is make assumptions.
Cinnamon's score is pretty rough, I'm curious if compositing was disabled under:
(settings) > (general) > (disable compositing for full-screen window): on
I would also be curious to know how how lxde and lxqt compare since they have the gtk/qt difference and lxqt is now the primary project.
9
u/zurohki Jul 27 '19
KDE's compositor seems to struggle badly if you stress the GPU. If I play a game with settings way down so that I have GPU headroom, there's no stuttering with compositing on.
The best experience is compositing off and using Freesync.
7
u/mirh Jul 27 '19
Both GNOME and KDE recently got support for EGLstreams.
6
u/clux Jul 28 '19
Wow, decided to try out LXDE based on this since I am on Arch anyway.
It's not even funny how much of a difference this made. Why have I been on Cinnamon for this long @(#
6
u/laterality Jul 28 '19
Would be interesting to know how this compares to launching something with
startx. Not sure if that's possible to do with csgo.11
u/babypuncher_ Jul 27 '19
I thought KDE 5.16 was supposed to include support for Wayland provided by Nvidia themselves, but it's still completely broken. This whole Nvidia + Wayland pissing match is just stupid.
9
u/[deleted] Jul 27 '19
You should crosspost this to r/pcgaming, they'd be really interested in this too
4
u/rockerbacon Jul 27 '19
Testing with the low latency kernel would be interesting
4
u/[deleted] Jul 27 '19
Thanks for your time and effort, I really dig it!
4
u/[deleted] Jul 28 '19
I did measure the input lag of my bluetooth OEM PS3 gamepad with jstest-gtk and Xiaomi Note 5 camera at 120fps. I used kdenlive to analyze the video. The lag is not more than one frame, 1/120s=8ms. The Xfce 4.13.3 desktop works fine without enabling the compositor. CS:GO is a very fast and light game so it runs almost with any hardware.
7
u/[deleted] Jul 27 '19
Sounds like most of the problems you see here happen only with NVIDIA, I haven't experienced such issues when using Wayland for years, on much weaker GPUs. Even on X11, I've never suffered latency for dragging windows on KDE. That sounds more like software rendering or some other GPU driver problem.
1
u/[deleted] Jul 28 '19
Where would xfce be placed on the chart?
3
u/dreamer_ Jul 27 '19
Top-quality stuff, great job! :)
I wonder what could be improved during the development process to prevent input lag regressions in future…
3
u/ryao Jul 27 '19 edited Jul 27 '19
Which KDE result shows the default configuration?
3
u/Tom2Die Jul 27 '19
I wonder...with a raspberry pi, a male-male USB cable and a male-male audio cable you could probably set this up to be pretty consistent. If we assume once the game is loaded and a Deagle shot has been fired that the OSs will have functionally equivalent time between "fired Deagle" and "speakers are making Deagle sound" and that the Pi will introduce consistent latency, you could forward the mouse through the Pi and then have the audio output of the test machine plugged into the audio input of the Pi. might be more precise that way.
Anyway, neat!
0
u/[deleted] Jul 27 '19
[deleted] — view deleted comment