protonscr

[BUG] Direct Display Mode fails to acquire xlib display with vulkan-radeon

steamvropen bug
ValveSoftware/SteamVR-for-Linux#530 · opened 2022-08-07 by exodrifter · updated 2022-08-07 · 0 comments · github
Eexodrifter 2022-08-07 github

Describe the bug
On Arch Linux, SteamVR fails to use Direct Display Mode with my AMD GPU with the error "Failed to acquire xlib display". The VR scene is rendered in a window on the monitor and the HMD display remains turned off. I can turn on the HMD display manually with xrandr.

To Reproduce
Steps to reproduce the behavior:

  1. Run SteamVR
  2. Observe that the HMD display is blank and the VR scene is being rendered on the desktop

Expected behavior
Direct Display Mode should be used and the VR scene should be visible in the HMD.

System Information (please complete the following information):

Additional context
I have attempted the following with no success:

  • Using SteamVR 1.14.16 and SteamVR 1.22.13 (same error happens)
  • Using the DRI_PRIME=1 flag
  • Changing the HMD display port connection to the motherboard instead of the dGPU (in this case, SteamVR fails for a different reason, similar to [#514](https://github.com/ValveSoftware/SteamVR-for-Linux/issues/514))
  • Installing the xf86-video-amdgpu package to get Xorg to use the dGPU instead of the iGPU (source)
  • Removing the vulkan-intel and lib32-vulkan-intel drivers so that only the vulkan driver available is the AMD one (source)
  • Specifying the dGPU with MESA_VK_DEVICE_SELECT=1002:73bf (source)
$ pacman -Qs mesa
local/glu 9.0.2-3
    Mesa OpenGL utility library
local/lib32-glu 9.0.2-3
    Mesa OpenGL utility library (32 bits)
local/lib32-mesa 22.1.4-1
    An open-source implementation of the OpenGL specification (32-bit)
local/lib32-vulkan-intel 22.1.4-1
    Intel's Vulkan mesa driver (32-bit)
local/lib32-vulkan-radeon 22.1.4-1
    Radeon's Vulkan mesa driver (32-bit)
local/libva-mesa-driver 22.1.4-1
    VA-API implementation for gallium
local/mesa 22.1.4-1
    An open-source implementation of the OpenGL specification
local/mesa-utils 8.5.0-2
    Essential Mesa utilities
local/mesa-vdpau 22.1.4-1
    Mesa VDPAU drivers
local/vulkan-intel 22.1.4-1
    Intel's Vulkan mesa driver
local/vulkan-radeon 22.1.4-1
    Radeon's Vulkan mesa driver
$ inxi -Gxx # In this output, DP-2 is the HMD
Graphics:
  Device-1: Intel AlderLake-S GT1 vendor: ASUSTeK driver: i915 v: kernel
    ports: active: DP-4 empty: HDMI-A-2,HDMI-A-3 bus-ID: 00:02.0
    chip-ID: 8086:4680
  Device-2: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] driver: amdgpu
    v: kernel arch: RDNA-2 pcie: speed: 16 GT/s lanes: 16 ports: active: DP-1
    off: DP-2 empty: DP-3,HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:73bf
  Device-3: Microdia Webcam Vitade AF type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-3.2.1:11 chip-ID: 0c45:6366
  Device-4: Valve 3D Camera type: USB driver: uvcvideo bus-ID: 2-2.3.1:8
    chip-ID: 28de:2400
  Display: x11 server: X.org v: 1.21.1.4 compositors: 1: xfwm v: 4.16.1
    2: Picom v: git-7e568 driver: X: loaded: modesetting
    alternate: fbdev,intel,vesa gpu: amdgpu,i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 3840x1080
  Monitor-1: DP-1-1 pos: right res: 1920x1080 dpi: 93 diag: 604mm (23.8")
  Monitor-2: DP-4 pos: primary,left res: 1920x1080 dpi: 93
    diag: 604mm (23.8")
  OpenGL: renderer: Mesa Intel Graphics (ADL-S GT1) v: 4.6 Mesa 22.1.4
    direct render: Yes
$ vulkaninfo | grep "GPU id :"
GPU id : 0 (AMD RADV SIENNA_CICHLID):
GPU id : 1 (Intel(R) Graphics (ADL-S GT1)):
$ cat ~/.steam/steam/logs/vrcompositor.txt | head -n 250 | tail -n 10
Sat Aug 06 2022 22:28:51.598356 -  - 168: [email protected]
Sat Aug 06 2022 22:28:51.598359 -  - 169: [email protected]
Sat Aug 06 2022 22:28:51.598363 -  - 170: [email protected]
Sat Aug 06 2022 22:28:51.598367 - Selected mode 1.
Sat Aug 06 2022 22:28:51.717283 - Failed to acquire xlib display
Sat Aug 06 2022 22:28:51.717306 - CHmdWindowSDL: Failed to create direct mode surface
Sat Aug 06 2022 22:28:51.717563 - Requesting 10 device extensions:
Sat Aug 06 2022 22:28:51.717570 -  - VK_KHR_swapchain
Sat Aug 06 2022 22:28:51.717574 -  - VK_KHR_maintenance1
Sat Aug 06 2022 22:28:51.717578 -  - VK_KHR_dedicated_allocation

Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" section in their replies.

Launch options