Repository navigation
fix(linux): select PipeWire converters from negotiated buffers - #6118
Conversation
|
Bundle ReportBundle size has no change ✅ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6118 +/- ##
==========================================
+ Coverage 51.93% 52.44% +0.51%
==========================================
Files 150 150
Lines 32862 32955 +93
Branches 13858 13870 +12
==========================================
+ Hits 17066 17283 +217
+ Misses 13738 13207 -531
- Partials 2058 2465 +407
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 27 files with indirect coverage changes Continue to review full report in Codecov by Harness.
|
Screenshot ComparisonPR #6118 screenshots vs Matrix:
|
ReenigneArcher
left a comment
There was a problem hiding this comment.
Still applicable, but I recommend holding the merge for the two findings below.
I checked head 9ecb05ebfe1827eae3b2ea1a6b85db282aad04f2 against current master (d00a82f1e874722af75afddfc4bb1d88f77d0cad). The two affected files on current master are unchanged from this PR's base, and the patch applies cleanly. #6011 and #5568 remain unmerged and do not supersede this fix.
The original hardware-validation gap has been addressed: the reporter tested this exact head on RX 590/KWin 6.8.3, confirming visible VA-API video over memory buffers across three connections in one process, with zero EGL_BAD_PARAMETER occurrences. The PR description still says hardware confirmation is pending and should be brought up to date.
Verification: git diff --check and applying the patch with git apply --check against current master passed. An isolated C++ harness using the actual timeout and factory bodies with stubbed backend factories reproduced the Vulkan pending-negotiation failure; this was a control-flow check, not a native/GPU integration test. I inspected the FreeBSD CI log and verified all 11 PipeWire tests passed. I could not rerun the Linux tests on this macOS host; its Docker daemon is unavailable.
Checks remain separate merge/verification concerns: Codecov patch coverage fails at 44.23% (29 changed lines missing or partial); FreeBSD fails X11GrabTest.DisplaySucceedsForFirstMonitor with Could not open X11 display; AppImage aarch64 hangs in the pre-existing PipeWireDisplayTest.TeardownDoesNotCloseFdThatPipeWireClosed and is cancelled, leaving its coverage upload without an artifact. These logs do not establish additional defects introduced by this patch. GitHub reports the PR mergeable and behind master, with no confirmed conflicts; it is still a draft.
Review completed by Codex | Model: gpt-6.1-sol | Thinking: xhigh
Keep unnegotiated storage distinct from confirmed memory so the Vulkan probe and Portal startup retry remain reachable. Guard real frames against the converter's expected storage and regression-test the format, converter, and capture paths.
74b5014 to
80f1f23
Compare
There was a problem hiding this comment.
I rereviewed e3d8f9d against master at d00a82f. Both previous findings remain resolved, and I found no new functional defects. The production PipeWire code is identical to 74b5014. The original VA-API fix still applies to master.
The revised test fixture addresses the five PipeWire test failures from the previous AppImage and Ubuntu 22.04 runs. I compiled both fixture versions against PipeWire 0.3.48's actual SPA headers. The old parser rejected both formats without a frame rate and accepted both revised formats. git diff --check also passed. I did not rerun the full Linux suite. The previous Flatpak x86_64 and Ubuntu 26.04 runs failed in X11 tests, separately from the fixture failure. Previous CI run
The required SonarCloud quality gate has now failed on e3d8f9d with the same two findings. It flagged cpp:S1172 and cpp:S5213 on the existing snapshot() declaration at line 1200. To clear the gate, document PullFreeImageCb with @tparam and use the following declaration in src/platform/linux/pipewire.cpp. The callers and method body can stay as they are. I compiled the proposed declaration and method body with both caller types in an isolated harness with stubbed frame methods. SonarCloud findings
template<typename PullFreeImageCb>
platf::capture_e snapshot(const PullFreeImageCb &pull_free_image_cb, std::shared_ptr<platf::img_t> &img_out, std::chrono::milliseconds timeout, [[maybe_unused]] bool show_cursor) {GitHub reports no merge conflicts. I recommend holding the merge until the required checks complete on e3d8f9d and a code owner approves. SonarCloud Code Analysis is failing, and the current native build and patch coverage results are still pending. Current checks
Review completed by Codex | Model: gpt-6.2-sol | Thinking: xhigh
|























































































Description
When portal/KWin capture negotiates memory buffers, locally available DMA-BUF formats can still make VA-API select its VRAM converter. That sends an image without valid DMA-BUF descriptors to EGL import.
Record the buffer type selected by format negotiation and use it when creating the converter. Startup waits for both dimensions and a buffer type. If the format is still pending at the deadline, VA-API and CUDA can start provisionally with memory. Vulkan can still probe when local DMA-BUF formats are available, so Portal can retry a failed first negotiation without maxFramerate. Vulkan still rejects confirmed memory. Under the existing frame locks, an actual frame that requires a different converter requests capture reinitialization before it can reach that converter.
Modifier advertising is unchanged, and no permanent acceleration-failure flag is added. This addresses the shared-memory/converter mismatch, not genuine EGL import failures for valid DMA-BUFs. #6011 provides a separate manual DMA-BUF workaround; #5568 concerns pixel formats. The reporter validated the negotiated memory path on an RX 590 with KWin 6.8.3: three VA-API sessions on
9ecb05eshowed video withoutEGL_BAD_PARAMETER. That retest did not exercise live DMA-BUF or renegotiation.Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
74b5014: GCC 14 builttest_sunshinewith VA-API, Vulkan, KWin, and Portal enabled. All 17PipeWire*tests passed. The new tests exercise the format callback logic, the actual converter selection with recording factories (including CUDA's selection logic), late DMA-BUF and memory frames, and the Portal pre-stream retry. No live GPU or CUDA runtime test was run. Repository formatting andgit diff --checkpassed.Earlier validation at
9ecb05e:uv sync --locked,uv run --locked lb-update-clang-format, andgit diff --check: passed.sunshineandtest_sunshinebuilt withBUILD_WERROR=ON, VA-API, Vulkan, KWin and portal enabled; CUDA and tray disabled. Command:cmake --build cmake-build-6114 --target test_sunshine sunshine -j 3.test_sunshine --gtest_filter='PipeWire*': 11/11 passed. Temporarily disabling the storage-change guard makesPipeWireBufferTest.StorageChangesAreRejectedBeforeCopyingFramefail; restored the fix before final validation.PortalRequestTest.*andEmptyStartResponses/PortalRequestStaleTokenTest.*: their D-Bus daemon cannot open a socket (Operation not permitted). The failed suite setups areX11GrabTest,Configurations/AudioTest,MouseInputs/MouseHIDTest, andEncoderVariants/EncoderTest; platform initialization fails without DISPLAY/WAYLAND_DISPLAY. All 11 PipeWire tests passed again in this run. Xvfb also could not create listening sockets in this container.Type of Change
Checklist
AI Usage
See our AI usage policy.