Meumeu / WiVRn

An OpenXR streaming application to a standalone headset
GNU General Public License v3.0
134 stars 22 forks source link

Games do not launch on Linux #45

Closed PassiveLemon closed 3 months ago

PassiveLemon commented 3 months ago

Launching BeatSaber will show the game as starting but it never appears and stops after a couple seconds.

However, if I use the default openvrpaths.vrpath where the runtime is "/home/lemon/.local/share/Steam/steamapps/common/SteamVR", it does launch the game, it just doesn't display it through WiVRn.

openvrpaths.vrpath:

{
  "config": [
    "/home/lemon/.local/share/Steam/config"
  ],
  "external_drivers": [],
  "jsonid": "vrpathreg",
  "log": [
    "/home/lemon/.local/share/Steam/logs"
  ],
  "runtime": [
    "/nix/store/2c6s352y521j2hw1f7mzvgqhcc4a7jm4-opencomposite-unstable-2024-02-05/lib/opencomposite"
  ],
  "version": 1
}

active_runtime.json:

{
  "file_format_version": "1.0.0",
  "runtime": {
    "library_path": "../../../../../nix/store/cm8dkr5nw1ci3146q6sbvhhp2mx8li05-wivrn-0.11/lib/libopenxr_wivrn.so"
  }
}

Steam args: XR_RUNTIME_JSON=/home/lemon/.config/openxr/1/active_runtime.json PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/wivrn_comp_ipc %command%

wivrn-server is running and my HMD is connected to it.

xytovl commented 3 months ago

Does tracking work (controllers and head position)?

Could you also provide wivrn-server, game and hmd app logs, and headset model?

PassiveLemon commented 3 months ago

Hmm well I restarted my computer and now it doesn't seem to crash BS anymore, however it doesn't show in the headset. Quest 1 wivrn beatsaber adb log cat is just filled with repeated garbage so I grepped wivrn

adb logcat | grep wivrn
03-03 15:14:02.084   868 13440 D TrackingService: getSharedMemory: org.meumeu.wivrn#5847, Controller
03-03 15:14:02.090   868 13440 D TrackingService: getSharedMemory: org.meumeu.wivrn, HeadTracker
03-03 15:14:13.369   868  1007 D TrackingService: unregister: org.meumeu.wivrn
03-03 15:14:19.295  1039  2690 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.INFO] flg=0x10010000 pkg=org.meumeu.wivrn cmp=org.meumeu.wivrn/android.app.NativeActivity (has extras)} from uid 10024
03-03 15:14:24.193  1039  1060 W ActivityTaskManager: Activity destroy timeout for ActivityRecord{6d47c3b u0 org.meumeu.wivrn/android.app.NativeActivity t131 f}
03-03 15:14:24.212  1039  1380 I ActivityManager: Process org.meumeu.wivrn (pid 5847) has died: fore TOP 
03-03 15:14:24.213  1039  2690 I WindowManager: WIN DEATH: Window{bfccace u0 org.meumeu.wivrn/android.app.NativeActivity}
03-03 15:14:24.277  1039  1067 I ActivityManager: Start proc 17051:org.meumeu.wivrn/u0a26 for activity {org.meumeu.wivrn/android.app.NativeActivity}
03-03 15:14:25.302   868  1007 D TrackingService: getSharedMemory: org.meumeu.wivrn#17051, Controller
03-03 15:14:26.040   868 13440 D TrackingService: getSharedMemory: org.meumeu.wivrn, HeadTracker
03-03 15:29:37.977   868 13440 D TrackingService: getSocket: org.meumeu.wivrn#17051
03-03 16:55:54.335   868 13440 D TrackingService: getSharedMemory: org.meumeu.wivrn#17051, Controller
03-03 16:55:54.342   868 13440 D TrackingService: getSharedMemory: org.meumeu.wivrn, HeadTracker
03-03 16:55:54.828   868 13440 D TrackingService: getSharedMemory: org.meumeu.wivrn, HeadTracker
03-03 17:10:21.539 17051 20596 I chatty  : uid=10026(org.meumeu.wivrn) tracking_thread expire 11 lines
03-03 17:10:26.020 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 17 lines
03-03 17:10:31.147 17051 20311 I chatty  : uid=10026(org.meumeu.wivrn) dnssd_thread expire 11 lines
03-03 17:10:42.021 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 14 lines
03-03 17:10:43.542 17051 20596 I chatty  : uid=10026(org.meumeu.wivrn) tracking_thread expire 13 lines
03-03 17:10:56.029 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 12 lines
03-03 17:11:07.024 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 12 lines
03-03 17:11:07.547 17051 17092 I chatty  : uid=10026(org.meumeu.wivrn) Thread-2 expire 6 lines
03-03 17:11:11.547 17051 20596 I chatty  : uid=10026(org.meumeu.wivrn) tracking_thread expire 12 lines
03-03 17:11:18.024 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 21 lines
03-03 17:11:26.176 17051 20311 I chatty  : uid=10026(org.meumeu.wivrn) dnssd_thread expire 4 lines
03-03 17:11:38.026 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 9 lines
03-03 17:11:45.553 17051 20596 I chatty  : uid=10026(org.meumeu.wivrn) tracking_thread expire 1 line
03-03 17:11:46.686 17051 20311 I chatty  : uid=10026(org.meumeu.wivrn) dnssd_thread expire 1 line
03-03 17:11:47.027 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 1 line
03-03 17:11:47.553 17051 20596 I chatty  : uid=10026(org.meumeu.wivrn) tracking_thread expire 1 line
03-03 17:11:48.027 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 3 lines
03-03 17:11:49.553 17051 20596 I chatty  : uid=10026(org.meumeu.wivrn) tracking_thread expire 2 lines
03-03 17:11:51.027 17051 20308 I chatty  : uid=10026(org.meumeu.wivrn) OVR::Stats expire 1 line
03-03 17:11:52.186 17051 20311 I WiVRn   : [2024-03-03 17:11:52.186] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
03-03 17:11:57.590 17051 20311 I WiVRn   : [2024-03-03 17:11:57.590] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
03-03 17:12:02.590 17051 20311 I WiVRn   : [2024-03-03 17:12:02.590] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
03-03 17:12:07.595 17051 20311 I WiVRn   : [2024-03-03 17:12:07.595] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
03-03 17:12:12.544  2842  2963 W OVRLibrary: null cursor received for query content://com.oculus.ocms.library/apps/org.meumeu.wivrn
03-03 17:12:12.597 17051 20311 I WiVRn   : [2024-03-03 17:12:12.596] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
03-03 17:12:18.097 17051 20311 I WiVRn   : [2024-03-03 17:12:18.097] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
03-03 17:12:23.597 17051 20311 I WiVRn   : [2024-03-03 17:12:23.597] [WiVRn] [info] Sending query for _wivrn._tcp.local., type PTR
xytovl commented 3 months ago

According to server logs, the headset connected. The application (Beat Saber) apparently did not create an OpenXR session.

beatsaber logs do not contain OpenComposite details, as it won't be using Unity's logger. Could you check if there are messages on standard error or output of the process? If OpenComposite itself loaded, it should log in ~/.local/state/OpenComposite/logs as described in https://gitlab.com/znixian/OpenOVR#reporting-a-bug

PassiveLemon commented 3 months ago

opencomposite

xytovl commented 3 months ago

There isn't any error or OpenXR related log in that file either, without such information I can't tell if the problem is in proton, OpenComposite or WiVRn.

Please try with a native OpenXR application first such as samples from https://gitlab.freedesktop.org/monado/demos

PassiveLemon commented 3 months ago

I ran XRGears since that's the only demo I could find in Nixpkgs:

# XR_RUNTIME_JSON=/home/lemon/.config/openxr/1/active_runtime.json xrgears
[d] xr.c:75 | == Supported OpenXR extensions ==
[d] xr.c:77 | XR_KHR_binding_modification
[d] xr.c:77 | XR_KHR_composition_layer_cylinder
[d] xr.c:77 | XR_KHR_composition_layer_depth
[d] xr.c:77 | XR_KHR_composition_layer_equirect2
[d] xr.c:77 | XR_KHR_convert_timespec_time
[d] xr.c:77 | XR_KHR_swapchain_usage_input_attachment_bit
[d] xr.c:77 | XR_KHR_visibility_mask
[d] xr.c:77 | XR_KHR_vulkan_enable
[d] xr.c:77 | XR_KHR_vulkan_enable2
[d] xr.c:77 | XR_KHR_vulkan_swapchain_format_list
[d] xr.c:77 | XR_EXT_dpad_binding
[d] xr.c:77 | XR_EXT_eye_gaze_interaction
[d] xr.c:77 | XR_EXT_hand_interaction
[d] xr.c:77 | XR_EXT_hand_tracking
[d] xr.c:77 | XR_EXT_hp_mixed_reality_controller
[d] xr.c:77 | XR_EXT_local_floor
[d] xr.c:77 | XR_EXT_samsung_odyssey_controller
[d] xr.c:77 | XR_FB_composition_layer_image_layout
[d] xr.c:77 | XR_FB_display_refresh_rate
[d] xr.c:77 | XR_ML_ml2_controller_interaction
[d] xr.c:77 | XR_MND_headless
[d] xr.c:77 | XR_MND_swapchain_usage_input_attachment_bit
[d] xr.c:77 | XR_MSFT_unbounded_reference_space
[d] xr.c:77 | XR_OPPO_controller_interaction
[d] xr.c:77 | XR_EXTX_overlay
[d] xr.c:77 | XR_MNDX_ball_on_a_stick_controller
[d] xr.c:77 | XR_MNDX_force_feedback_curl
[d] xr.c:77 | XR_MNDX_hydra
[d] xr.c:77 | XR_MNDX_system_buttons
[d] xr.c:77 | XR_EXT_debug_utils
[i] xr.c:111 | Will use equirect2 layer for sky rendering.

Nothing ever showed in the HMD and there's nothing new in the WiVRn stdout or OpenComposite logs.

PassiveLemon commented 3 months ago

I did just add XRGears to Steam and ran it with the same arguments. This time, it did overwrite the OpenComposite log file but it still shows the exact same information. Still nothing in WiVRn stdout.

xytovl commented 3 months ago

I guess you are running a build from https://github.com/NixOS/nixpkgs/pull/293058

Can you make sure the openxr library referenced in the manifest is correct, and that it will open the socket from the expected path. WiVRn overrides some defaults for the build of monado in https://github.com/Meumeu/WiVRn/blob/master/server/CMakeLists.txt#L45.

Everything looks like the server is listening on a different socket than the client (xrgears, opencomposite, etc.) is using. wivrn-server expects to create the socket itself.

PassiveLemon commented 3 months ago

Can you make sure the openxr library referenced in the manifest is correct, and that it will open the socket from the expected path.

Can you give me more details on this? Not quite sure where to look.

Under /run/user/1000/, I see wivrn_comp_ipc and wivrn-sink. As I previously tested out Monado, I also see monado.pid and monado_comp_ipc

xytovl commented 3 months ago

I don't know how to debug that exactly, maybe strace on xrgears can help understand what is happening. It should open the wivrn_comp_ipc socket and send messages to the wivrn-server process through that socket.

You could also check ss -nlp | grep wivrn-server if it is listening on the socket.

PassiveLemon commented 3 months ago

Interestingly, if I enable Monado, disable WiVRn, and run xrgears, it outputs:

ERROR [ipc_client_socket_connect] Failed to connect to socket /run/user/1000/wivrn_comp_ipc: Connection refused!
ERROR [ipc_client_connection_init] Failed to connect to monado service process

So it does appear that it's trying to use wivrn_comp_ipc as defined in my active_runtime.json so I at least know that part seems correct. Re-enabling WiVRn fixes that.

Running ss -nlp | grep wivrn, I see u_str LISTEN 1 8 /run/user/1000/wivrn_comp_ipc 40790396 * 0. There is no process name listed for the socket.

Running strace on xrgears, it's a lot of stuff but right near the end, I see connect(3, {sa_family=AF_UNIX, sun_path="/run/user/1000/wivrn_comp_ipc"}, 110) = 0 which looks like it might be useful. If you need the entire log, I can send it.

xytovl commented 3 months ago

My output for ss:

$ ss -nlp | grep wivrn-server
u_str LISTEN 0      0                        /run/user/2001/wivrn_comp_ipc 126724                 * 0    users:(("wivrn-server",pid=54686,fd=3))  
tcp   LISTEN 0      0

I don't know if I would be able to debug the strace log, you can attach it and see if there's useful information.

It is also possible that client app is not connected, in which case OpenXR client gets blocked until a headset is connected. wivrn-server logs from previous comments show both a successful start (The Monado service has started) and "END_SESSION" at the same time, I would have to check if the "END_SESSION" log is supposed to happen at all.

PassiveLemon commented 3 months ago

Aaaaah, I had been connecting my HMD and then taking off the headset before starting xrgears. The headset might have been disconnecting because of automatic sleep or locking. I did get xrgears to show in the headset, however any game running through Steam does not work. Probably has to do with environment variables.

PassiveLemon commented 3 months ago

I installed BONELAB and launched Steam through the CLI:

/bin/sh\0-c\0XR_RUNTIME_JSON=/home/lemon/.config/openxr/1/active_runtime.json PRESSURE_VESSEL_FILESYSTEMS_RW=/run/user/1000/wivrn_comp_ipc /home/lemon/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1592190 -- /home/lemon/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/lemon/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/home/lemon/.local/share/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/home/lemon/.local/share/Steam/steamapps/common/BONELAB/BONELAB_Steam_Windows64.exe'\0
chdir "/home/lemon/.local/share/Steam/steamapps/common/BONELAB"
ERROR: ld.so: object '/home/lemon/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lemon/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/lemon/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lemon/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lemon/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
x86_64-linux-gnu-capsule-capture-libs: warning: Dependencies of libnvidia-pkcs11.so.545.29.02 not found, ignoring: Missing dependencies: Could not find "libcrypto.so.1.1" in LD_LIBRARY_PATH "/lib64:/lib32:/steamrt/amd64/lib/x86_64-linux-gnu:/steamrt/amd64/lib:/steamrt/amd64/usr/lib/x86_64-linux-gnu:/steamrt/amd64/usr/lib:/steamrt/i386/lib/i386-linux-gnu:/steamrt/i386/lib:/steamrt/i386/usr/lib/i386-linux-gnu:/steamrt/i386/usr/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:/nix/store/g4ayyar0v68y72agnj5s1jsqv637fjl5-pipewire-1.0.1-jack/lib:/home/lemon/.local/share/Steam/steamapps/common/BONELAB", ld.so.cache, DT_RUNPATH or fallback /lib:/usr/lib
x86_64-linux-gnu-capsule-capture-libs: warning: Dependencies of libnvidia-pkcs11.so.545.29.02 not found, ignoring: Missing dependencies: Could not find "libcrypto.so.1.1" in LD_LIBRARY_PATH "/lib64:/lib32:/steamrt/amd64/lib/x86_64-linux-gnu:/steamrt/amd64/lib:/steamrt/amd64/usr/lib/x86_64-linux-gnu:/steamrt/amd64/usr/lib:/steamrt/i386/lib/i386-linux-gnu:/steamrt/i386/lib:/steamrt/i386/usr/lib/i386-linux-gnu:/steamrt/i386/usr/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:/nix/store/g4ayyar0v68y72agnj5s1jsqv637fjl5-pipewire-1.0.1-jack/lib:/home/lemon/.local/share/Steam/steamapps/common/BONELAB", ld.so.cache, DT_RUNPATH or fallback /lib:/usr/lib
x86_64-linux-gnu-capsule-capture-libs: warning: Dependencies of libnvidia-pkcs11.so.545.29.02 not found, ignoring: Missing dependencies: Could not find "libcrypto.so.1.1" in LD_LIBRARY_PATH "/lib64:/lib32:/steamrt/amd64/lib/x86_64-linux-gnu:/steamrt/amd64/lib:/steamrt/amd64/usr/lib/x86_64-linux-gnu:/steamrt/amd64/usr/lib:/steamrt/i386/lib/i386-linux-gnu:/steamrt/i386/lib:/steamrt/i386/usr/lib/i386-linux-gnu:/steamrt/i386/usr/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:/nix/store/g4ayyar0v68y72agnj5s1jsqv637fjl5-pipewire-1.0.1-jack/lib:/home/lemon/.local/share/Steam/steamapps/common/BONELAB", ld.so.cache, DT_RUNPATH or fallback /lib:/usr/lib
pressure-vessel-wrap[3620908]: W: "/run/current-system/sw/bin/getent" is unlikely to appear in "/run/host"
pressure-vessel-wrap[3620908]: W: Found more than one possible libdrm data directory from provider
/nix/store/12f3im03452yq37baczijjxdwcb1nfxf-gvfs-1.52.2/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_source_tag
Failed to load module: /nix/store/12f3im03452yq37baczijjxdwcb1nfxf-gvfs-1.52.2/lib/gio/modules/libgioremote-volume-monitor.so
/nix/store/12f3im03452yq37baczijjxdwcb1nfxf-gvfs-1.52.2/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_source_tag
Failed to load module: /nix/store/12f3im03452yq37baczijjxdwcb1nfxf-gvfs-1.52.2/lib/gio/modules/libgvfsdbus.so
/nix/store/6jccsbgsxjvyydl25x2hx6hrfmyqd0wf-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: undefined symbol: g_assertion_message_cmpint
Failed to load module: /nix/store/6jccsbgsxjvyydl25x2hx6hrfmyqd0wf-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
fsync: up and running.
Setting breakpad minidump AppID = 1592190
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198145741833 [API loaded no]
[OC] Config:231      Checking for app specific config file...
[OC] wini_parse:172      No config file found at /home/lemon/.local/share/Steam/steamapps/common/BONELAB/opencomposite.ini
[OC] CheckAppEnabled:59      [once] Launcher configuration not yet supported on Linux
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_binding_modification
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_composition_layer_cylinder
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_composition_layer_depth
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_composition_layer_equirect2
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_convert_timespec_time
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_swapchain_usage_input_attachment_bit
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_visibility_mask
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_vulkan_enable
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_vulkan_enable2
[OC] CreateOpenXRBackend:115     Extension: XR_KHR_vulkan_swapchain_format_list
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_dpad_binding
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_eye_gaze_interaction
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_hand_interaction
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_hand_tracking
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_hp_mixed_reality_controller
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_local_floor
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_samsung_odyssey_controller
[OC] CreateOpenXRBackend:115     Extension: XR_FB_composition_layer_image_layout
[OC] CreateOpenXRBackend:115     Extension: XR_FB_display_refresh_rate
[OC] CreateOpenXRBackend:115     Extension: XR_ML_ml2_controller_interaction
[OC] CreateOpenXRBackend:115     Extension: XR_MND_headless
[OC] CreateOpenXRBackend:115     Extension: XR_MND_swapchain_usage_input_attachment_bit
[OC] CreateOpenXRBackend:115     Extension: XR_MSFT_unbounded_reference_space
[OC] CreateOpenXRBackend:115     Extension: XR_OPPO_controller_interaction
[OC] CreateOpenXRBackend:115     Extension: XR_EXTX_overlay
[OC] CreateOpenXRBackend:115     Extension: XR_MNDX_ball_on_a_stick_controller
[OC] CreateOpenXRBackend:115     Extension: XR_MNDX_force_feedback_curl
[OC] CreateOpenXRBackend:115     Extension: XR_MNDX_hydra
[OC] CreateOpenXRBackend:115     Extension: XR_MNDX_system_buttons
[OC] CreateOpenXRBackend:115     Extension: XR_EXT_debug_utils
[OC] CreateOpenXRBackend:120     Num layers available: 0 
[OC] GetXRAppName:56     Setting application name to OpenComposite_wine64-preloader
LOG in xrCreateInstance: Instance created
    createInfo->applicationInfo.applicationName: OpenComposite_wine64-preloader
    createInfo->applicationInfo.applicationVersion: 1
    createInfo->applicationInfo.engineName: 
    createInfo->applicationInfo.engineVersion: 0
    appinfo.detected.engine.name: (null)
    appinfo.detected.engine.version: 0.0.0
    quirks.disable_vulkan_format_depth_stencil: false
    quirks.no_validation_error_in_create_ref_space: true
LOG in xrCreateInstance: Selected devices
    Head: 'WiVRn HMD'
    Eyes: '<none>'
    Left: 'WiVRn HMD left hand controller'
    Right: 'WiVRn HMD right hand controller'
    Gamepad: '<none>'
    Hand-Tracking Left: '<none>'
    Hand-Tracking Right: '<none>'
[OC] parseExtensionsStr:14   Str: VK_KHR_external_fence_capabilities VK_KHR_external_memory_capabilities VK_KHR_external_semaphore_capabilities VK_KHR_get_physical_device_properties2
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_fence_capabilities
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_memory_capabilities
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_semaphore_capabilities
[OC] parseExtensionsStr:30   Add extension: VK_KHR_get_physical_device_properties2
[OC] parseExtensionsStr:14   Str: VK_KHR_dedicated_allocation VK_KHR_external_fence VK_KHR_external_memory VK_KHR_external_semaphore VK_KHR_get_memory_requirements2 VK_KHR_external_memory_fd VK_KHR_external_semaphore_fd VK_KHR_external_fence_fd
[OC] parseExtensionsStr:30   Add extension: VK_KHR_dedicated_allocation
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_fence
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_memory
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_semaphore
[OC] parseExtensionsStr:30   Add extension: VK_KHR_get_memory_requirements2
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_memory_fd
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_semaphore_fd
[OC] parseExtensionsStr:30   Add extension: VK_KHR_external_fence_fd
Fossilize INFO: Overriding serialization path: "/home/lemon/.local/share/Steam/steamapps/shadercache/1592190/fozpipelinesv6/steamapprun_pipeline_cache".
[OC] SetupSession:284    Started OpenXR session on runtime 'Monado: WiVRn HMD', hand tracking supported: 0
[OC] PumpEvents:754      Switch to OpenXR state 1
[OC] PumpEvents:754      Switch to OpenXR state 2
[OC] PumpEvents:758      Hit ready state, begin session...
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : Loader does not support simultaneous XrInstances
[OC] VR_ShutdownInternal:339     OpenComposite shutdown
[OC] ShutdownSession:316     Session Exit state has not been reached yet, waiting 250ms ...
[OC] PumpEvents:754      Switch to OpenXR state 3
[OC] PumpEvents:754      Switch to OpenXR state 6
[OC] PumpEvents:754      Switch to OpenXR state 1
[OC] PumpEvents:754      Switch to OpenXR state 8
[OC] PumpEvents:776      Exiting
Fossilize INFO: Overriding serialization path: "/home/lemon/.local/share/Steam/steamapps/shadercache/1592190/fozpipelinesv6/steamapprun_pipeline_cache".
GameOverlay: started '/home/lemon/.local/share/Steam/ubuntu12_32/gameoverlayui' (pid 3621496) for game process 3621284

BONELAB says OpenXR loaderr failed to initialize... Problem with Monado?

xytovl commented 3 months ago

"Loader does not support simultaneous XrInstances", this errors is from OpenXR loader https://github.com/KhronosGroup/OpenXR-SDK/blob/main/src/loader/loader_core.cpp#L248

This happens after OpenComposite created an instance, and is trying to start the session: https://gitlab.com/znixian/OpenOVR/-/blob/openxr/DrvOpenXR/XrBackend.cpp#L755

2 sessions are being started concurrently, and this is not possible. This could be an issue in Proton or OpenComposite, have you tried switching Proton versions? It might also be Bonelab running in OpenXR, but OpenComposite still starting because of Proton, if it is possible to enable OpenVR mode for Bonelab it would help confirm this is the issue.

PassiveLemon commented 3 months ago

This issue in SteamVR itself might be related: https://github.com/ValveSoftware/steam-runtime/issues/575

I don't know if its possible to get BONELAB to use OpenVR but you can go back to the old OpenVR Unity versions of Beat Saber, so I tried that and I still get the same error BONELAB did. Tried Proton all the way down to 5.13-6 but nothing changed there either. I then switched to Proton-GE (8-20 and 8-32) and I do not get that error but I don't think its even starting OpenComposite as the logs for it do not change.

Also correct me if I'm wrong: OpenComposite is a sort of translation layer between OpenVR and OpenXR meaning it allows you to run OpenVR programs through the OpenXR runtime. In this case, if the game is a native OpenXR game, OpenComposite wouldn't be needed but because Proton is trying to start OpenComposite anyways, it's causing the issue?

xytovl commented 3 months ago

This issue in SteamVR itself might be related: ValveSoftware/steam-runtime#575

I don't know if its possible to get BONELAB to use OpenVR but you can go back to the old OpenVR Unity versions of Beat Saber, so I tried that and I still get the same error BONELAB did. Tried Proton all the way down to 5.13-6 but nothing changed there either. I then switched to Proton-GE (8-20 and 8-32) and I do not get that error but I don't think its even starting OpenComposite as the logs for it do not change.

Also correct me if I'm wrong: OpenComposite is a sort of translation layer between OpenVR and OpenXR meaning it allows you to run OpenVR programs through the OpenXR runtime. In this case, if the game is a native OpenXR game, OpenComposite wouldn't be needed but because Proton is trying to start OpenComposite anyways, it's causing the issue?

Indeed OpenComposite is still needed because of Proton, but it should not be an issue as the session should be closed whn the actual game is launched.

An application I use to test is The Lab, it is known to work with WiVRn/OpenComposite, some of the sub-games fail (secret shop, robot repair).

You have not confirmed positive results with xrgear which is the most check: OpenXR, no wine/Proton.

PassiveLemon commented 3 months ago

Actually, I did just run xrgears. Works through the terminal and through Steam (added as a non-steam game). I'll give The Lab a try

PassiveLemon commented 3 months ago

The Lab has the same issues as the other games.

xytovl commented 3 months ago

It seems the issue is not related to WiVRn itself, but OpenComposite/Proton/Pressure vessel. Closing the issue.