openvr icon indicating copy to clipboard operation
openvr copied to clipboard

'Throttling Behaviour'/'Lock application framerate to (max fps)' setting in SteamVR no longer supported

Open TheDeveloperGuy opened this issue 2 years ago • 8 comments

When using a HDMI/DP connected headset in VR-Direct mode, there used to be a per-application throttling setting, which is no longer available in recent SteamVR versions. According to a customer that contacted Valve for support on this issue, it is due to my driver "no longer supporting this feature".

In true OpenVR/SteamVR fashion there is zero documentation on this and mentions of it in the headers appear to be for applications and not drivers. As I certainly didn't change anything in this regard, and as the driver is using IVRDisplayComponent for the headset, I don't know what I'm supposed to do to "fix" this.

TheDeveloperGuy avatar May 28 '22 07:05 TheDeveloperGuy

Seems like IVRDriverDirectModeComponent got updated to version 008 in version 1.21.7, while the public headers are still on version 007. Not sure if you can do anything until Valve releases the updated headers.

Rectus avatar May 28 '22 13:05 Rectus

Interesting. However this is not using that mode.

Unfortunate naming choice for that mode though, which is "Driver-Direct", rather than "VR-Direct" (which uses IVRDisplayComponent, as does "Extended"). That has caused endless confusion over the years for developers. "Driver-Direct" bypasses SteamVR compositor, "VR-Direct" bypasses Windows display system. A driver could use both (eg. WMR or Oculus), but this does not.

TheDeveloperGuy avatar May 28 '22 16:05 TheDeveloperGuy

In that case the support might be wrong about it. I'd bet on it being something hardcoded in SteamVR. None of the other driver interfaces seem to have been updates in quite awhile (apart from IVRCameraPassThruInternal_001 being added).

Rectus avatar May 28 '22 17:05 Rectus

Yes, the changes to "Driver-Direct" are almost certainly for Oculus, as that is the primary client of that interface. Most likely the additions are not useful for general "Driver-Direct" headsets, and so I expect that is why they have not been made public (yet). I do use it too, for some headsets, but not for the one in question here.

TheDeveloperGuy avatar May 29 '22 09:05 TheDeveloperGuy

In that case the support might be wrong about it.

I will test with Index, as that is the primary client of the IVRDisplayComponent interface AFAIK.

TheDeveloperGuy avatar May 29 '22 09:05 TheDeveloperGuy

I just thought of another possibility. Looking at it, there seems to be an undocumented Prop_SupportsAppThrottling_Bool property. I don't know the number for it in the enum, but guessing it might be the next one in the HMD property range. Of course there might be something more required for it to work now, although if it worked before, maybe just flipping it on might make it work again.

Rectus avatar May 29 '22 10:05 Rectus

Could be, seems reasonable. Not sure what the headset driver can do to support or not support frame-doubling, particularly if it used to without support code. Will test Index before randomly setting undocumented properties. Would certainly be less like shooting in the dark with an actual enum value though. If Index does still do it, can hook its driver and see which properties it's setting. Or wait (perhaps an infinite amount of time) for a Valve dev to respond. Or call one: @JoeLudwig

TheDeveloperGuy avatar May 29 '22 11:05 TheDeveloperGuy

IVRDriverDirectModeComponent.PostPresent has been updated to take throttling parameters now. If you set Prop_SupportsAppThrottling_Bool then the per-app settings to control this behavior will start showing up. It is up to the driver to actually handle throttling, etc. appropriately.

https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_driver.h#L2869

aleiby avatar Aug 19 '22 20:08 aleiby

@aleiby Thanks, is there any documentation or even a hint on what exactly the driver is supposed to do with the throttling parameters?

TheDeveloperGuy avatar Dec 02 '22 06:12 TheDeveloperGuy

@aleiby Of course, this topic isn't even discussing "Driver-Direct" drivers, so the throttling parameters are not relevant for the "VR-Direct" driver mode being discussed. But as my driver handles both modes, it is relevant information for me.

TheDeveloperGuy avatar Dec 02 '22 06:12 TheDeveloperGuy