Commit Graph

7 Commits

Author SHA1 Message Date
Teknium
d9e3b5cd75 fix(desktop): the --no-sandbox early restart no longer makes software rendering sticky
main.ts writes the generic Linux GPU ladder's `booting` witness before
`ready`, on every Linux GPU. The runtime --no-sandbox restart settled
only the NVIDIA witness, so the relaunched process read the deliberate
exit as an interrupted boot: an update re-probing an older version's
software fallback (`booting/reprobe`) or one earlier interrupted boot
(`booting/bootAborts:1`) engaged --disable-gpu and wrote a sticky
fallback marker, with no GPU failure at all.

clearLinuxGpuBootMarker settles that witness as `ok` unless the fallback
is sticky, and the restart's beforeExit runs it next to the NVIDIA
cleanExit, before the target starts. The clean-quit path calls the same
helper instead of its inline copy.

Review: unsupportedpastels on #144950, finding 2.1.
2026-10-27 12:29:08 -07:00
Teknium
198f6ad53c fix(desktop): a late GPU crash on Mesa/AMD/Intel Linux no longer pins software rendering
The post-boot witness window was recorded only by the NVIDIA recovery's
healthy(), which returns before setting the clock unless an NVIDIA driver is
present. On every other Linux host afterBootWindow() stayed false, so a GPU
child crash hours after a healthy boot still relaunched with --disable-gpu
and wrote the sticky linux-gpu-fallback marker (software rendering forever).

The boot clock now lives in the generic Linux GPU module
(createLinuxGpuBootWindow). main.ts records the first window reveal on it
for every Linux launch and both ladders read it: the --disable-gpu ladder
via runtimeDeath, the NVIDIA ANGLE ladder via its bootWindow option. The
NVIDIA ladder itself stays NVIDIA-only; a GPU death during boot or inside
the 60 s window takes either ladder exactly as before.
2026-10-27 10:22:52 -04:00
Teknium
c739d5f94a fix(desktop): a GPU crash after a healthy NVIDIA boot takes no --disable-gpu relaunch either
Greptile P1 (main.ts:1094): past the 60 s witness window gpuDied() returned
false, but linuxGpuChildDeathPath() still answered disable-gpu for a
`crashed` GPU child, so the same late, recoverable crash wrote the generic
Linux fallback marker and relaunched with --disable-gpu.

The NVIDIA recovery now exposes afterBootWindow(), and the shared Linux
handler passes it as runtimeDeath, so neither ladder relaunches or writes a
fallback for a GPU death after the boot was witnessed healthy.
2026-10-27 10:22:52 -04:00
Teknium
f6535342db fix(desktop): Linux GPU recovery matches Electron's launch-failed and ignores post-boot GPU kills
Two gaps left after the lock-owned, build-qualified NVIDIA witness:

- linux-gpu-fallback matched only `launch-failure`, a reason Electron never
  emits (it sends `launch-failed`). A GPU child that never launched therefore
  never took the bounded --disable-gpu step, and Chromium's error_code=1002
  retry loop kept a zygote spinning at 350-650% CPU (#134888, #141574).
  Match the real spelling and record it as `gpu-launch-failure`.
- The NVIDIA GPU-death witness fired at any point in the process lifetime,
  including `killed` (exit 15). A GPU child killed hours after a healthy
  boot — session logout, OOM, a driver reset after suspend — wrote a sticky
  SwiftShader fallback for every later launch. Only a death before the first
  reveal, or within 60 s of it, now counts as the launch failing.

Main's existing NVIDIA contract tests stay byte-identical: an unqualified
legacy `booting` marker is still trusted when the launch has no stamped
identity, and `launch-failure` still matches.
2026-10-27 10:22:52 -04:00
hermes-seaeye[bot]
973b27f5c8 fmt(js): npm run fix on merge (#130322)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-01 11:10:50 +00:00
Brooklyn Nicholson
5106ffa2cb fix(desktop): coalesce the Linux GPU-child recovery ladders
One GPU-child death now produces exactly one bounded relaunch instead of
two racing ones: the #121954 sandbox signature (SIGTERM/143) is tried
first — that host matrix shows --disable-gpu still crashes — and any
other GPU failure reason falls to the #124843 software ladder,
including the relapse after a --no-sandbox boot died again.

Also: HERMES_DESKTOP_DISABLE_GPU=1 now appends --disable-gpu so the GPU
process is fully spawn-blocked, not just compositing (#97616 — a GPU
child still spawned and died error_code=1002 with compositing-only
switches), and a post-reveal check catches the #124843 silent-retry
manifestation (window reveals, no gpu-process child, sub-zygote
spinning at ~350% CPU) that the reactive ladder never sees, engaging the
sticky software fallback for the next launch.
2026-10-01 01:46:34 -05:00
finn763
6a2b23b04c fix(desktop): bound Linux GPU-child init retry with one-shot software fallback
On Mesa/Wayland the Chromium GPU child can fail init (error_code=1002)
and retry inside a sub-zygote forever: ~350% CPU, no gpu-process, no
crash. Catch the GPU launch-failure/crash via child-process-gone,
relaunch once with --disable-gpu, and keep a sticky per-version marker
so the next boot goes straight to software rendering. Reactive only:
healthy stacks keep full acceleration. Re-probes the GPU once after an
app update instead of degrading forever.

Review follow-up: HERMES_DESKTOP_DISABLE_GPU=0 (the documented opt-out)
now clears the stale fallback marker instead of carrying it into the
override boot, so the next launch without the override keeps the GPU:
previously the marker stayed `fallback`, main.ts stayed sticky, and only
an app-version change could ever clear it. The --disable-gpu relaunch
path keeps preserving the marker — that boot must stay sticky.
2026-10-01 01:46:34 -05:00