Skip to content

Commit 8a41202

Browse files
committed
fix(linux): prevent AppImage crashes by disabling DMABUF
This addresses a critical crash (EGL_BAD_PARAMETER) observed on Fedora and other modern Linux distributions when running the AppImage. The crash is caused by a version mismatch between the AppImage's bundled libraries and the host system's newer graphics drivers when attempting hardware acceleration (DMABUF). Changes: - Detects if running as an AppImage via the APPIMAGE env var. - Sets WEBKIT_DISABLE_DMABUF_RENDERER=1 only for AppImage execution, forcing compatibility mode while preserving full GPU acceleration for native (.deb/.rpm) builds. - Reordered logger initialization to ensuring startup logs are captured. - Removed duplicate auri_plugin_shell initialization.
1 parent 20d83bd commit 8a41202

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src-tauri/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ fn main() {
5959
.with_line_number(true)
6060
.init();
6161

62+
// Only disable hardware acceleration if running specifically as an AppImage
63+
#[cfg(target_os = "linux")]
64+
if std::env::var("APPIMAGE").is_ok() {
65+
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
66+
tracing::debug!("AppImage detected: Disabling DMABUF for stability.");
67+
}
68+
6269
tracing::info!(
6370
"Starting AltSendme Desktop application v{}",
6471
version::get_app_version()
@@ -78,7 +85,6 @@ fn main() {
7885
.plugin(tauri_plugin_os::init())
7986
.plugin(tauri_plugin_http::init())
8087
.plugin(tauri_plugin_shell::init())
81-
.plugin(tauri_plugin_shell::init())
8288
.manage(Arc::new(tokio::sync::Mutex::new({
8389
// Check for launch args (potential file path from context menu)
8490
let args: Vec<String> = std::env::args().skip(1).collect();

0 commit comments

Comments
 (0)