New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
electron app.disableHardwareAcceleration() #2831
Comments
Have you considered to use electronSwitches: ["disable-gpu"], in your I feel your Anyway, I'm super new to MM so if this is a stupid idea, just ignore it. I'm open to suggestions as well. |
yes, tested this with no success, I'm already using the |
Ah, I see. Well, it's been a while, but I once used software rendering for tests of pages with three.js in docker. Back then I used Chrome with OSMesa. There seems to be a similar approach for electron with SwiftShader https://medium.com/@mohamedmansour/how-to-run-electron-js-in-software-rendering-headless-49601b87961e |
I think the approach with the env var is much simpler than adding the SwiftShader hack. |
Electron is throwing gpu errors under some circumstances e.g. running in a docker container as mentioned here and there were already some threads in the forum about this.
To disable these errors you can add
app.disableHardwareAcceleration()
inelectron.js
or--disable-gpu
inpackage.json
.Both variants are ugly because for automating this you can only use
sed
or similar tools.So I would like to add an environment variable
ELECTRON_DISABLE_GPU
and addapp.disableHardwareAcceleration()
inelectron.js
only when set.More info's to disableHardwareAcceleration:
May it is also an option to run always with
app.disableHardwareAcceleration()
?The text was updated successfully, but these errors were encountered: