ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
917 stars 45 forks source link

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

Open Bengt opened 2 years ago

Bengt commented 2 years ago

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):

Screenshots

unreal_engine_5_vr_playmode

Additional context

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

Bengt commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

Bengt commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.

ARtSSt commented 1 year ago

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

Bengt commented 1 year ago

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

wyattlrose commented 1 year ago

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

ARtSSt commented 1 year ago

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.

wyattlrose commented 1 year ago

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?

ARtSSt commented 1 year ago

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.

wyattlrose commented 1 year ago

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..

ARtSSt commented 1 year ago

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.

WhitleyStriber commented 8 months ago

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?