cancel
Showing results for 
Search instead for 
Did you mean: 

OpenXR Issues with Oculus Runtime and Unity OpenXR Plugin

augustbranchesi
Level 3

Hi,

 

Myself and several other devs have noticed problems when building OpenXR apps using the standard Unity OpenXR plugin (not the OculusXR plugin) and using the Oculus Runtime as the OpenXR default runtime.  I do not see the issues when using the SteamVR runtime.

 

1.  Audio is going through the system speakers rather than the headset.  This can be forcibly changed in Windows, but it should be doing it by default as it will inconvenience users.  

 

2.  There seems to be some performance degredation or memory leak, particularly when the headset goes idle.

6 REPLIES 6

johnkearney
Oculus Staff

Hi @augustbranchesi 

It is good to see developers making progress with the OpenXR based integrations.

For 1. The required API to get the audio device is `xrGetAudioOutputDeviceGuidOculus` [1]. (There is an equivalent API for microphone / input too.) This API was only added to the OpenXR headers in 1.0.17, so it may take a while for folks to integrate it.

For 2: I have not see reports of this issue before. It would be great to get some extra information, repro steps or a sample app to understand it in more detail.

Thanks,
John

[1] https://www.khronos.org/registry/OpenXR/specs/1.0/man/html/openxr.html#_xrgetaudiooutputdeviceguidoc...

thep3000
Level 3

Hi, peter from Unity here.

 

For 1. we'll work on getting `xrGetAudioOutputDeviceGuidOculus` hooked up and released in a future OpenXR unity package.

 

For 2. We've seen reports of a memory leak on headset idle when using UI Canvases.  We're working on getting a fix released.

Thanks Peter! (And all!)


I think part of the challenge from a devs perspective is narrowing down where the problem is since there are so many different players involved. In this case, I assumed it was something Oculus Runtime related so I posted here. 

1.  I actually opened a bug on Unity’s side for this because I wasn’t sure where the problem was. It is Case 1346125 with a sample project. Just letting you know so it can be closed or updated when fixed so you don’t have an orphaned bug ticket out there. 

2.  Will keep an eye out for this fix! Is this in Core Unity or the OpenXR plug-in?

thep3000
Level 3

Thanks for the heads-up on the bug ticket, I linked it.

As for the memory leak - if it's blocking you, you can potentially work around it by disabling all UI canvases when the openxr session state changes to idle.  And as far as I know it requires a core change to fix properly.

ROBYER1
Level 4

I was astounded to discover this issue today when catching up with the latest OpenXR plugin when Oculus/Facebook/Meta announced that OpenXR was the standard moving forward. I encountered both the issues mentioned here.

 

What is the eta for a fix?!

The audio extension is implemented in version 1.3.0 of the OpenXR package which should be shipped as verified on 2020.3+ soon.

The canvas issue was fixed and backported the following releases:
 * 2022.1.0a3
 * 2021.2.0b5

 * 2020.3.16f1

If you're still seeing either of these issues on newer versions, please submit a bug and send me it.