Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

fix: Linux GPU fallback and HUD window show safety net

webadderalldbd5a2a9a2e6
diff --git a/electron/main.ts b/electron/main.ts
index 4a572ac4..e47c1b82 100644
--- a/electron/main.ts
+++ b/electron/main.ts
@@ -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() {
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