You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to turn on/off hardware acceleration #13648
Is your suggestion related to a problem? Please describe.
Mac tends to freeze a lot when hardware acceleration is frequently used. A known example is patch 2020-002. Also this would help low-end devices running the app.
Describe the solution you'd like
A switch to enable/disable hardware acceleration for graphics.
Describe alternatives you've considered
The switch certainly exists for Discord (which is also electron)...
Also, my computer (MacBook Air) froze with that specific fault (in linked article) when launching the YouTube widget, so that sorta makes the issue somewhere between an issue and a suggestion...
Seems this is still relevant, since hardware acceleration is causing #21405
It would be great to have an option for this. All it needs to do is call app.disableHardwareAcceleration() at startup
Seems this is still relevant, since hardware acceleration is causing #21405 It would be great to have an option for this. All it needs to do is call app.disableHardwareAcceleration() at startup
You (or the OP) could verify whether your suggestion indeed resolves #21405 by running app.disableHardwareAcceleration() in the developer console (ctrl/cmd+alt+I). If you can show that, it would help motivate this enhancement request.
https://www.electronjs.org/docs/latest/api/app#appdisablehardwareacceleration states that this can only be called before the app is ready; so I don't think we can do this while it is already running. Additionally, I don't seem to be able to find app, it either exists under a different name or is not globally defined
https://www.electronjs.org/docs/latest/api/app#appdisablehardwareacceleration states that this can only be called before the app is ready; so I don't think we can do this while it is already running. Additionally, I don't seem to be able to find app, it either exists under a different name or is not globally defined
Seems this is still relevant, since hardware acceleration is causing #21405 It would be great to have an option for this. All it needs to do is call app.disableHardwareAcceleration() at startup
You (or the OP) could verify whether your suggestion indeed resolves #21405 by running app.disableHardwareAcceleration() in the developer console (ctrl/cmd+alt+I). If you can show that, it would help motivate this enhancement request.
open a terminal in the extracted folder and run these commands:
yarn install
yarn run fetch --noverify --cfgdir ""
yarn add electron
yarn start
Your freshly compiled Element should start. Please check that your issue still happens in this version. Then quit Element.
open the folder src and edit electron-main.ts. Find the line that says app.on('ready', async () => { (should be line number 846). Before this line, add the following line:
app.disableHardwareAcceleration();
Save and close.
Run the command yarn start again. Element starts again. Check that the issue does not happen any more.
Seems this is still relevant, since hardware acceleration is causing #21405 It would be great to have an option for this. All it needs to do is call app.disableHardwareAcceleration() at startup
You (or the OP) could verify whether your suggestion indeed resolves #21405 by running app.disableHardwareAcceleration() in the developer console (ctrl/cmd+alt+I). If you can show that, it would help motivate this enhancement request.
Note that Electron's documentation doesn't draw that conclusion, and in the past, we've found it hasn't been that simple.
I'll do my best then
Continuing with this and with the help of friends, eventually we go there, thanks to this person and these steps (as well as other cause windows wants to be windows
I am not personally experiencing this issue, but for anyone who is, here is how you can test if disabling hardware acceleration is the solution:
open a terminal in the extracted folder and run these commands:
yarn install
yarn run fetch --noverify --cfgdir ""
yarn add electron
yarn start
Your freshly compiled Element should start. Please check that your issue still happens in this version. Then quit Element.
open the folder src and edit electron-main.ts. Find the line that says app.on('ready', async () => { (should be line number 846). Before this line, add the following line:
app.disableHardwareAcceleration();
Save and close.
Run the command yarn start again. Element starts again. Check that the issue does not happen any more.
disabling hardware acceleration has fixed the issue for me
Before disabling:
and after disabling:
I waited a couple of mins after disabling to see if it comes back (usually takes about 10 seconds for it to become blurry for me) and it stayed readable. I hope this is enough proof that disabling hardware acceleration fixes the issue for me, and sorry it took a while. Life happened.
Activity
[-][Suggestion] Hardware acceleration switch[/-][+]Option to turn on/off hardware acceleration [/+]austinhuang0131 commentedon May 13, 2020
Also, my computer (MacBook Air) froze with that specific fault (in linked article) when launching the YouTube widget, so that sorta makes the issue somewhere between an issue and a suggestion...
turt2live commentedon May 13, 2020
that would probably be a different issue, though likely to be closed as a duplicate of this due to lack of the feature in the first place.
novocaine commentedon Aug 4, 2021
Electron API here: https://www.electronjs.org/docs/api/app#appdisablehardwareacceleration
MRAAGH commentedon Mar 16, 2022
Seems this is still relevant, since hardware acceleration is causing #21405
It would be great to have an option for this. All it needs to do is call
app.disableHardwareAcceleration()at startupnovocaine commentedon Mar 16, 2022
You (or the OP) could verify whether your suggestion indeed resolves #21405 by running
app.disableHardwareAcceleration()in the developer console (ctrl/cmd+alt+I). If you can show that, it would help motivate this enhancement request.Note that Electron's documentation doesn't draw that conclusion, and in the past, we've found it hasn't been that simple.
MRAAGH commentedon Mar 16, 2022
https://www.electronjs.org/docs/latest/api/app#appdisablehardwareacceleration states that this can only be called before the app is ready; so I don't think we can do this while it is already running. Additionally, I don't seem to be able to find

app, it either exists under a different name or is not globally definednovocaine commentedon Mar 16, 2022
ah right. well, its not too complicated to to a local build and hack the line in to test, instructions are over at https://github.com/vector-im/element-desktop/
SapphyThyHybrid commentedon Mar 16, 2022
I'll do my best then
t3chguy commentedon Mar 21, 2022
Its only available from the Main process, not the Renderer process.
MRAAGH commentedon Mar 21, 2022
I am not personally experiencing this issue, but for anyone who is, here is how you can test if disabling hardware acceleration is the solution:
Your freshly compiled Element should start. Please check that your issue still happens in this version. Then quit Element.
srcand editelectron-main.ts. Find the line that saysapp.on('ready', async () => {(should be line number 846). Before this line, add the following line:Save and close.
yarn startagain. Element starts again. Check that the issue does not happen any more.SapphyThyHybrid commentedon Mar 23, 2022
Continuing with this and with the help of friends, eventually we go there, thanks to this person and these steps (as well as other cause windows wants to be windows
disabling hardware acceleration has fixed the issue for me
Before disabling:

and after disabling:

I waited a couple of mins after disabling to see if it comes back (usually takes about 10 seconds for it to become blurry for me) and it stayed readable. I hope this is enough proof that disabling hardware acceleration fixes the issue for me, and sorry it took a while. Life happened.
MRAAGH commentedon Apr 16, 2022
tl;dr: yes,
app.disableHardwareAcceleration();fixed everything, and there should probably be a setting for this.MRAAGH commentedon May 23, 2022
🎉
Merge tag 'v1.10.14' into sc