[BUG] vrcompositor picks the iGPU for a headset on the dGPU (CannotDRMLeaseDisplay), and launch-option env vars don't reach it

Abierto
#1,073 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
10/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
linux, shell

Línea de trabajo

This repository is an issue tracker only, so there is no compositor source to edit here; the first step is reproducing and narrowing the report. Read the attached launch-env-facts.zip (vrcompositor.txt, vrserver.txt, vrcompositor-linux.txt, the captured /proc/<pid>/environ files and vk_device_order.c) and rerun that helper program with and without VK_KHR_xcb_surface/VK_KHR_wayland_surface in the instance extension list to confirm the Mesa device-select ordering. Then compare it against the device-lease code path in #869 and the runtime-escape behaviour in #936. Done would mean a maintainer-confirmed root cause for both halves: device ordering and launch-option environment propagation into vrcompositor.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Describe the bug

Two GPUs (Intel iGPU, RTX 4090), headset on the 4090, KWin Wayland. Started from Steam with no launch options, vrcompositor exits with VRInitError_Compositor_CannotDRMLeaseDisplay: it logs the Intel device as the HMD's device and vkGetDrmDisplay fails (same on 2.18.4, 2.19.2 and 2.19.3). The usual advice, an environment variable in SteamVR's launch options, doesn't help: none of the three variables I tried that way reached vrcompositor. vrserver starts it outside the container ("Runtime escape requested ... using steam-runtime-launch-client --alongside-steam") and it gets the Steam client's environment instead.

Why the Intel device: Mesa's device-select layer puts it first, and the compositor seems to take the first device in the list. With MESA_VK_DEVICE_SELECT_DEBUG=1 in the Steam client's environment the layer prints this from inside vrcompositor (vrcompositor-linux.txt):

selectable devices:
  GPU 0: 10de:2684 "NVIDIA GeForce RTX 4090" discrete GPU 0000:01:00.0
  GPU 1: 8086:a780 "Intel(R) Graphics (RPL-S)" integrated GPU 0000:00:02.0
device-select: device_select_find_boot_vga selected 1

Index 1 is the Intel device, and the layer moves the selected device to the front of the list. It asks the display server which GPU it runs on only when the instance enables VK_KHR_wayland_surface or VK_KHR_xcb_surface (device_select_layer.c, get_default()). vrcompositor.txt shows the instance being created with VK_KHR_xlib_surface and neither of those two, so the layer falls back to the boot VGA device, which is the iGPU here.

To Reproduce

  1. A machine with an Intel iGPU that is the boot VGA device and an NVIDIA card, both Vulkan drivers and Mesa's device-select layer installed (on Arch that is vulkan-mesa-implicit-layers), headset on the NVIDIA card, Wayland session
  2. Start SteamVR from Steam, no launch options
  3. vrcompositor.txt: lease devices for both cards, HMD deviceUUID is the Intel device's, then vkGetDrmDisplay failed and Failed to start compositor: VRInitError_Compositor_CannotDRMLeaseDisplay

What changes it ("works" = vrcompositor starts on the 4090 and logs Acquired drm display!):

as a launch option (VAR=... %command%) on the Steam client itself (VAR=... steam)
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json still fails works
MESA_VK_DEVICE_SELECT=10de:2684 (the 4090's PCI ID) still fails works
NODEVICE_SELECT=1 (the device-select layer off) still fails works

/proc/<pid>/environ while the processes ran: vrserver, inside the container, had the launch-option variable; vrcompositor, outside it, had the variable only when the Steam client itself was started with it.

Expected behavior

The compositor uses the Vulkan device that owns the leased connector, or at least doesn't end up on an integrated GPU when a discrete one is present (the intent described in #869). And launch-option variables reach vrcompositor, or the documentation says they don't.

System Information (please complete the following information):

  • Steam client version (build number or date): 1794536281
  • SteamVR version: 2.19.3 beta (build 26655409)
  • Distribution (e.g. Ubuntu): Arch Linux, Linux 7.3.4, KWin 6.8.2 (Wayland), Mesa 26.2.7, NVIDIA 620.70.06 (open kernel modules)
  • Steam runtime diagnostics: not attached; tell me if you need it
  • Steam and SteamVR logs: the parts of vrcompositor.txt, vrserver.txt and vrcompositor-linux.txt from these launches are in the zip; more on request.
  • Minidumps: none; vrcompositor exits with an initialization error, it doesn't crash

Hardware: i9-14900KS with its iGPU enabled (boot_vga is 1 on it), RTX 4090, Bigscreen Beyond 2e.

Screenshots

None.

Additional context

  • Possibly related: #925 (closed, the same log lines), #238, and the November 13 comment on #1030 (Intel + NVIDIA, the same error).
  • #936 describes the runtime escape. #496 suggests MESA_VK_DEVICE_SELECT in SteamVR's launch options (the second row of the table).
  • The 2.18 release notes list "Fixed GPU selection on systems with both discrete and integrated GPUs". 2.18.4 still ends up on the integrated one here.
  • In the zip: the log excerpts, the environments captured for each launch, and a small program (vk_device_order.c) that shows the same ordering outside SteamVR: Intel first with the compositor's ten instance extensions, the 4090 first as soon as VK_KHR_xcb_surface or VK_KHR_wayland_surface is added to them.

launch-env-facts.zip

Lenguaje dominante
Shell
Estrellas
1.2k
Forks
58
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ValveSoftware/SteamVR-for-Linux

Todos los issues de ValveSoftware/SteamVR-for-Linux

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.