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
18 changes: 12 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ 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, 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;
Expand Down