fix(recording): disable Vulkan on Wayland so PipeWire capture can import DMA-BUF frames#91
Merged
Merged
Conversation
…ort DMA-BUF frames On Wayland the app forces ozone-platform=wayland and enables the WebRTC PipeWire capturer, but leaves Vulkan enabled. Chromium's Wayland Ozone backend can't use Vulkan, so when it initializes Vulkan the desktop-capture DMA-BUF frames fail to import into EGL: '--ozone-platform=wayland' is not compatible with Vulkan Error creating EGLImage - EGL_BAD_MATCH DMA-BUF modifier ... failed for format 12 (BGRA), marking as failed and renegotiating The stream then renegotiates and screen recording produces no usable frames. Append disable-features=Vulkan on Wayland so capture uses the GL/EGL path, which is what the DMA-BUF import expects. This is the fix Chromium itself suggests in the log. Reported on v1.7.0-rc.1 (Intel iGPU + Wayland). Needs validation on the reporter's setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe Electron main process now disables Chromium’s Vulkan feature when running in a Linux Wayland session, alongside the existing Wayland-specific command-line switches. ChangesWayland Vulkan Configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
This was referenced Jul 16, 2026
Closed
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.
Closes #92.
Closes #93.
Problem
A tester on v1.7.0-rc.1 (Wayland, Intel iGPU) reported screen recording not working, with these logs:
In
electron/main.tswe forceozone-platform=waylandand enableWebRTCPipeWireCapturer, but leave Vulkan enabled. Chromium's Wayland Ozone backend can't use Vulkan; when it initializes Vulkan, the PipeWire desktop-capture frames fail to import into EGL (EGL_BAD_MATCH), the stream renegotiates, and recording produces no usable frames. Chromium prints the fix itself in the first log line.Fix
Append
disable-features=Vulkanon Wayland so capture uses the GL/EGL path, which is what the DMA-BUF import expects.Validation needed — cannot reproduce in CI
CI runs on Linux headless with no Wayland session, and maintainers here are on macOS/Windows, so this can't be verified automatically. It needs a real Wayland box.
@reporter — could you build this branch and confirm recording works?
git fetch origin claude/fix-wayland-vulkan-capture git checkout claude/fix-wayland-vulkan-capture npm ci && npm run devThen start a screen recording and check the logs no longer show
EGL_BAD_MATCH/ DMA-BUF renegotiation, and the output has real frames.Also, to help triage the rest
The shared logs evidence this one capture defect (two symptoms). The report mentioned 4 bugs total — could you list the other three, each with a short repro + its own log slice? And to confirm scope for this one:
glxinfo | grep "OpenGL version"oreglinfo)?If
EGL_BAD_MATCHpersists even with Vulkan disabled, the next levers are pinning the GL backend (--use-gl=egl/ ANGLE) or forcing linear buffers — but let's confirm this narrower fix first.🤖 Generated with Claude Code
Summary by CodeRabbit
Validated by the reporter on a real Wayland + Intel setup: capture works and runs at 60 fps in and out. This confirms the fps drop (#93) was downstream of the DMA-BUF import failure, not an encoder bug. Cursor issues (#94) are unaffected and tracked separately.