alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.49k stars 487 forks source link

ALVR is trying to use the wrong GPU for encoding (Linux) #2418

Open Sol33t303 opened 1 month ago

Sol33t303 commented 1 month ago

Description

ALVR is unable to use/find the hardware encoding of my RX 7800 XT, and instead from command output is trying to use the encoder for my other GPU installed in the system, a GTX 690 with the nouveau drivers (which is bizzare, because even running vainfo only shows the AMD GPU so 0 clue where ALVR could be getting this from). Here is the output from ALVR (also would like to point out the grammer issue of using "you" instead of "your" in the output but that should be a seperate bug report):

[20:24:42.275 INFO alvr_dashboard::steamvr_launcher::linux_steamvr] GPU Encoder vendor: Mesa Gallium driver 24.2.3-arch1.1 for NVE4

[20:24:42.295 ERROR alvr_dashboard::steamvr_launcher::linux_steamvr] H264 profile does not contain encoding entrypoint. You unlikely to have hardware encoding for it.

[20:24:42.295 ERROR alvr_dashboard::steamvr_launcher::linux_steamvr] Couldn't find HEVC profile. You unlikely to have hardware encoding for it.

[20:24:42.295 INFO alvr_dashboard::steamvr_launcher::linux_steamvr] Couldn't find AV1 profile. You unlikely to have hardware encoding for it.

Here is vainfo output:

Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.2.3-arch1.1 for AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 18.1.8, DRM 3.57, 6.10.10-zen1-1-zen)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSlice
      VAProfileNone                   : VAEntrypointVideoProc

General Troubleshooting

Environment

Hyprland/Wayland Using Pipewire for audio

Hardware

https://linux-hardware.org/?probe=ed0490260d

Installation

ALVR Version: 20.11.0

ALVR Settings File: session.json

SteamVR Version: 2.7.4

Install Type:

OS Name and Version (winver on Windows or grep PRETTY_NAME /etc/os-release on most Linux distributions): Arch Linux

The-personified-devil commented 1 month ago

It'd be "you're", but either way this would also apply to your case: https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#amdintel-integrated-gpu--amdintel-discrete-gpu

For further reference you could look into these: https://docs.mesa3d.org/envvars.html#envvar-MESA_VK_DEVICE_SELECT or https://docs.mesa3d.org/envvars.html#envvar-DRI_PRIME

Note that you'll also have to do this with any vr game that you plan on running. Or you can launch steam with it

The-personified-devil commented 1 month ago

which is bizzare, because even running vainfo only shows the AMD GPU so 0 clue where ALVR could be getting this from

SteamVR selects the gpu, alvr has to use the one that SteamVR is using (the dashboard does separate checks on the device it's expecting SteamVR to use based on the environment the dashboard is ran in (yes this means it ignores environment variables in the SteamVR commandline options))