fix(linux): disable WebKitGTK DMABUF renderer to stop EGL crash (#641)#36
Merged
Conversation
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>
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
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.
Problem
Agency_Agents_0.2.1_amd64.AppImageaborts on launch with: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=1at the very top ofrun()(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
cargo check+cargo test --lib): clean, 266 pass.cfg(linux)block validated via aworkflow_dispatchLinux CI run on this branch.WEBKIT_DISABLE_DMABUF_RENDERER=1 ./Agency_Agents_0.2.1_amd64.AppImage.Resolves msitarzewski/agency-agents#641.
🤖 Generated with Claude Code