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

Đang mở
#1,073 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
10/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
linux, shell

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Shell
Star
1.2k
Fork
58
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ValveSoftware/SteamVR-for-Linux

Tất cả issue của ValveSoftware/SteamVR-for-Linux

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.