Repository navigation
fix(linux): multi-GPU VA-API render-node probing - #1543
Draft
EtienneLescot wants to merge 3 commits into
Draft
EtienneLescot wants to merge 3 commits into
EtienneLescot wants to merge 3 commits into
Conversation
- Probe candidate DRM render nodes (/dev/dri/renderD128..135) with fallback in dmabuf_import.rs, encoder.rs, and pipeline_linux.rs for hybrid GPU systems. - Gate render node candidate discovery in encoder.rs to VA-API only. - Support OPENSCREEN_LINUX_RENDER_NODE override with automatic fallback. Split out of getopenscreen#1476. Refs getopenscreen#1340
The dmabuf importer and the VA-API encoder now try the nodes in the same order, from one function, so they settle on the same GPU. The encoder no longer tries the libva default between the override and the scan; it falls back to it only when no node exists. Check the Vulkan H.264 queue after the device is created, not before: the check read a null device. Refs getopenscreen#1340
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
3 of 16 tasks
VaapiEncoder::open imports dmabufs exported by the compositor's wgpu device, so it must open on that GPU. Read its render node from VK_EXT_physical_device_drm (Gpu::render_node) and try it right after OPENSCREEN_LINUX_RENDER_NODE. The renderD128..135 scan now runs only when the driver does not expose the node. Refs getopenscreen#1340
Member
Author
|
Hi @PyVoyager, this PR carries your render-node probing, split out of #1476 (your commit keeps your name). CI compiles it, but nobody on our side has a hybrid-GPU Linux machine. Could you build this branch (
Thanks a lot for the original write-up! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Multi-GPU DRM render-node selection for the Linux helper and the compositor's VA-API export encoder, split out of #1476 so the
vaMapBuffer2shim can land first. The probing is @PyVoyager's work; their commit keeps their name.pipeline_linux.rs):VaapiEncoder::opennow opens on the render node of the GPU wgpu renders on, read fromVK_EXT_physical_device_drm(Gpu::render_nodeind3d_linux.rs). Order:OPENSCREEN_LINUX_RENDER_NODE, then that node. TherenderD128..135scan runs only when the driver does not expose the node (lavapipe, Vulkan 1.0 instance). No new dependency:ashandwgpu-halare already there.dmabuf_import.rs,encoder.rs): honorsOPENSCREEN_LINUX_RENDER_NODE, then probes/dev/dri/renderD128..renderD135. The importer and the encoder walk one candidate list, in the same order, so they pick the same node.Draft: what is missing
OPENSCREEN_LINUX_RENDER_NODEstays the workaround.h264_vaapion the rendering GPU's node. Plus the evidence thecrates/compositor/**andelectron/native/**locks ask for.Related issue
Refs #1340
Follows #1476.
🤖 Generated with Claude Code