From 00a7c6b5bebeaf9c62654717883ff0bfbcaf3034 Mon Sep 17 00:00:00 2001 From: Karsten Hassel Date: Tue, 29 Mar 2022 20:38:45 +0200 Subject: [PATCH] added new env var `ELECTRON_DISABLE_GPU` which disable gpu under electron if set (fixes #2831). --- CHANGELOG.md | 1 + js/electron.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b5a0286..159e0743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ _This release is scheduled to be released on 2022-04-01._ - Added new config option `showTitleAsUrl` to newsfeed module. If set, the diplayed title is a link to the article which is useful when running in a browser and you want to read this article. - Added internal cors proxy to get weather providers working without public proxies (fixes #2714). The new url `http(s)://address:port/cors?url=https://whatever-to-proxy` can be used in other modules too. - Added a WeatherProvider for Weatherflow +- Added new env var `ELECTRON_DISABLE_GPU` which disable gpu under electron if set (fixes #2831). ### Updated diff --git a/js/electron.js b/js/electron.js index 509b5474..d06c7516 100644 --- a/js/electron.js +++ b/js/electron.js @@ -8,6 +8,10 @@ const Log = require("logger"); let config = process.env.config ? JSON.parse(process.env.config) : {}; // Module to control application life. const app = electron.app; +if (process.env.ELECTRON_DISABLE_GPU !== undefined) { + app.disableHardwareAcceleration(); +} + // Module to create native browser window. const BrowserWindow = electron.BrowserWindow;