Skip to content

fix(linux): disable WebKitGTK DMABUF renderer to stop EGL crash (#641)#36

Merged
msitarzewski merged 1 commit into
mainfrom
fix/linux-webkit-dmabuf-crash
Jul 1, 2026
Merged

fix(linux): disable WebKitGTK DMABUF renderer to stop EGL crash (#641)#36
msitarzewski merged 1 commit into
mainfrom
fix/linux-webkit-dmabuf-crash

Conversation

@msitarzewski

@msitarzewski msitarzewski commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Problem

Agency_Agents_0.2.1_amd64.AppImage aborts on launch with:

Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...

This is WebKitGTK's DMABUF renderer failing to create an EGL display — a well-known issue on many Linux GPU/driver stacks (Arch, NVIDIA, Wayland, newer Mesa). The process dies before the webview appears. Reported in msitarzewski/agency-agents#641 (@tuxarch, Arch).

Fix

Set WEBKIT_DISABLE_DMABUF_RENDERER=1 at the very top of run() (src-tauri/src/lib.rs), before GTK/WebKit initializes — and only when the user hasn't already set the variable, so an explicit override still wins. Linux-only via #[cfg(target_os = "linux")]; a no-op on macOS/Windows.

Testing

  • Host (cargo check + cargo test --lib): clean, 266 pass.
  • Linux compile of the cfg(linux) block validated via a workflow_dispatch Linux CI run on this branch.
  • Immediate user workaround while this ships: WEBKIT_DISABLE_DMABUF_RENDERER=1 ./Agency_Agents_0.2.1_amd64.AppImage.

Resolves msitarzewski/agency-agents#641.

🤖 Generated with Claude Code

The AppImage aborts on launch with "Could not create default EGL display:
EGL_BAD_PARAMETER" on many Linux GPU/driver stacks (Arch, NVIDIA, Wayland,
newer Mesa) — WebKitGTK's DMABUF renderer path can't create an EGL display
and kills the process before the webview appears (#641).

Set WEBKIT_DISABLE_DMABUF_RENDERER=1 at the very top of run(), before
GTK/WebKit initializes, and only when the user hasn't set the variable
themselves so an explicit override still wins. Linux-only via cfg; no-op on
macOS/Windows.

Fixes #641.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@msitarzewski
msitarzewski merged commit ee97efb into main Jul 1, 2026
1 check passed
Helmi-Kobbi pushed a commit to Helmi-Kobbi/agency-agents-app that referenced this pull request Jul 8, 2026
The AppImage aborts on launch with "Could not create default EGL display:
EGL_BAD_PARAMETER" on Arch/Hyprland/Wayland + Intel + newer Mesa (msitarzewski#57).

linuxdeploy bundles libwebkit2gtk's transitive libwayland-{client,cursor,
egl,server} into the AppImage. Those are built against an older Mesa than
the host is running, so when libEGL_mesa initializes the Wayland platform
it hits a protocol/ABI mismatch and aborts in EGL display init — before
WebKit ever reads WEBKIT_DISABLE_DMABUF_RENDERER (our lib.rs runtime lever
from msitarzewski#36/#641). That's why no env var the reporter tried had any effect;
this is a distinct, deeper case than #641.

libwayland — like libGL/libEGL/libgbm/libdrm, which linuxdeploy already
excludes — must come from the running system to match the loaded EGL
stack. Strip the four bundled copies from the AppImage and repack so the
host's copies load. Only the AppImage bundles libs; .deb/.rpm link the
system libwayland and are unaffected.

Refs msitarzewski#57.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdX6PvnCfRgYD11yVpXVor
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.

EGL_BAD_PARAMETER error when running Agency_Agents_0.2.1_amd64.AppImage

1 participant