-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot use custom OpenXR runtime #7382
Comments
Not 100% sure but I think it might have something to with the checks steam_helper does during initialize_vr_data that get checked during get_vulkan_extensions The initialize_vr_data checks get sometimes ignored for OpenVR games (or can be forced to OK by symlinking wineopenxr.dll to /dev/null), but wineopenxr.dll doesn't init unless the check is OK and wineopenxr.dll is present, under monado + opencomposite the check in initialize_vr_data fails due to not being able to open an openxr instance twice (this is a limited by openxrloader). The result of the the check is stored in the volatile reg key "Software\Wine\VR" Tried to make a patch to test this, but haven't been able to compile proton to test |
When using opencomposite, both OpenVR and OpenXR will call the same OpenXR loader, which only supports a single active instance. After calling `xrCreateInstance` once (indirectly, through opencomposite), creating another OpenXR instance in `__wineopenxr_get_extensions_internal` fails. As a workaround, this commit moves the code that probes OpenXR extensions (and destroys its instance afterwards) *before* OpenVR initialization. Note that according to [this comment](https://github.com/ValveSoftware/Proton/blob/b6d5618b6da9c90649590fedea70b0af8ba2e7e6/wineopenxr/openxr.c#L322), the original order is needed because of a bug in SteamVR, so this commit will probably break SteamVR in some way (i haven't checked, though) Fixes: https://gitlab.com/znixian/OpenOVR/-/issues/416 ValveSoftware#7382 (comment)
This patch successfully worked for me to get around the "Loader does not support simultaneous XrInstances" error. I tested both OpenVR and OpenXR games with Proton + Monado on NixOS. EDIT: |
I am trying to run Beat Saber using Monado. Setting the following three environment variables doesn't work:
Interestingly enough, those same environment variables work fine for OpenVR games.
From a
PROTON_LOG
, I discovered thatXR_RUNTIME_JSON
is ignored by OpenXR Loader (see https://github.com/KhronosGroup/OpenXR-SDK/blob/49e81bbd919af7c0cf513517a730d12253c28902/src/common/platform_utils.hpp#L329 and log below)I also tried changing the active runtime by pointing
~/.config/openxr/1/active_runtime.json
to my Monado runtime.I have uploaded a Proton log for Beat Saber here: https://gist.github.com/Scrumplex/49390ce5bea8ce81fb672bfa656e82b8
It is being launched just with those env vars above
The text was updated successfully, but these errors were encountered: