Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] bad performance of some games/apps if SteamVR is the runtime #289

Open
randomVRguy opened this issue Oct 14, 2024 · 4 comments
Open

Comments

@randomVRguy
Copy link

randomVRguy commented Oct 14, 2024

I noticed a performance issue if an Unreal application runs in SteamVR and uses OpenGL. Now, what's the problem? Running a UEVR session where the respective app uses OpenGL as API + SteamVR as runtime results in a very low, stuttery frame rate and my GPU cannot reach a proper utilization. Further, there a is a certain stress on the GPU, called "compute 0" which is usually at zero in other scenarios. Btw, I'm not an expert enough to explain that "compute 0" thing, but it puts additional load on the GPU and prevents it from smooth rendering. To visualize this behavior, I put a screenshot from the Titanic 401 project here:

Bild1

Exactly the same happens in Senua’s Saga: Hellblade II (which interestingly also uses OpenGL) making it unplayable. Now, one might say, its a problem of AMD cards / drivers. Well, not really. The thing is, if I do the whole thing with Windows Mixed Reality as runtime (by using e. g. a Reverb G2), there is no such problem. Then, I can easily max out my GPU w/o any issues and of course I achieve much higher FPS. But once I switch to my PSVR2 on PC, which has to rely on SteamVR as runtime even for openXR, that mess happens.

I'm not sure if UEVR can do anything about it. But at least I want to bring this up here, in case there is a solution and to make people aware of that.

Btw, it was not easy to track down this problem. Initially I was just wondering why the performance is so bad in the PSVR2 in comparison to the Reverb G2. And only after a lot of testing I was able to narrow down this problem to the combination of OpenGL + SteamVR.

PC Specs:
UEVR 1.04
Windows 10
RX 6800
Ryzen R5 3600
PSVR2 / HP Reverb G2
OpenXR in all cases (WITHOUT OpenXR Toolkit Companion app)
WMR runtime & SteamVR

@praydog
Copy link
Owner

praydog commented Oct 14, 2024

UEVR does not support OpenGL. It only supports DX11 and DX12. Whatever you are using is either showing an incorrect graphics API or you are showing the SteamVR mirror which might use OpenGL and is hogging GPU resources.

This does not sound like it's an issue with UEVR unless you can prove that GPU usage is not getting the same limitation in other apps.

@randomVRguy
Copy link
Author

Oh, interesting about OpenGL. So the metrics overlay seems to be misinterpreting something (it's the official overlay provided by the AMD graphics driver). When I run the application without (UE)VR, it just tells me "N/A", so it might really be detecting something other than the main app even if that is in focus. Btw this does not happen with other games like Stray for instance (usually this tool is reliable). I have also adjusted the heading accordingly.

Anyway; here some more information about the actual problem. I did a 1:1 comparison with and without UEVR for that specific application. All settings are completely untouched between the 2 tests and there are no frame caps or anything. It turns out, w/o VR everthing is basically fine. I get over 300fps and nearly fulll GPU usage (even though there is already a little of the that "compute 0" load).

Demo401 - without VR

If I run the same scene now with UEVR I get a lot of "compute 0" going on and rendering goes crazy, see also the SteamVR frame time graph for reference. Like I said, in the headset you experience very stuttery like 20...30 fps although the the picture is perfect 3D and so on.

Demo401 - with VR

Want to mention again: if I do the whole thing with WMR as runtime, I don't get this problem (unfortunately I can not show this anymore as I do not own a Reverb G2 any longer). This only happens with SteamVR as runtime. So UEVR is not the core problem but maybe it's somehow involved. Other users with a native SteamVR headset should be able to reproduce it. Would be interesting if this also happens with Nvidia GPUs.

@randomVRguy randomVRguy changed the title [BUG] bad performance if games use OpenGL and you run it in SteamVR [BUG] bad performance of some games/apps if SteamVR is the runtime Oct 15, 2024
@4RTORI4S
Copy link

Hi, I'm having the same issue with my RX 6950 XT and PSVR2.
For me it only happens when I'm running games with DX12 though, with DX11 everything seems to be fine.
Like randomVRguy said, it looks like the high usage of compute 0 is the problem as without SteamVR it's very low.

I want to add that I get bad performance as soon as I open SteamVR, so it already happens before the injection for me.
So that tells me it's likely once again an AMD issue, but I agree it'd be interesting to hear if it happens with Nvidia gpu's too.

@randomVRguy
Copy link
Author

If so, then it would be problem related to AMD <-> SteamVR (in some specific situations) because as I said, if I run my openXR stuff in WMR everything was fine using the same card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants