From 152939a8668d98fee62b9c4db7a196f32a5438b2 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sat, 6 Dec 2025 11:54:41 +0100 Subject: [PATCH] fix(electron): remove forced X11 mode on Linux Remove the code that forced X11 mode on Linux via --ozone-platform=x11. This was causing the snap package to crash on Wayland systems due to GPU driver mismatches between the bundled Mesa drivers and host system. The IdleTimeHandler already has proper fallbacks for Wayland environments (gnomeDBus, xprintidle, loginctl), so forcing X11 is not necessary. Closes #5663 --- electron/start-app.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/electron/start-app.ts b/electron/start-app.ts index ae840c7c7..fc501c074 100644 --- a/electron/start-app.ts +++ b/electron/start-app.ts @@ -73,21 +73,6 @@ export const startApp = (): void => { // https://github.com/electron/electron/issues/46538#issuecomment-2808806722 app.commandLine.appendSwitch('gtk-version', '3'); - // Force X11 on Linux by default (Electron 38+ defaults to Wayland via --ozone-platform=auto) - // Wayland has known issues: - // - Idle detection fallbacks are unreliable (#1443) - // - Global shortcuts require manual system configuration (GlobalShortcutsPortal) - // Users can override with --ozone-platform=wayland if desired - if (process.platform === 'linux') { - const forceWayland = process.argv.some( - (arg) => - arg.includes('--ozone-platform=wayland') || arg.includes('--force-wayland'), - ); - if (!forceWayland) { - app.commandLine.appendSwitch('ozone-platform', 'x11'); - } - } - // NOTE: needs to be executed before everything else process.argv.forEach((val) => { if (val && val.includes('--disable-tray')) {