From 9e142fbe1e25a817fc56fa2174a9956919a154ee Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 11 Feb 2026 10:42:21 -0500 Subject: [PATCH] add linux electron flags to be more permissive with graphics cards --- app-el.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app-el.js b/app-el.js index d1d349b0..48c893ad 100644 --- a/app-el.js +++ b/app-el.js @@ -14,6 +14,23 @@ const devel = process.argv.slice(2).map(v => v.replaceAll('-', '')).indexOf('dev process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; +// Enable GPU/graphics acceleration for Linux (addresses WebGL issues) +// Equivalent to Chrome flags that fixed the rendering in Chrome browser +if (process.platform === 'linux') { + // CRITICAL: Override GPU blocklist - allows hardware acceleration on blocked GPUs + app.commandLine.appendSwitch('ignore-gpu-blocklist'); + + // Enable WebGL draft extensions (improves WebGL compatibility) + app.commandLine.appendSwitch('enable-webgl-draft-extensions'); + + // Force GPU acceleration for 2D/3D rendering + app.commandLine.appendSwitch('enable-gpu-rasterization'); + + // Optional: Try Vulkan if available (Chromium auto-falls back to OpenGL if not) + // Uncomment if you need Vulkan specifically, but most systems work without it: + app.commandLine.appendSwitch('enable-features', 'Vulkan'); +} + server({ port: 5309, apps: basDir,