[BUG] vrcompositor picks the iGPU for a headset on the dGPU (CannotDRMLeaseDisplay), and launch-option env vars don't reach it
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 10/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- linux, shell
- Ambito
- computer-graphics, operating-systems
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- 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 - Start SteamVR from Steam, no launch options
- vrcompositor.txt: lease devices for both cards,
HMD deviceUUIDis the Intel device's, thenvkGetDrmDisplay failedandFailed 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_SELECTin 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 asVK_KHR_xcb_surfaceorVK_KHR_wayland_surfaceis added to them.
- Lingua principale
- Shell
- Stelle
- 1.2k
- Fork
- 58
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ValveSoftware/SteamVR-for-Linux
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ValveSoftware/SteamVR-for-Linux#981 · 4 commenti · 1 reazione ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
ValveSoftware/SteamVR-for-Linux#1097 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ValveSoftware/SteamVR-for-Linux#1095 · 2 commenti ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
ValveSoftware/SteamVR-for-Linux#1094 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ValveSoftware/SteamVR-for-Linux#1093 ·
Tutte le issue di ValveSoftware/SteamVR-for-Linux
Issue simili
-
Bump runtime to 26.08Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
flathub/cc.arduino.IDE2#168 ·
-
area:docs community needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NetSparkleUpdater/NetSparkle#759 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sidebandstudio/clawtrate#1114 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100