Skip to content

Commit 319a921

Browse files
authored
start electron with --disable-gpu flag (#3290)
can be overriden with env var ELECTRON_ENABLE_GPU=1. see #3226 Tests will fail as long as #3289 is not merged.
1 parent d5406f4 commit 319a921

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ _This release is scheduled to be released on 2024-01-01._
2929
- Review ESLint config (#3269)
3030
- Updated dependencies
3131
- Clock module: optionally display current moon phase in addition to rise/set times
32+
- electron is now per default started without gpu, if needed it must be enabled with new env var `ELECTRON_ENABLE_GPU=1` on startup (#3226)
3233

3334
### Fixed
3435

js/electron.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ const Log = require("./logger");
88
let config = process.env.config ? JSON.parse(process.env.config) : {};
99
// Module to control application life.
1010
const app = electron.app;
11-
// If ELECTRON_DISABLE_GPU is set electron is started with --disable-gpu flag.
11+
// Per default electron is started with --disable-gpu flag, if you want the gpu enabled,
12+
// you must set the env var ELECTRON_ENABLE_GPU=1 on startup.
1213
// See https://www.electronjs.org/docs/latest/tutorial/offscreen-rendering for more info.
13-
if (process.env.ELECTRON_DISABLE_GPU !== undefined) {
14+
if (process.env.ELECTRON_ENABLE_GPU !== "1") {
1415
app.disableHardwareAcceleration();
1516
}
1617

0 commit comments

Comments
 (0)