Skip to content

AppImage: invisible window (EGL_BAD_PARAMETER) on current Mesa — bundled libwayland-* conflict, plus forced GDK_BACKEND=x11 and uim IM crash #37

Description

@M4tEd

Summary

On rolling-release distros with current Mesa (CachyOS/Arch confirmed), the 4.0.0 Linux AppImage starts with an invisible/blank window. The main process stays alive (tray icon, WWMM Image Server on 127.0.0.1:3469), but the WebKit web process aborts before rendering:

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

This is the same crash as #33 (also CachyOS/KDE Wayland) — I hit it independently and did a full root cause, posting it here so it's fixable build-side. Related packaging context: #17.

Environment

  • CachyOS (Arch-based, rolling), kernel 7.2.0-1-cachyos
  • KDE Plasma 6.7.4, Wayland session (KWin 6.7.4)
  • Mesa 26.2.1, AMD RX 9070 (Navi 48) + Raphael iGPU
  • IMM 4.0.0 AppImage installed via install.sh

Root cause (verified)

The AppImage bundles Ubuntu-era Wayland libraries (libwayland-client.so.0, libwayland-cursor.so.0, libwayland-egl.so.1, libwayland-server.so.0 in usr/lib/), and the linuxdeploy AppRun prepends the bundled dir to LD_LIBRARY_PATH. Current Mesa's libEGL_mesa.so.0 requires wl_display_create_queue_with_name (wayland ≥ 1.23); resolved against the bundled older libwayland, that symbol is missing and libEGL fails to load entirely:

$ LD_DEBUG=libs ./integrated-mod-manager-imm.AppImage 2>&1 | grep wl_display_create_queue_with_name
/usr/lib/libEGL_mesa.so.0: error: symbol lookup error: undefined symbol: wl_display_create_queue_with_name (fatal)

Because the failure happens at library load time, it breaks EGL on every backend — which is why none of the usual suspects change anything (all tested): WEBKIT_DISABLE_DMABUF_RENDERER=1, WEBKIT_DISABLE_COMPOSITING_MODE=1, GDK_BACKEND=x11, EGL_PLATFORM=x11, LIBGL_ALWAYS_SOFTWARE=1. WebKit aborts before it ever evaluates its render-path settings.

Same root cause, documented and fixed the same way in other Tauri AppImages: espressif/idf-im-ui#755 (CachyOS), OpenAgentPlatform/Dive#265 (Arch/KDE Wayland), gitbutlerapp/gitbutler#5282.

Verified user-side workarounds

Either of these makes the window appear, fully working:

# 1) force the host libwayland (AppImage unmodified, survives updates)
env GTK_IM_MODULE=xim LD_PRELOAD=/usr/lib/libwayland-client.so.0 ./integrated-mod-manager-imm.AppImage

# 2) or remove the stale libs from an extracted copy
./integrated-mod-manager-imm.AppImage --appimage-extract
rm squashfs-root/usr/lib/libwayland-{client.so.0,cursor.so.0,egl.so.1,server.so.0}
./squashfs-root/AppRun

Two more bundling issues found while debugging

  1. apprun-hooks/linuxdeploy-plugin-gtk.sh unconditionally exports GDK_BACKEND=x11 (comment references [bug] Run AppImage: GLib-GIO-ERROR Settings schema error tauri-apps/tauri#8541). Besides preventing a native Wayland window, it does not avoid the EGL crash (see above), and it actively breaks GTK_IM_MODULE=wayland: im-wayland assumes a Wayland GDK display, so the app dies with gdk_wayland_display_get_wl_display: assertion 'GDK_IS_WAYLAND_DISPLAY (display)' failed → SIGSEGV. With the libwayland fix in place, commenting out that export gives a working native-Wayland window here. Suggest respecting a pre-set GDK_BACKEND or dropping the override.
  2. The bundle's GTK IM-module setup selects uim even when uim is not installed on the host, which is fatal: Error: in load: file "/usr/share/uim/lib/sigscheme-init.scm" not found, then the process exits during gtk_init. .appimage not working #33's reporter hit the same thing on a uim-less system. Workaround: GTK_IM_MODULE=xim (or gtk-im-context-simple). Suggest not bundling im-uim / regenerating the immodules cache without it, or having the hook set a sane default.

Suggested build-side fixes

  • Exclude libwayland-client.so.0, libwayland-cursor.so.0, libwayland-egl.so.1, libwayland-server.so.0 from the bundle (linuxdeploy excludelist, or delete from the AppDir before packing). libwayland must come from the host so it matches the host's Mesa/EGL.
  • Make the GDK_BACKEND=x11 hook conditional (or remove it).
  • Fix the IM-module cache so a missing uim is never selected (it is fatal, not a graceful fallback).
  • Longer term: Tauri's new uruntime-based AppImage format (feat(bundler): Truly portable appimage (experimental) tauri-apps/tauri#12491) isolates the host graphics stack and eliminates this whole class of failures; several projects moved to it for exactly this reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions