Skip to content

Commit e7c2eb7

Browse files
fix(tauri): disable GPU on Linux for Mesa 26+ EGL compatibility (closes tinyhumansai#1697) (tinyhumansai#1809)
1 parent c37a122 commit e7c2eb7

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

app/src-tauri/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,20 @@ pub fn run() {
16881688
args.push(("--disable-gpu-compositing", None));
16891689
log::info!("[cef-startup] Intel macOS detected: adding --disable-gpu-compositing (issue #1012)");
16901690
}
1691+
// Issue #1697 — Linux AppImage fails to launch on Mesa 26+ (Arch,
1692+
// Manjaro, EndeavourOS, CachyOS) with EGL_BAD_ATTRIBUTE during GPU
1693+
// context creation. Chromium's EGL initialization returns
1694+
// EGL_BAD_ATTRIBUTE for both ES 3.0 and 2.0 contexts on Mesa 26+,
1695+
// producing ContextResult::kFatalFailure. Disabling the entire GPU
1696+
// process forces SwiftShader software rendering so the app launches
1697+
// on these distros. The same CEF version works on Ubuntu/deb-based
1698+
// distros with older Mesa; this flag degrades gracefully there
1699+
// (software-only rendering, no WebGL).
1700+
#[cfg(target_os = "linux")]
1701+
{
1702+
args.push(("--disable-gpu", None));
1703+
log::info!("[cef-startup] Linux detected: adding --disable-gpu (issue #1697)");
1704+
}
16911705
tauri::Builder::<tauri::Cef>::new().command_line_args::<&str, &str>(args)
16921706
};
16931707

0 commit comments

Comments
 (0)