Skip to content

app.disableHardwareAcceleration() no longer fully disables GPU usage on Windows Task Manager in Electron v38+ (worked in v37) #51363

Closed

Description

@oalfroukh

Preflight Checklist

Electron Version

41.3.0

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 Pro version 22631.6199

What arch are you using?

x64

Last Known Working Electron version

37.10.3, 38.0.0-nightly.20250616

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

Calling:

app.disableHardwareAcceleration();

should disable hardware acceleration consistently, or at least prevent GPU process GPU utilization similar to Electron v37 behavior.

Image

Actual Behavior

On Electron v38+, GPU Process still appears active and uses GPU resources despite calling app.disableHardwareAcceleration() correctly before app ready.

Image

Testcase Gist URL

https://gist.github.com/oalfroukh/42e3e5246f87a755f13abe8f46454793

Additional Information

No response

Activity

  1. added theissue type on Apr 28, 2026
  2. added
    has-repro-gist
    on Apr 28, 2026
  3. moved this to 👀 Unsorted Items in 41-x-yon Apr 28, 2026
  4. nikwen commented on Apr 28, 2026

    @nikwen
    Member

    Thanks for reporting!

    1. Could you please make the testcase gist load a local HTML file? It makes it safer for maintainers to run the gist, and it makes it possible for us to inspect the code.
    2. Would you be able to check which v38 alpha/beta/nightly version introduced the issue? You can switch Electron versions easily in Electron Fiddle. You can also bisect in Fiddle: View > Toggle Bisect Helper. (You might need to enable nightly versions in the Electron Fiddle settings.)
  5. oalfroukh commented on Apr 29, 2026

    @oalfroukh
    Author

    Hi @nikwen

    • I just updated the gist with local html.
    • the same issue with v38 alpha/beta
  6. nikwen commented on Apr 29, 2026

    @nikwen
    Member

    Thank you!

    Would you be able to check which v38 alpha/beta/nightly version introduced the issue?

  7. oalfroukh commented on Apr 29, 2026

    @oalfroukh
    Author

    Thank you!

    Would you be able to check which v38 alpha/beta/nightly version introduced the issue?

    it seems that the issue started on v38.0.0-nightly.20250617

  8. nikwen commented on Apr 29, 2026

    @nikwen
    Member
  9. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 41-x-yon Apr 29, 2026
  10. cucbin commented on May 17, 2026

    @cucbin
    Contributor

    Opened 'chrome://gpu' and checked the information, 'Graphics Feature Status' shown app.disableHardwareAcceleration() is effective to these two versions.

  11. estoykov commented on Jun 10, 2026

    @estoykov

    It is a Chromium change. Since some version, even if you have software rendering, output still uses direct composition (GPU) for presenting.
    So, you need both lines:
    app.disableHardwareAcceleration();
    app.commandLine.appendSwitch("disable-direct-composition");

  12. oalfroukh commented on Nov 9, 2026

    @oalfroukh
    Author

    Thanks for the fix! Confirming #51817 resolves the original report: on Electron 45.x, app.disableHardwareAcceleration() now appends --disable-gpu and the real GPU (Intel/NVIDIA) is no longer used.

    Follow-up: remaining "GPU" usage comes from WebGL running on WARP

    For anyone still seeing GPU usage on the GPU process after calling disableHardwareAcceleration(): if the page uses WebGL, the load is attributed to the Microsoft Basic Render Driver (D3D11 WARP), which actually runs on the CPU. This is expected Chromium behavior:

    • Since Chromium 144.0.7527.0 / Electron v40.0.0-beta.1, the WebGL software fallback on Windows moved from SwiftShader to D3D11 WARP. See Chromium commit e80b4b262d8f, "Flip SwiftShader deprecation to launched" (crbug 40277080).
    • SwiftShader is a plain CPU library, so it never showed up in Task Manager's GPU column. WARP runs through the Basic Render Driver, so it does.
    • The CPU cost is about the same in both cases. Only its visibility changed.

    Measured with the gist below (full-screen WebGL shader, disableHardwareAcceleration() called):

    Electron GPU process --use-angle Task Manager "GPU" GPU process CPU
    37.10.3 swiftshader-webgl 0% ~43%
    40.0.0-alpha.8 (Chromium 144.0.7526.0) swiftshader-webgl 0% ~43%
    40.0.0-beta.1 (Chromium 144.0.7527.0) d3d11-warp-webgl Basic Render Driver ~43%
    45.2.3 d3d11-warp-webgl Basic Render Driver ~57% ~45%
    any of the above + --disable-software-rasterizer --use-gl=disabled 0% ~0%

    Workaround to disable WebGL completely (canvas, OffscreenCanvas, workers and WebGPU all become unavailable):

    app.disableHardwareAcceleration()
    app.commandLine.appendSwitch('disable-software-rasterizer')

    A few notes from testing on 45.x:

    • app.commandLine.appendSwitch('disable-webgl') has no effect: WebGL contexts are still created.
    • webPreferences: { webgl: false } blocks <canvas> WebGL, but not OffscreenCanvas or workers.
    • With disable-software-rasterizer, app.getGPUInfo() rejects with "GPU access is disabled through commandline switch --disable-gpu and --disable-software-rasterizer", so callers need a .catch().

    Repro gist: https://gist.github.com/oalfroukh/7a8f44d8c61ab6a9786064e6eab5a90d

    Docs request

    Would the team be open to clarifying this in the docs for app.disableHardwareAcceleration()? Today it reads as if all GPU usage is disabled, but in practice:

    1. WebGL / WebGPU content keeps running through a software fallback (D3D11 WARP on Windows since Electron 40), which can be CPU-heavy and appears as GPU usage in Windows Task Manager.
    2. The GPU process is still started (it hosts the software compositor), which is expected.
    3. To make WebGL unavailable entirely, apps can also append --disable-software-rasterizer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    41-x-ybug 🪲component/appcomponent/gpuhas-repro-gistplatform/windows

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions