[BUG] OpenXR: xrEndFrame blocks until vsync while xrWaitFrame returns immediately (Linux, Vulkan)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 8/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- linux
调研方向
This repo is an issue tracker for the closed-source SteamVR Linux runtime, so there is no source tree here to patch; the first step is reproducing the timing with a Vulkan OpenXR app and logging xrWaitFrame, xrBeginFrame and xrEndFrame durations against IVRCompositor::GetFrameTimings as the reporter did. Read the linked 2020 SteamVR forum thread about the 1.15.10 fix to see what regressed. Done means the timing traces are attached and a Valve engineer can confirm whether pacing has moved back into xrEndFrame.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
On Linux, SteamVR's OpenXR runtime paces the application inside xrEndFrame
instead of xrWaitFrame:
xrWaitFramereturns almost immediately (median 0.05–0.3 ms), even when
called early in the frame interval.xrEndFrameblocks for 4–6 ms (median 4.6–4.8 ms) and returns about 0.2 ms
after the next vsync.- The block does not track GPU load. The app's GPU work is about 1.3 ms per
frame and GPU utilisation is 15–25%.
The spec places throttling in xrWaitFrame ("xrWaitFrame throttles the
application frame loop in order to synchronize application frame submissions
with the display") and says xrEndFrame "may return immediately".
Why it matters
An engine that calls xrEndFrame on its render thread loses that thread for
the length of the block. The next frame cannot start until just after vsync,
and the compositor starts its work about 7.5 ms after vsync, so the app has
about 7.3 ms to produce a frame rather than 11.1 ms at 90 Hz. In a scene that
fits the full interval comfortably, 8–10% of frames were reprojected; with
the block kept off the render thread, about 1%.
Related
This looks like the behaviour reported in 2020 on the SteamVR OpenXR forum,
"xrEndFrame() blocks instead of xrWaitFrame()", where a Valve developer
replied that it was fixed in 1.15.10:
https://steamcommunity.com/app/250820/discussions/8/3001046778348674981/
To Reproduce
- Run a Vulkan OpenXR application on SteamVR for Linux.
- Time each of
xrWaitFrame,xrBeginFrameandxrEndFrame. xrWaitFramereturns at once;xrEndFrameholds the caller until vsync.
Cross-checked against IVRCompositor::GetFrameTimings, read from a
background OpenVR application.
Expected behavior
xrWaitFrame blocks to pace the application, and xrEndFrame returns
promptly.
System Information
- SteamVR version: 2.19.3 (beta)
- Distribution: Arch Linux, kernel 7.3.4-arch1-1, GNOME on Wayland
- GPU: NVIDIA GeForce RTX 5070 Ti, driver 620.70.06
- Headset: Valve Index, 90 Hz
- 主要语言
- 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 天内回复