fix(tauri): disable GPU on Linux for Mesa 26+ EGL compatibility (closes #1697)#1809
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis change adds a Linux-only ChangesLinux CEF GPU Workaround
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
35080ae to
3b94304
Compare
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>
Summary
Add
--disable-gpuflag 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:
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-gputo the CEF command-line args, following the same pattern as the existing--disable-gpu-compositingflag for Intel macOS (issue #1012). This forces Chromium to use SwiftShader software rendering instead of failing on EGL initialization.Submission Checklist
Impact
Related
Summary by CodeRabbit