mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: electron snap issue #5252
This commit is contained in:
parent
2b611b8b1f
commit
e465712029
1 changed files with 12 additions and 0 deletions
|
|
@ -55,6 +55,18 @@ let mainWin: BrowserWindow;
|
|||
let idleTimeHandler: IdleTimeHandler;
|
||||
|
||||
export const startApp = (): void => {
|
||||
// Workaround for Electron 38+ snap package GPU issues (issue #5252)
|
||||
// Electron 38.1+ has GPU/Mesa driver access issues in snap confinement
|
||||
const isForceGpu = process.argv.some((val) => val.includes('--enable-gpu'));
|
||||
const isSnap = process.platform === 'linux' && !!process.env.SNAP;
|
||||
if (isSnap && !isForceGpu) {
|
||||
log(
|
||||
'Snap: Disabling hardware acceleration to avoid Mesa driver lookup crashes (issue #5252)',
|
||||
);
|
||||
log('Snap: Launch with --enable-gpu to attempt hardware rendering (may crash)');
|
||||
app.disableHardwareAcceleration();
|
||||
}
|
||||
|
||||
// Initialize protocol handling
|
||||
initializeProtocolHandling(IS_DEV, app, () => mainWin);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue