Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates-tauri/yaak-app-client/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
// On Nvidia + Wayland, WebKit2GTK's DMA-BUF renderer triggers a protocol error (71) due to
// an explicit sync bug (https://bugs.webkit.org/show_bug.cgi?id=280210). Disabling explicit
// sync via the Nvidia driver avoids the crash without disabling hardware acceleration.
#[cfg(target_os = "linux")]
if std::env::var("__NV_DISABLE_EXPLICIT_SYNC").is_err()
&& std::env::var("WAYLAND_DISPLAY").is_ok()
&& std::path::Path::new("/sys/module/nvidia").exists()
{
// SAFETY: called before any threads are spawned.
unsafe { std::env::set_var("__NV_DISABLE_EXPLICIT_SYNC", "1") };
}

tauri_app_client_lib::run();
}