protonscr

duplicate call to `xrCreateInstance` when using OpenComposite + Monado

protonclosed
ValveSoftware/Proton#7905 · opened 2024-07-15 by emily-is-my-username · updated 2025-11-11 · 0 comments · github
Eemily-is-my-username 2024-07-15 github

Currently, VR initialization in Proton seems to require OpenVR and thus SteamVR, even for OpenXR-only games, which complicates setup for other OpenXR runtimes such as Monado. One workaround (as suggested here) is using OpenComposite to bridge all OpenVR calls to the OpenXR runtime.

However, if OpenComposite uses the same openxr_loader library as Proton, VR initialization still fails with: Loader does not support simultaneous XrInstances. There are two OpenXR instances active simultaneously, which is unsupported by the loader.

As @eburema explained here and in the OpenComposite issue, that happens because of the order of operations in steam_helper's initialize_vr_data: First, OpenVR is initialized, and the first OpenXR instance is created through OpenComposite, then wineopenxr's __wineopenxr_get_extensions_internal is called, tries to create the second instance and triggers the error.

This is easily fixed by cleaning up the OpenVR client before invoking the OpenXR loader, as the client is not used anymore and gets closed later in the function anyway.

There may be better ways to support other OpenXR runtimes, for example by requesting the XR extensions independently from OpenVR - directly from the OpenXR runtime (as suggested here), but I deliberately want to keep the scope as small as possible - this is not intended as a feature request for out-of-the-box Monado compatibility.

I also understand that this is not strictly an issue with Proton itself, but using OpenComposite is a useful workaround to run OpenXR games in Monado without changing the OpenVR / SteamVR specific parts of Proton.


OpenComposite issue:

Related Proton issues:

Fix: