From d20bbfce3f087aee3720504d9767df2b7d04f444 Mon Sep 17 00:00:00 2001 From: abbey <61197745+affectioned@users.noreply.github.com> Date: Tue, 18 Aug 2026 17:20:49 +0200 Subject: [PATCH 1/2] fix: force GTK3 on Linux to prevent white screen on Arch/CachyOS Electron's GTK4 renderer paints the window white on many Arch-based distros (CachyOS reported in #43). The main process still starts, so Discord RPC connects, but the network service crashes and the renderer never shows content. The existing Vulkan/Ozone workarounds handle Wayland but not this GTK4 rendering bug. Force GTK3 via --gtk-version=3, following the fix confirmed in Arch BBS #306492. Sandbox stays enabled. Fixes #43 Co-Authored-By: Claude Opus 4.7 --- src/main.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main.js b/src/main.js index 5017e5d..d8b4c58 100644 --- a/src/main.js +++ b/src/main.js @@ -10,15 +10,18 @@ const { const { connectDiscordRpc, updateRichPresence, clearPresence } = require('./scripts/discordRpcUtils'); const { checkForUpdates } = require('./scripts/updateChecker'); -// Linux/Wayland fix: Electron 43 (Chromium) defaults to a Vulkan graphics -// backend that is incompatible with the Wayland ozone platform. The GPU process -// fails to initialize, which cascades into the network service crashing and a -// permanent white screen. Let Ozone auto-pick the platform for the current -// session and disable the Vulkan backend so GL rendering is used instead. -// Must run before app is ready. Sandbox stays enabled — no --no-sandbox needed. +// Linux fix: Electron 43 (Chromium) defaults to a Vulkan graphics backend +// that is incompatible with the Wayland ozone platform, and its GTK4 renderer +// paints white on many Arch-based distros (CachyOS in particular). Both fail +// modes cascade into the network service crashing and a permanent white +// screen. Let Ozone auto-pick the platform, disable the Vulkan backend, and +// force GTK3 so the renderer paints. Must run before app is ready. Sandbox +// stays enabled — no --no-sandbox needed. +// See: electron/electron#33690 (GTK4), electron/electron#43400 (net service). if (process.platform === 'linux') { app.commandLine.appendSwitch('ozone-platform-hint', 'auto'); app.commandLine.appendSwitch('disable-features', 'Vulkan'); + app.commandLine.appendSwitch('gtk-version', '3'); } let rpcInterval = null; From 7c0af68ca5b2a4f59ff484559d4b4529839cf5b5 Mon Sep 17 00:00:00 2001 From: abbey <61197745+affectioned@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:28:17 +0200 Subject: [PATCH 2/2] fix: drop GPU-process sandbox on Linux for AppImage on Arch/CachyOS The GTK3/Vulkan-disable fix got the app past init, but the network service still crashes ~20s after launch on Arch/CachyOS AppImages (works fine under yarn start). Root cause is the zygote-spawned GPU child not inheriting Wayland/DRM flags inside the AppImage squashfs mount (electron/electron#50462), which cascades into the net service dying. --disable-gpu-sandbox is the narrow fix: only the GPU process runs unsandboxed, renderer sandbox stays on. Safer than --no-sandbox and safer than --in-process-gpu (which is reported to break networking). Co-Authored-By: Claude Opus 4.7 --- src/main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index d8b4c58..e901d05 100644 --- a/src/main.js +++ b/src/main.js @@ -14,14 +14,17 @@ const { checkForUpdates } = require('./scripts/updateChecker'); // that is incompatible with the Wayland ozone platform, and its GTK4 renderer // paints white on many Arch-based distros (CachyOS in particular). Both fail // modes cascade into the network service crashing and a permanent white -// screen. Let Ozone auto-pick the platform, disable the Vulkan backend, and -// force GTK3 so the renderer paints. Must run before app is ready. Sandbox -// stays enabled — no --no-sandbox needed. -// See: electron/electron#33690 (GTK4), electron/electron#43400 (net service). +// screen. Let Ozone auto-pick the platform, disable the Vulkan backend, force +// GTK3, and drop the GPU-process sandbox (the zygote GPU child in AppImage +// squashfs mounts doesn't inherit Wayland flags, which cascades into the net +// service dying ~20s after launch). Must run before app is ready. Renderer +// sandbox stays on — this only opens the GPU process. +// See: electron/electron#33690 (GTK4), electron/electron#50462 (GPU zygote). if (process.platform === 'linux') { app.commandLine.appendSwitch('ozone-platform-hint', 'auto'); app.commandLine.appendSwitch('disable-features', 'Vulkan'); app.commandLine.appendSwitch('gtk-version', '3'); + app.commandLine.appendSwitch('disable-gpu-sandbox'); } let rpcInterval = null;