protonscr

[BUG] No RandR Direct Display with Nvidia Graphics

steamvropen bug
ValveSoftware/SteamVR-for-Linux#561 · opened 2023-02-06 by securewidget · updated 2023-02-15 · 3 comments · github
Ssecurewidget 2023-02-06 github

Describe the bug
I have a laptop (system76 Gazelle) with switchable graphics on Pop!_OS 22.04, and I tried running SteamVR with both the integrated and nvidia graphics setups. In the integrated graphics setup, there are no issues running games aside from the obvious performance issues. However when I switch to nvidia graphics, the headset only shows a dark display, and the VRcompositor opens up on the laptop display, with SteamVR compaining about a Direct Display Mode.

Expected behavior
I expect the VRcompositor to open up on the HMD, and run in the same way on integrated graphics and nvidia graphics.

System Information (please complete the following information):

  • Distribution: Pop!_OS 22.04
  • SteamVR version: 1.25.3 (beta)
  • Steam client version: Jan 31, 2023, at 19:10:17
  • Opted into Steam client beta?: While debugging, issues still present in beta though, and decided to completely reinstall steam.
  • Graphics driver version: (nvidia-driver-525) 525.78.01-1pop0~1673390323~22.04~32dc0cf
  • Gist for SteamVR System Information: https://gist.github.com/securewidget/4b0f32e0378e20929ead2e7bed08eb68

Additional context
I have looked at the vrcompositor.log file, and I have noticed that on runs where the integrated graphics card is used, something like the following is present.
Mon Feb 06 2023 01:57:38.529166 - Looking for direct display through RandR
Mon Feb 06 2023 01:57:38.529176 - - Root 0x781
Mon Feb 06 2023 01:57:38.548268 - - Output 0x42 - 51 modes, 1 preferred
Mon Feb 06 2023 01:57:38.548333 - - Mode 0 0x48 1920x1080 (looking for 2880x1600)
Mon Feb 06 2023 01:57:38.548378 - - Output 0x43 - 0 modes, 0 preferred
Mon Feb 06 2023 01:57:38.548418 - - Output 0x44 - 0 modes, 0 preferred
Mon Feb 06 2023 01:57:38.548457 - - Output 0x45 - 0 modes, 0 preferred
Mon Feb 06 2023 01:57:38.548494 - - Output 0x46 - 4 modes, 1 preferred
Mon Feb 06 2023 01:57:38.548510 - - Mode 0 0x7b 2880x1600 (looking for 2880x1600)
Mon Feb 06 2023 01:57:38.548526 - - Found matching output 70
Mon Feb 06 2023 01:57:38.548542 - Found candidate direct display as RandR output 0x46
Mon Feb 06 2023 01:57:38.585775 - Tried to find direct display through RandR: 0x5577705eafe0
Mon Feb 06 2023 01:57:38.585798 - Trying to match desired rate of 90.000000Hz.

In contrast, when the nvidia card is used, the following is present instead. For some reason, it appears that the laptop is unable to locate the direct display when the laptop is in nvidia mode, however it is present in the xrandr output as well.
Mon Feb 06 2023 04:06:09.927679 - Looking for direct display through RandR
Mon Feb 06 2023 04:06:09.927685 - - Root 0x21b
Mon Feb 06 2023 04:06:09.950882 - - Output 0x1da - 51 modes, 1 preferred
Mon Feb 06 2023 04:06:09.950906 - - Mode 0 0x1e0 1920x1080 (looking for 2880x1600)
Mon Feb 06 2023 04:06:09.950928 - - Output 0x1db - 0 modes, 0 preferred
Mon Feb 06 2023 04:06:09.951008 - - Output 0x1dc - 0 modes, 0 preferred
Mon Feb 06 2023 04:06:09.951025 - - Output 0x1dd - 0 modes, 0 preferred
Mon Feb 06 2023 04:06:09.951041 - - Output 0x1de - 4 modes, 1 preferred
Mon Feb 06 2023 04:06:09.951046 - - Mode 0 0x213 2880x1600 (looking for 2880x1600)
Mon Feb 06 2023 04:06:09.951051 - - Found matching output 478
Mon Feb 06 2023 04:06:09.951056 - Found candidate direct display as RandR output 0x1de
Mon Feb 06 2023 04:06:09.952360 - Tried to find direct display through RandR: (nil)
Mon Feb 06 2023 04:06:09.952368 - Looking for direct display through Vulkan WSI
Mon Feb 06 2023 04:06:09.952373 - Tried to find direct display through Vulkan WSI: (nil)
Mon Feb 06 2023 04:06:09.952383 - CHmdWindowSDL: Failed to create direct mode surface

Ssecurewidget 2023-02-07 github

I was able to get it partially working using "xrandr --output DP-1-3 --set non-desktop 0 --preferred", however the steam menus do not work in the vr, and I don't think this is the intended way to do thi, but it works as a workaround. I will leave this issue open in case the original problem can be fixed.

RRedTopper 2023-02-11 github

How are you running Steam? I am using Steam via Flatpak and my distro (Fedora Kinoite) recently updated from 525.78.01 to 525.85.05. I was able to reproduce SteamVR failing to use Direct Display Mode and opening directly on my monitor instead. I rolled back my driver version to 525.78.01 and it would work again.

Specifically in the log I would see:

Sat Feb 11 2023 13:21:31.337292 - Tried to find direct display through RandR: (nil)
Sat Feb 11 2023 13:21:31.337297 - Looking for direct display through Vulkan WSI
Sat Feb 11 2023 13:21:31.337304 - Tried to find direct display through Vulkan WSI: (nil)
Sat Feb 11 2023 13:21:31.337307 - CHmdWindowSDL: Failed to create direct mode surface
<snip>
Sat Feb 11 2023 13:21:31.492315 - GPU Vendor: "llvmpipe (LLVM 15.0.7, 256 bits)" GPU Driver: "1"

After running flatpak update, it installed the newer drivers for me and would successfully find a display:

Sat Feb 11 2023 13:27:26.788722 - Tried to find direct display through RandR: (nil)
Sat Feb 11 2023 13:27:26.788729 - Looking for direct display through Vulkan WSI
Sat Feb 11 2023 13:27:26.835051 -  - Vulkan output 0: 3840x2160 resolution, 700x400 dimensions - LG Electronics LG HDR 4K (DP-2)
Sat Feb 11 2023 13:27:26.835066 -  - Vulkan output 1: 2880x1600 resolution, 0x0 dimensions - Valve Corporation Index HMD (DP-4)
Sat Feb 11 2023 13:27:26.835071 - Tried to find direct display through Vulkan WSI: 0x5569fd4c0fe0
Sat Feb 11 2023 13:27:26.839476 - Trying to match desired rate of 120.019005Hz.
<snip>
Sat Feb 11 2023 13:27:27.254360 - GPU Vendor: "NVIDIA GeForce RTX 3080 Ti" GPU Driver: "2203402560"

The trouble is: this might not be your specific issue... My display ended up being detected by Vulkan WSI instead of RandR. And considering you re-installed steam I would figure that would force a driver update via Flatpak anyway (if you are using it). But perhaps this will point someone else with a direct display mode issue in the right direction?

Ssecurewidget 2023-02-15 github

I have been using apt-get. At first, I was using the steam from the repositories of Pop!_OS, but while debugging I tried the official latest steam deb from steam, with no effect on the issue. I can confirm that the issue is present on both driver versions on my end, so I doubt it is the same issue as yours.

Nothing extracted yet.