fix: Linux GPU fallback and HUD window show safety net

- Add Linux GPU config: use EGL (better Wayland compat), disable VAAPI
  video decoder/encoder (many distros ship broken drivers causing
  'vaInitialize failed' and preventing renderer from loading)
- Add ready-to-show fallback for HUD window: if did-finish-load never
  fires (GPU failure), show the window after 500ms via ready-to-show

Ref #261
This commit is contained in:
webadderall committed 2026-04-18 21:32:18 +10:00
1 parent 75791cbf79
commit dbd5a2a9a2
2 files changed
+20

No files matched your search

+9
View File
@@ -68,6 +68,15 @@ function configureGpuAccelerationSwitches() {
app.commandLine.appendSwitch("use-angle", "d3d11");
return;
}
// Linux: 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.
if (process.platform === "linux") {
app.commandLine.appendSwitch("use-gl", "egl");
app.commandLine.appendSwitch("disable-features", "VaapiVideoDecoder,VaapiVideoEncoder");
return;
}
}
async function logSmokeExportGpuDiagnostics() {
+11
View File
@@ -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