Skip to content

Fix blank Linux app window by disabling WebKitGTK DMABUF renderer#44

Open
debanjum wants to merge 1 commit into
mainfrom
fix-linux-blank-screen-dmabuf
Open

Fix blank Linux app window by disabling WebKitGTK DMABUF renderer#44
debanjum wants to merge 1 commit into
mainfrom
fix-linux-blank-screen-dmabuf

Conversation

@debanjum

@debanjum debanjum commented May 29, 2026

Copy link
Copy Markdown
Member

What

Set both WEBKIT_DISABLE_DMABUF_RENDERER=1 and WEBKIT_DISABLE_COMPOSITING_MODE=1 at startup (Linux only, before GTK/WebKit initialize) to force WebKitGTK's legacy rendering paths.

Why

WebKitGTK 2.42+ defaults to a DMA-BUF based GPU renderer (and accelerated compositing) that fails to produce a first paint on many Linux GPU stacks — notably Arch and other non-Ubuntu/Debian setups. The window comes up blank/white and only a manual reload recovers it. This is the cross-distro blank-screen reported in #21, matching upstream tauri-apps/tauri#13885 and #9394.

The accepted community workaround (e.g. Tolaria, yaak) disables both paths together: the compositing failure produces the same blank window on X11 (AcceleratedSurfaceDMABuf was unable to construct a complete framebuffer) that the DMA-BUF flag alone misses. The WebKitGTK maintainer (Igalia) endorses WEBKIT_DISABLE_DMABUF_RENDERER=1 as the first-line fix on WebKit Bugzilla #261874.

Each var is set only when unset, so a user can still override it and it is scoped to Linux, so no effect on macOS/Windows.

Testing

  • Builds clean (cargo check).
  • Needs verification on Arch where the blank screen reproduces.

Scope / follow-up

This addresses the rendering layer of #21 only.

The Could not create default EGL display: EGL_BAD_PARAMETER failure is a distinct problem — the AppImage bundling the build host's GPU libraries (mesa/libEGL/libGL/libwayland) that clash with the target distro's drivers. These env var based changes do not fix that.

If we still see EGL_BAD_PARAMETER, the follow-up is to exclude/replace those host GPU libraries in the AppImage build (slots into the existing repackAppImageWithPristineSidecars step), or pin libwebkit2gtk to a known-good version.

WebKitGTK 2.42+ defaults to a DMA-BUF based renderer (and accelerated
compositing) that fails to produce a first paint on many Linux GPU
stacks, leaving a blank/white window that only a manual reload recovers.
This is the cross-distro blank-screen reported in #21 and matches
upstream tauri-apps/tauri#13885 and #9394.

Force the legacy rendering paths at startup, before GTK/WebKit
initialize, by setting both WEBKIT_DISABLE_DMABUF_RENDERER=1 and
WEBKIT_DISABLE_COMPOSITING_MODE=1 — the accepted workaround disables
both together, since the compositing failure produces the same blank
window on X11 ("AcceleratedSurfaceDMABuf was unable to construct a
complete framebuffer") that the DMA-BUF flag alone misses. Each is set
only when unset so a user can still override it. Scoped to Linux; no
effect on macOS/Windows.

This addresses the rendering layer only. The separate
"Could not create default EGL display: EGL_BAD_PARAMETER" failure seen
on some distros is a GPU-library-bundling problem (the AppImage shipping
the build host's mesa/libEGL/libwayland) and needs a follow-up to
exclude those host libraries from the bundle.
@debanjum
debanjum force-pushed the fix-linux-blank-screen-dmabuf branch from 682129d to aee4647 Compare May 29, 2026 18:14
@FroogalTheDragon

Copy link
Copy Markdown
Contributor

I am getting the same behavior as before sadly. I'm getting the same errors, including Could not create default EGL display: EGL_BAD_PARAMETER.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants