flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
344 stars 69 forks source link

OpenXR applications cannot use SteamVR #1010

Open FamiliarBreakfast opened 1 year ago

FamiliarBreakfast commented 1 year ago

Game information I have only tested this with Godot's OpenXR and the OpenXR test program as I have no other programs with which to test. I believe this issue affects all OpenXR implementations.

Distribution name and version where applicable Fedora Linux 37 Kernel 6.0.7-301.fc37.x86_64

Flatpak info Flatpak 1.14.0 default host

Problem description OpenXR applications cannot use SteamVR's OpenXR implementation. There are multiple parts to this problem:

  1. steamxr_linux64.json is not in a standard location, so no existing OpenXR loader will detect it automatically.
  2. If one forces OpenXR to load the configuration anyway, it will fail, presumably due to flatpak sandboxing. This can be done through the XR_RUNTIME_JSON env variable.

Log file output from a simple test program: https://pastebin.com/0ZjCdy5e Relevant excerpt:

Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader trampoline
Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering LoaderInstance::CreateInstance
Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader terminator
Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Completed loader terminator
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : LoaderInstance::CreateInstance chained CreateInstance call failed
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : LoaderInstance::CreateInstance chained CreateInstance call failed
Info [GENERAL | xrCreateInstance | OpenXR-Loader] : RuntimeInterface::UnloadRuntime - Unloading RuntimeInterface
Info [GENERAL |  | OpenXR-Loader] : RuntimeInterface being destroyed.
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance failed
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance failed
ERROR: Failed to create XR instance.
at: create_instance (modules/openxr/openxr_api.cpp:286)

Does this issue reproduce with native Steam No.

Vixea commented 1 year ago

could you link the test program?

Adamcake commented 1 year ago

Yeah, doesn't work at all. Beat Saber is the most obvious test case.

DomiStyle commented 11 months ago

This is still an issue it seems. Here's a quick test application made in Godot: OpenXrTest.zip

Run OpenXrTest.sh or open project.godot in the Godot editor.

This will work when added as a non-steam game, it will fail when launched directly from the editor or via the .sh file.

image