Skip to content

Linux: app.getGPUInfo throws Error: GPU access not allowed. Reason: GPU access is disabled in chrome://settings #49530

@xmedeko

Description

@xmedeko

Preflight Checklist

Electron Version

40.0.0

What operating system(s) are you using?

Ubuntu

Operating System Version

22,24

What arch are you using?

x64

Last Known Working Electron version

39.3.0

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

Electron app starts and shows new BrowserWindow.

Actual Behavior

After upgrade from v39.3.0 to v40.0.0 calling app.getGPUInfo('basic') throws:

Error: GPU access not allowed. Reason: GPU access is disabled in chrome://settings.

The code is called before BrowserWindow is created (by Sentry.js initialization). We have tried in on 3 different machines (with different graphic cards) with Ubuntu 22 and Ubuntu 24, too.

We use:

app.disableHardwareAcceleration();

And without this, the app starts OK. Also when I've tried to add the switch:

app.disableHardwareAcceleration();
app.commandLine.appendSwitch("use-angle", "swiftshader");

Then the app starts OK, too.

Testcase Gist URL

No response

Additional Information

  • Switching from Wayland to X11 by export XDG_SESSION_TYPE=x11 does not help.
  • Same problem with v40.0.beta1.
  • v40.0.alpha.8 shows the window, but it's blank and console is flooded by "Network service crashed or was terminated, restarting service."
    • => Seems like the problem is in some commit between v40.0.alpha.8 and v40.0.beta1.
  • Same problem with [email protected]

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    👍 Does Not Block Stable

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions