[PERF] Latest SteamVR version jerks around and stutters a lot
Describe the bug
When using SteamVR with the new UI, it introduce intermittent stalls in frame output, and is generally incredibly laggy. Whenever I move my head the game follows, then it jerks around, and is generally unplayable even when the overlay is closed.
To Reproduce
There's no specific error and I'm not skilled enough in debugging to know how to guarantee anyone else gets this issues, so if commenters having the same issues as me can help add details, it would be very nice.
It happens in games like beat saber and tetris effect, as well as the base Home and Non-Home environments, which prior to the latest updates with the new UI, only the SteamVR-Home environments ever lagged. At this point VR is impossible to use.
Expected behavior
For SteamVR not to turn into a slideshow whenever I move my head. and to easily get 120fps
System Information (please complete the following information):
-
Distribution: Manjaro Note: why is it such a pain to find the installed version of SteamVR? The installed version numbers should be front and center in the ui client. Edit: Turns out the version is visible in the little window while steamvr is running. If it's not running, it's not visible in the main steam library ui or properties page.
-
SteamVR version: 2.0.10
-
Steam client version: Steam Version: 1698777785 Steam Client Build Date: Mon, Oct 30 8:09 PM UTC -07:00 Steam Web Build Date: Fri, Oct 27 5:29 PM UTC -07:00
-
Opted into Steam client beta?: No
-
Graphics driver version: Driver Version: 535.129.03 CUDA Version: 12.2
-
Gist for SteamVR System Information: https://gist.github.com/Dwood15/bcf692a1e9b32322cb3e8c8e0ce3389a
Performance Data (optional, but very helpful):
OS: Manjaro Linux x86_64 Kernel: 6.1.55-1-MANJARO CPU: AMD Ryzen Threadripper 3960X (48) @ 3.8GHz GPU: NVIDIA RTX A6000 Memory: 5.92GiB / 125.67GiB (4%)
Perf measurements not taken yet- the issues are visibly apparent on my setup with my ampere gpu.
- Gist for perf top: [See instructions]
- Link to gpuvis trace: [See instructions]
Screenshots If applicable, add screenshots to help explain your problem. If possible, also include screenshot of vrmonitor's timing graph.
Additional context Add any other context about the problem here.
Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" and "Perf Data" sections in their replies.
Will detail in comments any further debugging I attempt.
force-closing the vrwebhelper and performance returns to what I expect.
Current theory: Latest vrwebhelper is missing a special sauce for hardware decoding that was in the earlier version. Either way, the webhelper is clearly the root problem.
See also: https://github.com/ValveSoftware/SteamVR-for-Linux/issues/613
@Dwood15 I have to say that killing all instances of VR Webhelper did increase the performance in Fallout 4 VR to the point where it was almost playable! I was unable to check the timing graph because doing so disables the VR Dashboard and Overlays of course. I was still getting some double vision when moving and or turning but it was less intense than previously
@NewtSoup Yeah, even with the webview killed, the performance of various VR games on linux still massively underperforms. At least with the webview down, things like Beat Saber are still usable.
Unfortunately this comes with a massive cost, like you said.
If Valve would open-source the dependencies we could debug this and help. Linux-VR really seems broken at this time. I would put some code in it to measure timing and needed time for critical function calls and make some unit testing for this with sane thresholds before failing on your testing-environment - so one could get the timing straight before releasing anything. What I don´t understand is why is vrwebhelper and steam webhelper doing really anything when not displaying something. In such timing critical applications like VR it seems a bad decision for me letting some stuff going on in the background that seems to be not needed at that time.
Have you tried disabling Async reprojection in steam? This helped me. https://www.gamingonlinux.com/2021/08/having-vr-issues-on-linux-you-should-look-to-disable-async-reprojection/
Ok... I've tried all the solutions described here from killing vrwebhelper to disable or enable async reprojection and none of them worked. So I've found a solution that worked for me, which I explained in issue #657 --
I thought that stutter (also present in SteamVR 2.5.5) was due to something much more trivial, excessive logging, and it seems it is. I mounted ~/.local/share/Steam/logs as a tmpfs filesystem with owner/group as my own user and then the stutter is GONE!
The logs in there have a lot of trivial warnings repeated ad nauseum several times per second. This is useless/wasteful, but it hits the filesystem in a chorus a thousand times per second, and it's no wonder that it hinders the ability of games to keep the frame window stable.
Why is there so much logging, anyway? It doesn't seem it's sent to steam servers or something, and I see no way to turn it off. If a log falls in the middle of the forest and no one reads it, have those log messages really happened?
To me the only thing these logs inform is that steam and its subsystems like SteamVR are in a really bad shape, with lots of problems in their plumbing. Rejected connections, wrong inputs, mishandled files, stuff not found, and still it can run games and seems to work fine. Additionally, in my experience on bug reports here, on most cases these warning/error messages are useless to the diagnostics of the problem.
My hack to get stable frames is so good that I'm adding it to /etc/fstab. It forgets all files once I reboot, of course, but if I need them to a bug report or something they're still there, in my RAM.
I mentioned the same in my comment https://github.com/ValveSoftware/SteamVR-for-Linux/issues/667#issuecomment-2094826635 that vrwebhelper keeps writing to the disk at 8MB/s with considerable CPU usage and if you leave SteamVR on for a while, you can see, that it keeps increasing the RAM usage to over 2,2 Gigabytes despite the fact that no game is running (not even SteamVR Home).
"Luckily" on Fedora 40, vrwebhelper requires SDL_VIDEODRIVER=x11 in it's launch script and without it, vrwebhelper does not start and the performance goes back to normal.
Hey, I haven't had this problem under X11, but after explicit sync was added to Nvidia driver I tried Wayland and encountered the problem specified in the issue
This makes VR totally unplayable under Wayland.
Hey, I've got some spare time on Weekend and downgraded Nvidia drivers from 555 to 550, and the stuttering is gone, something ticked me off, when Monado experienced the same behaviour.
I'll retest on Wayland and edit this message, and open an issue on Nvidia forums some time later.
EDIT: Yeah, this time it's on Nvidia
This post hints that disabling GSP on the 555 driver also solves it https://forums.developer.nvidia.com/t/enabling-gsp-makes-steamvr-unplayable-on-rtx-3090ti/298694
This post hints that disabling GSP on the 555 driver also solves it https://forums.developer.nvidia.com/t/enabling-gsp-makes-steamvr-unplayable-on-rtx-3090ti/298694
What is GSP? Is it a setting that is turned off in Steam VR?
This post hints that disabling GSP on the 555 driver also solves it https://forums.developer.nvidia.com/t/enabling-gsp-makes-steamvr-unplayable-on-rtx-3090ti/298694
What is GSP? Is it a setting that is turned off in Steam VR?
See https://download.nvidia.com/XFree86/Linux-x86_64/555.58.02/README/gsp.html
For anyone who struggles (took me like 3 hours) with setting this up (as it resolved my problem) you can open a terminal and type nvidia-smi -q | grep "GSP"
If you get GSP Firmware Version : N/A You are golden if not and instead of N/A you have some numbers you will encounter this problem on Nvidia drivers.
I had gone to /etc/modprobe.d/ created nvidia.conf file and inside put this
options nvidia NVreg_EnableGpuFirmware=0
After dracut-rebuild and restart I no longer experience those horrendous stuttering.
Hope this helps anyone who have similar distros to me, and point others to the right direction.
Replying to https://github.com/ValveSoftware/SteamVR-for-Linux/issues/631#issuecomment-2236518224
Is there an AMD equivalent? I'm not using an nVidia card - RX6700XT