diff --git a/deploy/src-tauri/src/lib.rs b/deploy/src-tauri/src/lib.rs index 5df574a..cb58797 100644 --- a/deploy/src-tauri/src/lib.rs +++ b/deploy/src-tauri/src/lib.rs @@ -8,6 +8,12 @@ mod open_external; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { + // https://github.com/tauri-apps/tauri/issues/9304: webkit2gtk is broken under 2.44 with Nvidia GPUs + // "KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied" [https://github.com/secluso/core/issues/113] + // WEBKIT_DISABLE_DMABUF_RENDERER falls back to portable compositing + #[cfg(target_os = "linux")] + std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1"); + tauri::Builder::default() .plugin(tauri_plugin_opener::init()) .plugin(tauri_plugin_dialog::init()) diff --git a/releases/lib/docker_deploy/run_tauri_build.bash b/releases/lib/docker_deploy/run_tauri_build.bash index 4142064..6a4ce1f 100755 --- a/releases/lib/docker_deploy/run_tauri_build.bash +++ b/releases/lib/docker_deploy/run_tauri_build.bash @@ -903,6 +903,30 @@ ensure_libgpg_error_bundled_with_libgcrypt() { fi } + +# New version of Mesa has some dependency issues with libwayland-client if it is bundled +# https://github.com/AppImageCommunity/pkg2appimage/pull/559 +# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11316 +# Bundled libwayland-client/server/egl carries private protocol-interface pointers that must match the running compositor. +# If we use our own copy makes the client lib and the host's Wayland server disagree +# So we drop them so the loader falls back to the host libraries +prune_appdir_wayland_libs() { + local appdir="$1" + [[ -n "$appdir" && -d "$appdir" ]] || return 0 + + local removed=0 lib + while IFS= read -r -d '' lib; do + echo "==> excluding bundled $(basename "$lib") (use host copy)" + rm -f "$lib" + removed=1 + done < <(find "$appdir" \( -type f -o -type l \) \ + \( -name 'libwayland-client.so*' \ + -o -name 'libwayland-server.so*' \ + -o -name 'libwayland-egl.so*' \) -print0 2>/dev/null) + + [[ "$removed" -eq 1 ]] || echo "==> no bundled libwayland-{client,server,egl} found in AppDir" +} + canonicalize_linux_bundle_outputs_deterministically() { [[ "$TAURI_TARGET" == *"-unknown-linux-"* ]] || return 0 @@ -949,6 +973,10 @@ canonicalize_linux_bundle_outputs_deterministically() { echo "==> error: failed to bundle libgpg-error alongside libgcrypt in $appdir" >&2 return 1 } + prune_appdir_wayland_libs "$appdir" || { + echo "==> error: failed to prune bundled libwayland from $appdir" >&2 + return 1 + } fi local appimage_path while IFS= read -r appimage_path; do