From 74b478cf68619234eb81c985bb5db5c984f49820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sun, 16 Nov 2025 00:33:51 +0100 Subject: [PATCH] feat(flatpak): work around nvidia driver compatibility by setting WEBKIT_DISABLE_DMABUF_RENDERER=1 On GPU: NVIDIA GeForce RTX 4060 Ti Driver Version: 580.95.05, CUDA Version: 13.0 on Ubuntu 22.04 one sees $ flatpak run org.eigenwallet.app Gtk-Message: 12:51:00.306: Failed to load module "canberra-gtk-module" Gtk-Message: 12:51:00.306: Failed to load module "canberra-gtk-module" Gtk-Message: 12:51:00.551: Failed to load module "canberra-gtk-module" Gtk-Message: 12:51:00.552: Failed to load module "canberra-gtk-module" Failed to create GBM buffer of size 800x700: Invalid argument 2025-11-01T09:51:00.990998736Z INFO swap::common::tracing_util: swap/src/common/tracing_util.rs:225: Initialized tracing. General logs will be written to swap-all.log, and verbose logs to tracing*.log level_filter=debug logs_dir=/home/user/.var/app/org.eigenwallet.app/data/xmr-btc-swap/cli/mainnet/logs and the window opens, but never populates This is the most-commonly-mentioned workaround Closes: #665 --- .github/workflows/build-gui-release-binaries.yml | 3 ++- dev-scripts/publish_flatpak.sh | 3 ++- flatpak/org.eigenwallet.app.json | 7 ++++++- flatpak/unstoppableswap-gui-rs.flatpak.sh | 9 +++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 flatpak/unstoppableswap-gui-rs.flatpak.sh diff --git a/.github/workflows/build-gui-release-binaries.yml b/.github/workflows/build-gui-release-binaries.yml index 53345060e..8b3b392d9 100644 --- a/.github/workflows/build-gui-release-binaries.yml +++ b/.github/workflows/build-gui-release-binaries.yml @@ -168,7 +168,8 @@ jobs: "type": "file", "path": $deb_path } | - .modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path + .modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path | + .modules[0].sources[2].path = $PWD + "/" + .modules[0].sources[2].path ' < flatpak/org.eigenwallet.app.json > target/manifest.json outdir=target/flatpak-repo diff --git a/dev-scripts/publish_flatpak.sh b/dev-scripts/publish_flatpak.sh index dd871cf96..cfd6230f7 100755 --- a/dev-scripts/publish_flatpak.sh +++ b/dev-scripts/publish_flatpak.sh @@ -233,7 +233,8 @@ jq --arg deb_path "$DEB_FILE" --arg PWD "$PWD" ' "type": "file", "path": $deb_path } | - .modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path + .modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path | + .modules[0].sources[2].path = $PWD + "/" + .modules[0].sources[2].path ' "$MANIFEST_FILE" > "$TEMP_MANIFEST" MANIFEST_FILE="$TEMP_MANIFEST" diff --git a/flatpak/org.eigenwallet.app.json b/flatpak/org.eigenwallet.app.json index 33763d7ff..86dddbade 100644 --- a/flatpak/org.eigenwallet.app.json +++ b/flatpak/org.eigenwallet.app.json @@ -3,7 +3,7 @@ "runtime": "org.gnome.Platform", "runtime-version": "47", "sdk": "org.gnome.Sdk", - "command": "unstoppableswap-gui-rs", + "command": "unstoppableswap-gui-rs.flatpak.sh", "finish-args": [ "--socket=wayland", "--socket=fallback-x11", @@ -28,12 +28,17 @@ { "type": "file", "path": "flatpak/org.eigenwallet.app.appdata.xml" + }, + { + "type": "file", + "path": "flatpak/unstoppableswap-gui-rs.flatpak.sh" } ], "build-commands": [ "ar -x *.deb", "tar -xf data.tar.gz", "install -Dm755 usr/bin/unstoppableswap-gui-rs -t /app/bin", + "install -Dm755 *.flatpak.sh -t /app/bin", "install -Dm644 *.appdata.xml -t /app/share/metainfo", "mv usr/share/icons /app/share" ] diff --git a/flatpak/unstoppableswap-gui-rs.flatpak.sh b/flatpak/unstoppableswap-gui-rs.flatpak.sh new file mode 100755 index 000000000..51ce78547 --- /dev/null +++ b/flatpak/unstoppableswap-gui-rs.flatpak.sh @@ -0,0 +1,9 @@ +#!/bin/sh -x + +# Work around https://github.com/eigenwallet/core/issues/665 +WEBKIT_DISABLE_DMABUF_RENDERER=1 +export WEBKIT_DISABLE_DMABUF_RENDERER + +# This executed in flatpak, with /app/bin in $PATH +# flatpak runs execlp("${manifest.command}"), replicate this +exec unstoppableswap-gui-rs "$@"