ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.02k stars 255 forks source link

Unity - XR: OpenVR Error! OpenVR failed initialization with error code VRInitError_Init_VRClientDLLNotFound: "vrclient Shared Lib Not Found (102) #696

Open danfitz7 opened 4 years ago

danfitz7 commented 4 years ago

I am trying to use the SteamVR plugin for Unity3d Engine on a linux system. When I run the Simple Sample Scene, I get the following error: XR: OpenVR Error! OpenVR failed initialization with error code VRInitError_Init_VRClientDLLNotFound: "vrclient Shared Lib Not Found (102)"!

The scene runs, but not in VR as expected.

SteamVR and Steam both work just fine - I can run SteamVR Home, visit environments, play games, etc. The problem seems to be that the Unity plugin can't find the SteamVR share library(s).

System Information: *Lenovo P51 Ubuntu 16.04 LTS 64-bit -processor: Intel® Core™ i7-7820HQ CPU @ 2.90GHz × 8 -graphics: Quadro M2200 -Graphics Driver: Nvidia 410.78

Unity 2019.3.10f (Also tried 2018.4.21f1 - same result)

HTC Vive V1 (plus a Vive Tracker)

Steam Client installed with Ubuntu package manager (I also tried installing from official .deb package - no luck) -Steampackage versions: 1586022601 Steam AP v020 -The error happens if I run SteamVR with no betas, SteamVR Beta, or SteamVR linux_temp Beta

SteamVR 1.10.32 (1584924836) SteamVR System Report: https://gist.github.com/danfitz7/8aad64c5481f56ec7a9b26edf5c4a262

I also tried running SteamVR by itself without the Steam Client by launching it directly ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh That output is here: https://gist.github.com/danfitz7/61735d7e797034d35e4278f54b955c3b ...same result.

I also tried downloading the steam runtime (following a seemingly similar issue) and launching Steam with that directory set as the STEAM_RUNTIME env var, then launching SteamVR. Same result.

ChristophHaag commented 4 years ago

I've seen this as a bogus error on Ubuntu. Can you make sure that you have libsdl2-2.0-0 installed?

If yes, and it still happens, running unity with strace ./Unity...whatever might or might not give some insight.

danfitz7 commented 4 years ago

I did not have libsdl2-2.0-0 installed, but it did not help. I can't find anything relevant in strace Unity, but here's the output anyway (75.8MB text file!). strace_unity.txt.tar.gz

danfitz7 commented 4 years ago

I've seen this as a bogus error on Ubuntu. Can you make sure that you have libsdl2-2.0-0 installed?

If yes, and it still happens, running unity with strace ./Unity...whatever might or might not give some insight.

Would reinstalling anything be likely to help? Or installing from a different source?

ChristophHaag commented 4 years ago

Probably not.

In the strace output you posted vrclient.so is successfully opened

open("/home/dfitzgerald/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrclient.so", O_RDONLY|O_CLOEXEC) = 96

Clearly the error message is wrong and vrclient.so was found. In my earlier case I think it was because vrclient.so tried and failed to open sdl2.

Are you launching unity with the run.sh script from the steam runtime as described here? https://github.com/ValveSoftware/SteamVR-for-Linux#runtime-requirements

Perhaps any other missing libraries in the output of ldd ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrclient.so?

danfitz7 commented 4 years ago

Probably not.

In the strace output you posted vrclient.so is successfully opened

open("/home/dfitzgerald/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrclient.so", O_RDONLY|O_CLOEXEC) = 96

Clearly the error message is wrong and vrclient.so was found. In my earlier case I think it was because vrclient.so tried and failed to open sdl2.

Are you launching unity with the run.sh script from the steam runtime as described here? https://github.com/ValveSoftware/SteamVR-for-Linux#runtime-requirements

Perhaps any other missing libraries in the output of ldd ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrclient.so?

Running Unity Editor in the Steam Runtime seems to have solved the issue. ~/.steam/steam/ubuntu12_32/steam-runtime/run.sh ~/Unity/Hub/Editor/2019.3.7f1/2019.3.11f1/Editor/Unity Note this is the runtime for the Steam installed on the system, not the runtime-environment downloaded as-per https://github.com/ValveSoftware/steam-runtime

According to the SteamVR-for-Linux readme.md, "Unity development is not currently supported.". But it seems to be. Is that old info?

However, I also tried upgrading my graphics driver to nvidia-430. I don't think that helped with Error 102, but now Steam is broken with error popup on start:

glXChooseVisual Failed

Seems to be this: https://github.com/ValveSoftware/steam-for-linux/issues/5778 Which is strange because "NVIDIA cards require version 430.26 of the NVIDIA Driver or above and to use the SteamVR Beta" - how do devs install the nvidia drivers? I reverted to the 410 driver - didn't help. I can still launch vrmonitor and SteamVR seems to work, but I'm not sure how it's functionality will be limited without Steam working.