Skip to content

fix(linux): AppImage blank window — stop bundling stale libwayland-client (#106) - #109

Merged
Vesperino merged 1 commit into
masterfrom
fix/106-appimage-libwayland
Jun 9, 2026
Merged

fix(linux): AppImage blank window — stop bundling stale libwayland-client (#106)#109
Vesperino merged 1 commit into
masterfrom
fix/106-appimage-libwayland

Conversation

@Vesperino

Copy link
Copy Markdown
Owner

Root cause

The AppImage ships libwayland-client.so.0 1.22 (from the ubuntu-24.04 build runner). tauri-bundler downloads linuxdeploy from tauri-apps/binary-releases — a binary built 2024-07-29, whose compiled-in excludelist predates the libwayland-client.so.0 entry added upstream on 2024-11-03 (pkg2appimage#559) for exactly this failure.

At runtime: host Mesa ≥ 24.2 (libEGL_mesa.so.0) requires wl_display_create_queue_with_name (wayland 1.23+). The bundled WebKit loads the stale 1.22 copy first (DT_NEEDED + RUNPATH=$ORIGIN); ld.so SONAME dedup then binds the host EGL vendor to that copy → fatal symbol lookup (Fedora/openSUSE link with BIND_NOW) → glvnd has zero EGL vendors → eglGetDisplay() = EGL_BAD_PARAMETER → WebKit CRASH() in the WebProcess:

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

Pure dynamic-linking failure, GPU-independent — hence identical on both reporter machines. .deb/.rpm unaffected (system webkit + system wayland). Same failure class previously hit rpi-imager, normcap, Cura, RPCS3.

Why #107 didn't help

The WEBKIT_DISABLE_DMABUF_RENDERER / WEBKIT_DISABLE_COMPOSITING_MODE overrides are set correctly, but since WebKitGTK 2.46 (WebPage.cpp: drawingArea->updatePreferences(store) runs before updatePreferences(store)) the WebProcess initializes its EGL display before the preference store is applied — the abort is structurally unreachable by env vars. Verified against webkitgtk-2.52.3 sources (the version bundled in v0.5.4).

Reproduced + fix verified (Fedora 44 container, same distro as reporter)

Run Setup Result
1 released v0.5.4 AppImage, unmodified Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...
2 same AppImage, only libwayland-client.so.0 removed no abort, app runs (EGL up via swrast)

Container: Fedora 44, mesa-libEGL 26.0.8, libwayland-client 1.24.

Fix

  • release.yml: pre-seed ~/.cache/tauri/linuxdeploy-x86_64.AppImage with pinned upstream 1-alpha-20251107-1 (compiled-in excludelist contains the libwayland-client.so.0 entry — verified by extracting the binary). tauri-bundler skips its own download when the file exists (verified in tauri-cli 2.9.6 prepare_tools). Signing/updater pipeline untouched.
  • release.yml: post-build assert — release job fails loudly if the AppImage ever bundles libwayland-client again (with extraction sanity check so it can't false-pass).
  • appimage-smoke.yml (new): PRs touching src-tauri/** or the workflows build the AppImage and run the same assert + print the bundled lib inventory for diffing.
  • lib.rs: comment corrected — the fix(linux): WebKitGTK EGL/DMA-BUF blank window on Linux (#106) #107 env vars help on fragile-but-working EGL stacks, but cannot prevent this abort.

Regression risk

Removing the bundled copy means hosts must provide wayland ≥ 1.22 symbols — every host with glibc 2.39 (already required by a noble-built AppImage) qualifies. Currently-working users already resolve identical symbols from their system copy. Remaining bundled libwayland-egl/cursor/server were analysed at symbol level and are not implicated (Mesa's import surface there is ≤ 1.6-era). The smoke workflow guards the bundle composition going forward.

Closes #106

🤖 Generated with Claude Code

tauri-bundler's pinned linuxdeploy (built 2024-07-29) predates the
excludelist entry for libwayland-client.so.0 (added 2024-11-03), so
the AppImage shipped noble's wayland 1.22. Host Mesa >= 24.2 needs
wl_display_create_queue_with_name (wayland 1.23); ld.so SONAME dedup
binds libEGL_mesa to the stale bundled copy, the EGL vendor fails to
load and WebKit's WebProcess aborts with "Could not create default
EGL display: EGL_BAD_PARAMETER", leaving a blank window.

Pre-seed tauri's tools cache with a pinned linuxdeploy that carries
the fixed excludelist, assert the artifact after build, and add a PR
smoke workflow building the AppImage. Reproduced and verified in a
Fedora 44 container: vanilla v0.5.4 aborts; the same AppImage with
libwayland-client removed runs.

The WEBKIT_DISABLE_* overrides from #107 cannot gate this abort:
since WebKitGTK 2.46 the WebProcess initializes EGL before the
preference store is applied.

Closes #106
@Vesperino
Vesperino merged commit f6d3094 into master Jun 9, 2026
1 check passed
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.

Issue with linux AppImage

1 participant