Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
195 stars 9 forks source link

Oculus runtime steals focus from SteamVR when -SteamVR flag isn't set. #522

Open shiftyscales opened 4 years ago

shiftyscales commented 4 years ago

When launching Neos while SteamVR is running, the Oculus runtime will steal focus from SteamVR. Neos detects the headset as OpenVR, and tries to render to SteamVR, resulting in the user getting stuck in the Oculus dash, while the headset is being tracked, and rendered on the Neos desktop window.

This issue has tripped up a lot of new users. Many Oculus users try to run Neos through SteamVR since they download Neos from Steam/have SteamVR running.

Frooxius commented 4 years ago

This doesn't sound right. Oculus should always be prioritized, so it should run first, stealing the focus is correct behavior. What makes you think that Neos detects it as OpenVR? Do you have a log from when this happened?

shiftyscales commented 4 years ago

I do. To make this log, all I did was load Neos from the SteamVR dashboard, then exit Neos by pressing the close button on the window on the desktop. SHIFTY-PC - 2020.5.9.1126 - 2020-05-09 14_58_35.log

Frooxius commented 4 years ago

Hmm that's really weird. It seems like it's trying to run through OpenVR, which means that the Oculus runtime has failed to initialize (it always gets tried first, then OpenVR).

It seems like that's opposite of the title though, the OpenVR/SteamVR is stealing focus of Oculus runtime (or rather, the Oculus runtime is failing to initialize).

What happens if you force it to use Oculus runtime in this case?

shiftyscales commented 4 years ago

When you force the Oculus runtime, e.g. using the launcher/command line argument, things work as expected. Neos transitions from SteamVR to Oculus, and loads into Neos without issue.

Frooxius commented 4 years ago

Hmm. It's odd that this is making a difference. But this sounds like a problem with the runtimes themselves, I'm not sure how much we'll be able to do on our end. When no argument is present, Neos (well Unity technically) will first try to initialize Oculus VR runtime, if that fails goes to SteamVR.

For some reason the Oculus VR runtime must be failing to initialize, so it gets passed to SteamVR.

BlazeVR commented 4 years ago

I can confirm that this issue still happens to Oculus users (both Rift/Rift S).

Several people I was teaching had Neos running with SteamVR instead of the Oculus Runtime. It runs way better (performance and display quality) without the overhead, thus affecting the new user experience. Changing it from the launcher once keeps it forever then.