fix(linux): disable WebKitGTK compositing in VMs to fix black iframes#441
Merged
fix(linux): disable WebKitGTK compositing in VMs to fix black iframes#441
Conversation
WebKitGTK promotes iframes, <video>, and canvas elements to GPU-textured compositing layers. In VMs (Apple Virtualization.framework, QEMU, VMware, etc.) the virtio-gpu driver often only supports 2D or limited GL, so GBM buffer allocation for compositing layers fails silently — rendering iframe/video content as black while the main page works fine. Detect VM environments via /proc/cpuinfo hypervisor flag and sys_vendor strings, then set WEBKIT_DISABLE_COMPOSITING_MODE=1 and LIBGL_ALWAYS_SOFTWARE=1 to force software rendering for all content. Native Linux machines with real GPUs are unaffected.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
facusturla
pushed a commit
to facusturla/worldmonitor
that referenced
this pull request
Feb 27, 2026
…koala73#441) WebKitGTK promotes iframes, <video>, and canvas elements to GPU-textured compositing layers. In VMs (Apple Virtualization.framework, QEMU, VMware, etc.) the virtio-gpu driver often only supports 2D or limited GL, so GBM buffer allocation for compositing layers fails silently — rendering iframe/video content as black while the main page works fine. Detect VM environments via /proc/cpuinfo hypervisor flag and sys_vendor strings, then set WEBKIT_DISABLE_COMPOSITING_MODE=1 and LIBGL_ALWAYS_SOFTWARE=1 to force software rendering for all content. Native Linux machines with real GPUs are unaffected.
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
/proc/cpuinfohypervisor flag and/sys/class/dmi/id/sys_vendorstringsWEBKIT_DISABLE_COMPOSITING_MODE=1to force software rendering for all content including iframesLIBGL_ALWAYS_SOFTWARE=1to ensure consistent Mesa llvmpipe renderingWhy
WebKitGTK promotes iframes,
<video>, and canvas elements to GPU-textured compositing layers (separate from the main page's software-tiled rendering). In VMs (Apple Virtualization.framework, QEMU/KVM, VMware, etc.) the virtio-gpu driver only supports 2D or limited GL — GBM buffer allocation for these compositing layers fails silently, rendering iframe/video content as black while the main page works fine.This explains why Live News (YouTube), Live Webcams, and other iframe-embedded content shows black boxes while all other panels render correctly.
Test plan
[tauri] VM detected; disabled WebKitGTK accelerated compositingmessage in VMWEBKIT_DISABLE_COMPOSITING_MODE=1 LIBGL_ALWAYS_SOFTWARE=1 ./WorldMonitor.AppImage