Latency in VR (with GSync) since 440.44

I’m playing in VR on Ubuntu, and realized a slighty but noticable lag/latency that was introduced with driver 440.44. It was fine with 440.36. I played on an GTX 1070 on Ubuntu 18.04 LTS with HTC Vive before and I’m now with a RTX 2080 on Ubuntu 19.10 and Valve Index. The notebook(s) I use have GSync monitors.
Ubuntu 19.10 installed driver 435 ootb which also doesn’t have this issue. Today I installed 440.82 and got this issue again.

A guess is, that it is related to this patch note entry (from driver 440.44):
“Fixed a bug that caused applications running directly on a display (such as VR HMDs) to tear when a G-SYNC or G-SYNC Compatible monitor is plugged in the system.”

I didn’t have any issues with tearing in VR though. The introduced latency is causing nausea, so a fix (or workaround) would be appreciated. I tried to disalbe GSync via nvidia-settings, but it didn’t change anything.

I tried to disable gsync via nvidia-settings:

nvidia-settings -q CurrentMetaMode  # get current mode, set again with AllowGSYNC=off

nvidia-settings -a CurrentMetaMode="DPY-3: 1920x1080_144 @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920:1080+0+0, AllowGSYNC=off}"

This does disable gsync, as it’s not shown in nvidia-settings anymore. But the lag in VR is still present.

Does using env variable
__GL_MaxFramesAllowed=1
help with that?

I’ve set export __GL_MaxFramesAllowed=1 in my .profile, so it’s available to everything I start.

It seems not to get rid of the latency issue, but maybe it got mitigated. I have the impression, the lag almost vanishes, when the GPU is under heavier load. So when starting SteamVR, in the empty room (I’m not using SteamVR Home), the issue is very noticeable. As soon as I open the SteamVR dashboard, it seems already to get better.
When I play Beat Saber, in the song selection it is noticeable, when playing a song it seems mostly gone.
Also it seems to come back immediately, after the headset turned off after 5s of idling.
I need to test a bit more, as maybe the env variable doesn’t affect this, and the latency would also go away when playing games without it.

Nevertheless, the issues is still there, so the env var doesn’t get rid of it. Also I don’t know how to describe this properly, or even measure it. I can only describe my subjective experience.

This issue is still present. I upgraded my hardware and software, I’m running now a RTX 2080 on Ubuntu 20.04. No matter which driver after 440.36 I use, the issue comes up again and again.
Currently I’m on 440.100 drivers, Steam Client and Steam VR both on beta channels.

A workaround is though to open the Steam VR dashboard, then the issues is gone for a while. Comes back at random times and shortly opening the dashboard gets rid of it again.

I want to bring this topic up again, as a mate who wants to get into VR on Linux ran into the same issue (even without a G-Sync monitor), so it’s not my setup.

I am experiencing something similar still on 570. Even without a GSYNC/VRR monitor attached. Seemingly both on open kernel module and the blob kernel module with GSP off. I am using the new nvidia.NVreg_RegistryDwords=RMIntrLockingMode=1 option (which seems to help stuttering issues, but not help the latency)

It is like there is at least 2 or 3 frames extra latency in VR mode, causing things to be a bit nauseating when head movements don’t quite match up. In SteamVR in particular opening the dashboard seems to temporarily lower the latency a little (not quite as good still as SteamVR on windows)

Yeah, this issue is still present. It seems not that prominent on my notebook with 2080 and Valve Index, but it’s very prominent on a buddy’s 4080 mobile.
When the head tracking delay happens, in SteamVR it can be reset when opening the VR dashboard. But we also tried Monado, and it happens there as well, so it’s not SteamVR related.
We installed driver 570.

I was able to get rid of the headtracking delay in Monado by setting the following env var:

U_PACING_COMP_PRESENT_TO_DISPLAY_OFFSET_MS=10

Unfortunately this cannot be set in Steam VR.

I find that this setting in monado only really mitigates the issue for me.
You can do similar tweaks in SteamVR from the debug menu by the way, but it’s only ever going to be a hack, I feel and not quite come to the low latency and stability I get in SteamVR in Windows…

I’ve recently heard that people have had good results running 565 or 570 with the closed kernel module and GSP firmware disabled however. But I have yet to try this myself as I’m currently modifying monado to try another potential workaround.

I have found a workaround in patching Monado to use VK_PRESENT_MODE_IMMEDIATE_KHR ( Add debug option to tweak present mode · xantoz/monado@a0d2a7b · GitHub Start monado with env variable XRT_PRESENT_MODE=0)

This fixes the latency issue in Monado only, but of course this workaround gives me tearing in VR (thankfully it stays mostly outside the FoV).

I’ve tried various other presentation modes, including VK_PRESENT_MODE_FIFO_LATEST_READY_EXT on the vulkan beta driver to no avail.