SteamVR-for-Linux icon indicating copy to clipboard operation
SteamVR-for-Linux copied to clipboard

Unreal 5.0.0 doesn't detect HTC Vive Pro Eye / SteamVR in Ubuntu: "VR Preview" greyed out

Open Bengt opened this issue 2 years ago • 17 comments

When I start Unreal Engine 5, the button "VR Preview" in the play mode menu is greyed out.

Steps to reproduce the behavior:

  1. Start the VR Template Project in Unreal Engine 5
  2. Click on the play mode menu
  3. See the greyed-out "VR Preview" button

Expected behavior

The "VR-Preview" button should be selectable and the VR play mode should work.

System Information (please complete the following information):

  • Distribution: Ubuntu 20.04 LTS
  • SteamVR version: 1.21.12
  • Steam client version: March 14th, 2022
  • Opted into Steam client beta: No
  • Graphics driver version: Mesa 21.2.6 (LLVM 12.0.0)
  • Gist for SteamVR System Information

Screenshots

unreal_engine_5_vr_playmode

Additional context

  • I already tried starting SteamVR before launching Unreal Engine, but that does not help.
  • I ensured that all base stations and controllers are active in SteamVR before and while starting Unreal Engine, but that did not help.

There has been a seemingly similar issue in the past, namely #55.

Bengt avatar Apr 08 '22 14:04 Bengt

I am trying to build the project for Linux natively using the "Project Launcher" now.

The "Project Launcher" works, but starts the Unreal project as a 3D application, not a VR one.

Bengt avatar Apr 08 '22 14:04 Bengt

When I run from the steam runtime environment, with SteamVR "Standing by", the "VR Preview" button is still greyed out. I do not have a TestVR.uproject on my system, which is why I used the Unreal VR template project. Specifically, I ran this command with a fresh build of Unreal Editor 5:

~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh \
./Engine/Binaries/Linux/UnrealEditor \
'/home/bengt/Downloads/DFKI/git.ni.dfki.de/VR/VR.Frontend_5.0/VR_Frontend_5_0/VR_Frontend.uproject' \
-opengl4 \
-sm5

I verified that this command works by running the template project as a "Standalone Game". The title of the opened windows says "VR_Frontend (64-bit Development SF_VULKAN_SM5)", which matches the -sm5 command line argument.

I also noticed that the game prints a notice to the screen:

Spectator Mode activated! No HMD!

Is this due to not starting a VR Preview or because SteamVR is not detected?

Bengt avatar Apr 09 '22 13:04 Bengt

The means, the answer closing former issue does not work for me. How can I debug this further?

Bengt avatar Apr 09 '22 13:04 Bengt

I just retested this using a fresh installation, that I was doing anyway: Using Ubuntu Server 20.04 + all updates + the X-SWAT PPA does not work either.

Bengt avatar Apr 12 '22 12:04 Bengt

I am trying to install AMD's Vulkan implementation:

amdgpu-install --vulkan=amdvlk

When starting Unreal Engine from within the Steam environment and in vulkan-mode like so:

~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh \
./Engine/Binaries/Linux/UnrealEditor \
'/home/bengt/Downloads/DFKI/git.ni.dfki.de/VR/VR.Frontend_5.0/VR_Frontend_5_0/VR_Frontend.uproject'

I get this error:

[2022.04.12-12.48.17:045][  0]Message dialog closed, result: Ok, title: WARNING: Known issues with graphics driver, text: The installed version of the AMD graphics driver has known issues.
Please install either the latest or the recommended driver version.

https://www.amd.com/en/support

Radeon RX Vega
Installed: 2.0.207
Recommended: 21.2.6

And the scene rendering is only rudimentary.

Bengt avatar Apr 12 '22 12:04 Bengt

After installing the amdgpu-pro Vulkan driver, like so:

amdgpu-install --usecase=graphics,opencl,rocm --opencl=rocr --vulkan=pro

I still get the same error:

[2022.04.12-13.05.09:993][  0]Message dialog closed, result: Ok, title: WARNING: Known issues with graphics driver, text: The installed version of the AMD graphics driver has known issues.
Please install either the latest or the recommended driver version.

https://www.amd.com/en/support

Radeon RX Vega
Installed: 2.0.207
Recommended: 21.2.6

I also noticed another error:

[2022.04.12-13.09.10:448][  0]LogEngine: Initializing Engine...
Error [GENERAL |  | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - unknown error
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
[2022.04.12-13.09.10:460][  0]LogHMD: Failed to enumerate extensions. Please check that you have a valid OpenXR runtime installed.

So, to install an OpenXR runtime, I installed Monado's build requirements:

sudo apt install --yes meson ninja-build build-essential git wget unzip cmake meson ninja-build libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libxcb-glx0-dev

And build Monado itself:

git clone https://github.com/KhronosGroup/OpenXR-SDK.git
cd OpenXR-SDK
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -Bbuild
sudo ninja -C build install

However, I still get the same error:

Error [GENERAL |  | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - unknown error
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
[2022.04.12-13.27.03:899][  0]LogHMD: Failed to enumerate extensions. Please check that you have a valid OpenXR runtime installed.

I still observe the same behavior of the scene rendering being rudimentary, the VR Preview being unavailable.


As a last attempt, I started the Unreal Editor from outside the Steam environment:

 ./Engine/Binaries/Linux/UnrealEditor '/home/bengt/Downloads/DFKI/git.ni.dfki.de/VR/VR.Frontend_5.0/VR_Frontend_5_0/VR_Frontend.uproject'

I still get an error about the driver having known issues and the same behavior in Unreal Engine.

Bengt avatar Apr 12 '22 13:04 Bengt

Any update were you ever able to get this to work?

ARtSSt avatar Oct 10 '22 19:10 ARtSSt

No, I never got this to work. I gave up and used Unity.

Bengt avatar Oct 10 '22 20:10 Bengt

Hey wanted to report this is still an ongoing issue, no solutions found on my end either.

wyattlrose avatar Apr 07 '23 01:04 wyattlrose

i fixed this on my end, for unreal you do not use the steam plugin, only the openXR plugin. Then go into the steam client and set it to be the default openXRruntime. You may have to reinstall UE5 but i did not. install and tested on UE5.1 or 5.2, ubuntu 20.04 and 22.04 with kde.

ARtSSt avatar Apr 07 '23 03:04 ARtSSt

Oh that is awesome to hear! Its still not quite working for me here, where am I going wrong.

  1. Every single VR plugin in Unreal Engine 5.1 is disabled except for the OpenXR plugin.
  2. When I select SteamVR settings and check under the "Developer" tab, steamVR is the current Open XR Runtime.
  3. I'm executing Unreal engine with a simple "./UnrealEditor"

Anything obvious I could be missing? Are you executing Unreal Editor using any additional args or do you have steamVR on any beta branch?

wyattlrose avatar Apr 07 '23 05:04 wyattlrose

I am out of town and can check in a week when i am home, but i believe I also had to make sure the steam client is set to linux and not proton in one of the developer settings.

ARtSSt avatar Apr 07 '23 05:04 ARtSSt

Solved it ! Tried running it within the steamVR runtime using the command and now it picks up the headset without issue:

~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh ./UnrealEditor

Thanks so much for the help, I'll see how my client is configured and maybe I can get this working outside of the steam runtime..

wyattlrose avatar Apr 07 '23 05:04 wyattlrose

great to hear glad I could help It should be possible to use monado as the openXr runtime and ditch steam I just have not had time to mess with it as I was streaming to my headset and my server still relies on steams ovr drivers. But for local tethered use cases it likely is not hard.

ARtSSt avatar Apr 07 '23 05:04 ARtSSt

I'm having an issue like this, except that I am able to click VR Preview once. When I exit the VR Preview and try to launch it again, i get a "XR_ERROR_CALL_ORDER_INVALID" error in Terminal. Anyone have a similar issue?

WhitleyStriber avatar Dec 14 '23 17:12 WhitleyStriber