From e47977193cbb84a13c054a94b1f2ddd344e00639 Mon Sep 17 00:00:00 2001 From: zortos293 <65777760+zortos293@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:16:48 +0000 Subject: [PATCH] Mitigate Fedora/Bazzite blank screen by disabling Linux font backend features and remote fonts --- opennow-stable/src/main/index.ts | 21 +++++++++++++++++-- opennow-stable/src/renderer/index.html | 3 --- .../src/components/ControllerButtons.tsx | 11 ++++++---- opennow-stable/src/renderer/src/styles.css | 2 +- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/opennow-stable/src/main/index.ts b/opennow-stable/src/main/index.ts index 14e59d17..6161883a 100644 --- a/opennow-stable/src/main/index.ts +++ b/opennow-stable/src/main/index.ts @@ -124,6 +124,10 @@ function loadBootstrapVideoPreferences(): BootstrapVideoPreferences { } } +function hasLinuxNvidiaProprietaryDriver(): boolean { + return existsSync("/proc/driver/nvidia/version") || existsSync("/sys/module/nvidia/version"); +} + const bootstrapVideoPrefs = loadBootstrapVideoPreferences(); console.log( `[Main] Video acceleration preference: decode=${bootstrapVideoPrefs.decoderPreference}, encode=${bootstrapVideoPrefs.encoderPreference}`, @@ -132,6 +136,8 @@ console.log( // --- Platform-specific HW video decode features --- const platformFeatures: string[] = []; const isLinuxArm = process.platform === "linux" && (process.arch === "arm64" || process.arch === "arm"); +const isLinuxDesktopX64 = process.platform === "linux" && !isLinuxArm; +const shouldEnableLinuxDesktopVaapi = isLinuxDesktopX64 && !hasLinuxNvidiaProprietaryDriver(); if (process.platform === "win32") { // Windows: D3D11 + Media Foundation path for HW decode/encode acceleration @@ -150,7 +156,7 @@ if (process.platform === "win32") { if (bootstrapVideoPrefs.decoderPreference !== "software") { platformFeatures.push("UseChromeOSDirectVideoDecoder"); } - } else { + } else if (shouldEnableLinuxDesktopVaapi) { // Linux x64 desktop GPUs: VA-API path (Intel/AMD). if (bootstrapVideoPrefs.decoderPreference !== "software") { platformFeatures.push("VaapiVideoDecoder"); @@ -185,7 +191,18 @@ const disableFeatures: string[] = [ // Prevents mDNS candidate generation — faster ICE connectivity "WebRtcHideLocalIpsWithMdns", ]; -if (process.platform === "linux" && !isLinuxArm) { +if (process.platform === "linux") { + // Fedora/Bazzite Electron builds have hit renderer crashes in newer Linux font + // service backends. Keep Linux on the older path; Chromium changed the feature + // names over time, so include both known spellings. + disableFeatures.push( + "SkiaFontService", + "FontationBackend", + "FontationsFontBackend", + "FontationsLinuxSystemFonts", + ); +} +if (isLinuxDesktopX64) { // ChromeOS-only direct video decoder path interferes on regular Linux disableFeatures.push("UseChromeOSDirectVideoDecoder"); } diff --git a/opennow-stable/src/renderer/index.html b/opennow-stable/src/renderer/index.html index 76f1763c..ec9d7ebb 100644 --- a/opennow-stable/src/renderer/index.html +++ b/opennow-stable/src/renderer/index.html @@ -4,9 +4,6 @@ OpenNOW - - -
diff --git a/opennow-stable/src/renderer/src/components/ControllerButtons.tsx b/opennow-stable/src/renderer/src/components/ControllerButtons.tsx index 4944885b..9ea8b354 100644 --- a/opennow-stable/src/renderer/src/components/ControllerButtons.tsx +++ b/opennow-stable/src/renderer/src/components/ControllerButtons.tsx @@ -5,6 +5,9 @@ interface ButtonProps { size?: number; } +const buttonLabelFontFamily = + 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", sans-serif'; + export function ButtonA({ className, size = 18 }: ButtonProps): JSX.Element { return ( - A + A ); } @@ -34,7 +37,7 @@ export function ButtonB({ className, size = 18 }: ButtonProps): JSX.Element { xmlns="http://www.w3.org/2000/svg" > - B + B ); } @@ -51,7 +54,7 @@ export function ButtonX({ className, size = 18 }: ButtonProps): JSX.Element { xmlns="http://www.w3.org/2000/svg" > - X + X ); } @@ -68,7 +71,7 @@ export function ButtonY({ className, size = 18 }: ButtonProps): JSX.Element { xmlns="http://www.w3.org/2000/svg" > - Y + Y ); } diff --git a/opennow-stable/src/renderer/src/styles.css b/opennow-stable/src/renderer/src/styles.css index d9a20771..99313f9c 100644 --- a/opennow-stable/src/renderer/src/styles.css +++ b/opennow-stable/src/renderer/src/styles.css @@ -77,7 +77,7 @@ body, #root { width: 100%; height: 100%; - font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", sans-serif; font-size: 14px; line-height: 1.5; color: var(--ink);