Skip to content

fix(tauri): disable GPU on Linux for Mesa 26+ EGL compatibility (closes #1697)#1809

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
PranavAgarkar07:fix/1697-appimage-linux-gpu-compat
May 15, 2026
Merged

fix(tauri): disable GPU on Linux for Mesa 26+ EGL compatibility (closes #1697)#1809
senamakel merged 1 commit into
tinyhumansai:mainfrom
PranavAgarkar07:fix/1697-appimage-linux-gpu-compat

Conversation

@PranavAgarkar07
Copy link
Copy Markdown
Contributor

@PranavAgarkar07 PranavAgarkar07 commented May 15, 2026

Summary

Add --disable-gpu flag to CEF command-line args on Linux, fixing the AppImage crash on Mesa 26+ (Arch, Manjaro, EndeavourOS, CachyOS).

Problem

The AppImage fails to launch on Arch-based distros with Mesa 26.0.2+. The GPU process crashes during EGL initialization:

eglCreateContext ES 3.0 failed with error EGL_BAD_ATTRIBUTE
eglCreateContext ES 2.0 failed with error EGL_BAD_ATTRIBUTE
ContextResult::kFatalFailure: Failed to create shared context for virtualization.

This is a Chromium/CEF compatibility issue with Mesa 26's stricter EGL attribute validation. The same CEF build works on Ubuntu/deb-based distros with older Mesa.

Three users confirmed: Manjaro, EndeavourOS, CachyOS.

Solution

Added #[cfg(target_os = "linux")] block that pushes --disable-gpu to the CEF command-line args, following the same pattern as the existing --disable-gpu-compositing flag for Intel macOS (issue #1012). This forces Chromium to use SwiftShader software rendering instead of failing on EGL initialization.

Submission Checklist

  • Tests added or updated — N/A: CEF startup flag, no test harness for Tauri process args (verified via cargo check)
  • Diff coverage >= 80% — N/A: single Rust file, 14 lines added, no testable logic (config-time flag)
  • Coverage matrix updated — N/A: no feature tier or user-visible capability changed
  • Feature IDs listed — N/A: no TEST-COVERAGE-MATRIX rows touched
  • No new external network dependencies — no new crates or deps
  • Manual smoke checklist updated — N/A: does not touch packaging/scripts
  • Linked issue — Closes AppImage does not launch on Manjaro #1697

Impact

  • Linux AppImage (and all Linux builds) will use software rendering via SwiftShader
  • GPU acceleration for WebGL, video decode is disabled; perf impact on GPU-intensive surfaces (mascot animations, embedded web apps)
  • Fixes "app won't launch at all" on Arch-based distros with Mesa 26+
  • Follows existing pattern for Intel macOS GPU workaround (Fix Intel build crash on OpenHuman webview sign-in (Gmail/Google Meet) #1012)

Related

Summary by CodeRabbit

  • Bug Fixes
    • Fixed startup issues on Linux systems

Review Change Stack

@PranavAgarkar07 PranavAgarkar07 requested a review from a team May 15, 2026 10:40
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f91f5389-c572-4272-8d7b-82f8dfae70ed

📥 Commits

Reviewing files that changed from the base of the PR and between 35080ae and 3b94304.

📒 Files selected for processing (1)
  • app/src-tauri/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src-tauri/src/lib.rs

📝 Walkthrough

Walkthrough

This change adds a Linux-only --disable-gpu flag to CEF (Chromium Embedded Framework) startup arguments, forcing software rendering to work around Mesa 26+ GPU context creation failures (EGL_BAD_ATTRIBUTE errors). The flag is conditionally compiled and logged for debugging.

Changes

Linux CEF GPU Workaround

Layer / File(s) Summary
Linux GPU disable flag
app/src-tauri/src/lib.rs
CEF initialization on Linux now conditionally passes --disable-gpu to the Chromium process via command-line arguments, with debug logging to track the workaround application.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A Mesa mix-up made the renderer weep,
On Linux machines, in a GPU heap.
But now with a flag, we disable the plight,
Software rendering saves the day, burning bright! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding GPU disable for Linux Mesa 26+ EGL compatibility.
Linked Issues check ✅ Passed The code change directly addresses issue #1697 by implementing the GPU disable workaround on Linux to resolve Mesa 26+ EGL initialization failures.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objective: Linux-only GPU disable flag addition follows the existing Intel macOS workaround pattern.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 15, 2026
@senamakel senamakel merged commit e7c2eb7 into tinyhumansai:main May 15, 2026
23 checks passed
therahul-yo added a commit to therahul-yo/openhuman that referenced this pull request May 15, 2026
Resolve conflict in app/src-tauri/src/lib.rs by keeping the
append_platform_cef_gpu_workarounds() helper (this PR) and dropping the
inline #[cfg]-gated blocks that landed via tinyhumansai#1809. The helper already
covers issue tinyhumansai#1697 (Linux --disable-gpu + --disable-gpu-compositing) and
issue tinyhumansai#1012 (Intel macOS --disable-gpu-compositing), and is exercised by
the new unit tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

AppImage does not launch on Manjaro

2 participants