[BUG] vrcompositor picks the iGPU for a headset on the dGPU (CannotDRMLeaseDisplay), and launch-option env vars don't reach it
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 10/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- linux, shell
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Shell
- 星标
- 1.2k
- 派生
- 58
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ValveSoftware/SteamVR-for-Linux 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
ValveSoftware/SteamVR-for-Linux#981 · 4 条评论 · 1 个 reaction ·
-
bug
难度 4/5 3-5 天 新手友好度 38/100
ValveSoftware/SteamVR-for-Linux#1097 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
ValveSoftware/SteamVR-for-Linux#1095 · 2 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
ValveSoftware/SteamVR-for-Linux#1094 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ValveSoftware/SteamVR-for-Linux#1093 ·
查看 ValveSoftware/SteamVR-for-Linux 的全部 Issue
相似的 Issue
-
area: build-and-ci guard-red-main S3: minor
难度 2/5 1-3 小时 新手友好度 72/100
manaflow-ai/cmux#65616 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
achisolomon/software-factory#300 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
flathub/cc.arduino.IDE2#168 ·
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 90/100
oscarbol09/solwatch#28 ·
维护者通常 2 天内回复
-
difficulty:easy func:buildsystem prio:low type:task
难度 2/5 1-3 小时 新手友好度 87/100
NatronGitHub/Natron#2070 ·
维护者通常 1 天内回复