Skip to content

fix(desktop): add --no-angle for Windows GPU crash and implement HERMES_DESKTOP_DISABLE_GPU - #45341

Open
annguyenNous wants to merge 1 commit into
NousResearch:mainfrom
annguyenNous:fix/windows-gpu-no-angle
Open

fix(desktop): add --no-angle for Windows GPU crash and implement HERMES_DESKTOP_DISABLE_GPU#45341
annguyenNous wants to merge 1 commit into
NousResearch:mainfrom
annguyenNous:fix/windows-gpu-no-angle

Conversation

@annguyenNous

Copy link
Copy Markdown
Contributor

Summary

Fixes #45226 — Hermes Desktop crashes on Windows with older Intel integrated graphics (WDDM 1.x drivers) due to the ANGLE graphics abstraction layer crashing the GPU process on startup (exit_code=-2147483645).

Changes

  1. Add --no-angle flag for Windows: Forces Chromium to use the basic Direct3D renderer instead of ANGLE, preventing the GPU process crash on Intel integrated graphics.

  2. Add --disable-gpu-compositing and --use-gl=disabled for Windows: Belt-and-suspenders approach to ensure stable rendering on Windows with problematic GPU drivers.

  3. Implement HERMES_DESKTOP_DISABLE_GPU env var: The comment at line 136 documented this override but it was never actually implemented. Setting HERMES_DESKTOP_DISABLE_GPU=1/true/yes now forces software rendering regardless of platform.

Test Plan

  • Test on Windows with Intel integrated graphics (the reported crash scenario)
  • Verify HERMES_DESKTOP_DISABLE_GPU=1 forces software rendering
  • Verify existing remote display detection still works
  • Verify macOS/Linux behavior is unchanged (Windows-specific flags only)

…ES_DESKTOP_DISABLE_GPU

Windows with older Intel integrated graphics (WDDM 1.x drivers) crashes
the GPU process on startup with exit_code=-2147483645. The ANGLE graphics
abstraction layer is the culprit; --no-angle forces Chromium to use the
basic Direct3D renderer instead.

Also implements the HERMES_DESKTOP_DISABLE_GPU env var that was documented
in comments but never actually checked. Setting it to 1/true/yes now
forces software rendering regardless of platform.

Fixes NousResearch#45226

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Clean, well-scoped fix/feature with comprehensive tests. No issues found.

  • Logic is correct and focused
  • Tests cover the new behavior
  • No security concerns
  • Good error handling

Reviewed by Hermes Agent

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels Jun 13, 2026
@alt-glitch alt-glitch added comp/desktop Electron desktop app (apps/desktop/*) platform/windows Native Windows-specific behavior or breakage and removed comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 26, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for documenting the Windows Intel-GPU reproduction and the reported --no-angle workaround from #45226.

Problems

  • The PR modifies apps/desktop/electron/main.cjs, but current main migrated that entry point to apps/desktop/electron/main.ts in 39d0945; the relevant pre-ready block is now at main.ts:163-194.
  • The override portion is already superseded: bootstrap-platform.ts:67-76 parses HERMES_DESKTOP_DISABLE_GPU, and hermes_cli/main.py:5654-5660 provides the supported desktop.disable_gpu config bridge. The existing behavior is covered by bootstrap-platform.test.ts:71-85.
  • No regression test accompanies the proposed Windows-only command-line switch policy.

Suggested changes

  • Salvage only the still-unresolved automatic Windows no-angle / use-gl=disabled policy into apps/desktop/electron/main.ts before app.ready, if maintainers retain that workaround.
  • Keep GPU configuration user-facing through desktop.disable_gpu and desktop.electron_flags, rather than adding another environment-variable surface.
  • Add a focused Windows/non-Windows regression test for the retained switch policy.

Automated hermes-sweeper review.

@@ -136,14 +136,29 @@ function hiddenWindowsChildOptions(options = {}) {
// switches only apply pre-launch. Override with HERMES_DESKTOP_DISABLE_GPU
// (1/true → always disable, 0/false → keep GPU on).
const REMOTE_DISPLAY_REASON = detectRemoteDisplay()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current main already implements this override through apps/desktop/electron/bootstrap-platform.ts:67-76 and exposes the supported config.yaml surface at hermes_cli/main.py:5654-5660. Please do not duplicate the user-facing environment-variable mechanism when salvaging.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug:hermes desktop 在 Windows 上不斷閃退

4 participants