Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
CyberWilhelm's avatar
CyberWilhelm
Honored Guest
11 years ago

Standalone Latency Tester use blocked by Oculus Runtime

It looks like the Oculus VR service is opening the DK1-era latency tester in exclusive mode as soon as the device is connected, preventing SDK 0.2.5c applications from being able to use it. Specifically, the call to CreateFile() inside of HIDDeviceManager::CreateHIDFile() is failing and throwing the Win32 ERROR_SHARING_VIOLATION (0x20) code when trying to open the Latency Tester when OVRServer is running. If I kill OVRServer and run my program quickly before it respawns, Latency Tester enumeration succeeds (and then fails again when I try running after OVRServer is back online).

I'm trying to use such an old SDK to access the standalone latency tester because there doesn't seem to be any way to talk to it with a modern SDK. The current SDK's latency test code seems to go through the sensor fusion system, which requires an HMD device (and the fake HMD option seems hardwired to report no latency tester). I totally understand (and agree) with the likely reasons for dropping support from the SDK: assuming everything moving forward uses an integrated latency tester like the DK2, maintaining support for the standalone tester would be a waste of resources and a wart on the API for a (very) niche user group.

My use case is just that I want to tune the input-to-display latency of my code when running it on a monitor or TV. I mean, in addition to the DK2 and above of course. But, latency testing on the DK2 and up is a solved problem and has SDK rendering mode to guard against things like buffered frames.

Could an exception can be added to the service to not lock away the standalone latency tester in exclusive mode? Possibly have it ignore it entirely? Is there an alternative that I'm not thinking of? While I realize this is probably lower priority than running spell check on the SDK source code's comments, the alternatives are either juggling a separate machine that doesn't have the Oculus Runtime installed on it, or uninstalling the runtime every time the latency tester needs to be used.

4 Replies

  • Have you checked the box for "DK1 Legacy App Support" which should be compatible w/ older built DK1 apps.
  • Hi cyber, thanks for the reply!

    I had totally forgotten about legacy mode. Unfortunately, I'm still getting the same result. Just to be sure, I tried the full matrix of combinations between toggling legacy mode, pausing the service through the Config Util, plugging the latency tester in before/after making the change, and launching the Config Util as Administrator (I usually run as a limited user). The only way the 0.2.5c code finds the latency tester is if I kill the service and run device enumeration before the service auto-restarts.

    Have any other ideas? Legacy mode really sounded like it would have been the right solution (until its likely eventual deprecation, anyway :) ), so I'm surprised that it didn't work.

    Thanks again!
  • Go to the start menu and type:

    services.msc


    Scroll down and find "Oculus VR Runtime Service".

    Right-click and choose "Stop"

    That should stay stopped I believe.
  • Cool, that works. Witht he service dead, the process doesn't respawn, the latency tester is usable, and I can restart the service through the same menu when I'm done. I can work with that. Thanks! :)