diff --git a/electron/main.ts b/electron/main.ts index 4a572ac4..4adcc99c 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -68,6 +68,12 @@ function configureGpuAccelerationSwitches() { app.commandLine.appendSwitch("use-angle", "d3d11"); return; } + + // Linux (and other Unix): prefer EGL over GLX for better Wayland compatibility. + // Disable VAAPI — many distros ship broken drivers that cause + // "vaInitialize failed" and prevent the renderer from loading. + app.commandLine.appendSwitch("use-gl", "egl"); + app.commandLine.appendSwitch("disable-features", "VaapiVideoDecoder,VaapiVideoEncoder"); } async function logSmokeExportGpuDiagnostics() { diff --git a/electron/windows.ts b/electron/windows.ts index f8466915..7439f716 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -498,6 +498,17 @@ export function createHudOverlayWindow(): BrowserWindow { }, 100); }); + // Safety net: on Linux the renderer may fail to fire did-finish-load + // (e.g. GPU/VAAPI errors). Show the window after ready-to-show as fallback. + win.once("ready-to-show", () => { + setTimeout(() => { + if (!win.isDestroyed() && !win.isVisible()) { + win.show(); + win.moveTop(); + } + }, 500); + }); + hudOverlayWindow = win; // Reset the user's saved HUD position when displays change so the bar