Skip to content

Wayland/NVIDIA: runtime crash, AppImage broken #79

@VarenyaJ

Description

@VarenyaJ

Summary

Encountered 3 problems when building and running Phenoboard v0.5.121 from source on EndeavourOS (Arch-based) with a hybrid GPU setup (AMD Vega + NVIDIA RTX 2060 Max-Q) under a KDE Plasma 6 Wayland session:

TL;DR:

  • npm install produces unresolvable zone.js peer dependency conflict (non-blocking)
  • AppImage bundling fails via linuxdeploy on Arch (DEB and RPM appear to succeed)
  • Runtime crashes with Failed to create GBM buffer unless WEBKIT_DISABLE_COMPOSITING_MODE=1 is set

Environment

Field Value
OS EndeavourOS (Arch-based)
Desktop KDE Plasma 6
Session type Wayland (XDG_SESSION_TYPE=wayland)
GPU NVIDIA RTX 2060 Max-Q / AMD Vega (hybrid)
Node v25.6.1
npm 11.10.0
Rust rustc 1.93.1 (01f6ddf75 2026-02-11)
Phenoboard v0.5.121
Branch main (clean, up to date with origin)

Issue 1: zone.js Peer Dependency Conflict

Steps to Reproduce

npm install
npm audit fix

Observed Behavior

npm install completes (1559 packages installed) but emits repeated peer dependency override warnings:

npm warn ERESOLVE overriding peer dependency
npm warn Found: zone.js@0.15.1
npm warn peerOptional zone.js@"~0.15.0" from @angular/core@20.0.6

npm audit fix fails hard:

npm error ERESOLVE could not resolve
Conflicting peer dependency: zone.js@0.15.1
peerOptional zone.js@"~0.15.0" from @angular/core@20.0.6

Root Cause

I think this is because package.json specifies zone.js ^0.16.0, but @angular/core@20.0.6 declares a peer dependency on zone.js ~0.15.0. npm cannot reconcile these.

Impact

  • Does not block nx build
  • Does not block tauri build
  • Does not cause a runtime crash
  • Reports 60 vulnerabilities (11 low, 18 moderate, 30 high, 1 critical)
  • npm audit fix --force could apply breaking changes and is not safe to run

Suggested Fix

Pin zone.js in package.json to ~0.15.0 to match what @angular/core@20.0.6 expects, or upgrade Angular to a version that supports zone.js ^0.16.0. Example:

"zone.js": "~0.15.0"

Issue 2: AppImage Bundling Fails (linuxdeploy)

Steps to Reproduce

npm run tauri build

Observed Behavior

The Angular/Nx frontend build completes successfully:

NX Successfully ran target build for project phenoboard
Output location: dist/phenoboard

The Rust backend compiles cleanly (676 crates, ~4m45s, warnings only):

Finished `release` profile [optimized] target(s) in 4m 45s
Built application at: src-tauri/target/release/phenoboard

DEB and RPM bundles are produced without error:

Bundling phenoboard_0.5.121_amd64.deb     -- OK
Bundling phenoboard-0.5.121-1.x86_64.rpm  -- OK

AppImage bundling fails:

Bundling phenoboard_0.5.121_amd64.AppImage
failed to bundle project: `failed to run linuxdeploy`
Error failed to bundle project: `failed to run linuxdeploy`

Root Cause

It looks like linuxdeploy is the tool Tauri invokes to produce AppImage bundles on Linux. There could be compatibility issues on Arch-based distributions due to differences in glibc version expectations.

Impact

  • AppImage artifact is not produced correctly
  • DEB and RPM artifacts appear unaffected and fully functional
  • The compiled binary at src-tauri/target/release/phenoboard should be unaffected

Potential Fixes

Options in order of preference (untested):

  1. Use the DEB or RPM bundle on Arch (via debtap or directly via pacman)
  2. Run linuxdeploy manually with verbose flags to inspect the exact failure
  3. Install linuxdeploy from AUR and ensure it is on $PATH before running tauri build, so Tauri uses the system version rather than a downloaded one
  4. Build inside a Debian/Ubuntu container if an AppImage artifact is required

Issue 3: Runtime Crash - Failed to Create GBM Buffer

Steps to Reproduce

Build the application per Issue 2, then run:

GDK_BACKEND=x11 ./src-tauri/target/release/phenoboard

Note: GDK_BACKEND=x11 is required on Wayland sessions to force GTK into X11 mode. Running without it causes a Wayland protocol error earlier in the stack.

Observed Behavior

Application loads configuration successfully:

set_hp_json_path to /home/varenya/Downloads/hp.json
"/home/varenya/.phenoboard/settings.toml"

Then crashes:

Failed to create GBM buffer of size 1400x900: Invalid argument

GPU switching via DRI_PRIME does not resolve the issue:

DRI_PRIME=0 GDK_BACKEND=x11 ./phenoboard  ->  Failed to create GBM buffer
DRI_PRIME=1 GDK_BACKEND=x11 ./phenoboard  ->  Failed to create GBM buffer

OpenGL renderer at time of failure:

OpenGL renderer string: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2

Root Cause

It seems that the Tauri/wry rendering stack on Linux goes through WebKit2GTK, which by default attempts GPU-accelerated compositing via EGL and GBM. On hybrid GPU systems with NVIDIA drivers under Wayland, GBM buffer allocation can fail because the NVIDIA proprietary driver's GBM support is incomplete or incompatible with how WebKit2GTK requests buffers.

Related issues:

It looks like the failure is not necessarily caused by any of:

  • A bug in the Tauri or wry code
  • A bug in the Angular frontend
  • A Rust compilation issue
  • Incorrect DRI_PRIME routing

It looks to be caused by the WebKit2GTK compositing path hitting an unsupported GBM configuration on some GPU/driver/session combinations.

Resolution

Disable WebKit2GTK GPU compositing entirely:

WEBKIT_DISABLE_COMPOSITING_MODE=1 ./src-tauri/target/release/phenoboard

This should force WebKit2GTK into software rendering mode, bypassing EGL and GBM. The application then launches and looks to run correctly under this flag.

To make this permanent, one could set the environment variable in their shell profile or create a wrapper script:

#!/bin/bash
WEBKIT_DISABLE_COMPOSITING_MODE=1 /path/to/phenoboard "$@"

Impact of Workaround

Software rendering is slower than GPU compositing for heavy graphical content, but for a phenotype curation tool the practical difference is negligible. Text, tables, and UI interactions appear unaffected.

Suggested Upstream Fix

Consider detecting this condition and setting WEBKIT_DISABLE_COMPOSITING_MODE automatically when running under Wayland with a detected NVIDIA GPU, or document this flag in the README/documentation for Linux users with hybrid GPU setups.


Quick Reference: Working Launch Command

WEBKIT_DISABLE_COMPOSITING_MODE=1 ./src-tauri/target/release/phenoboard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions