fix(desktop): disable GPU acceleration on remote displays to stop flicker - #37932
Merged
Conversation
…cker Users on remote/forwarded displays (SSH X11 forwarding, VNC, RDP, WSLg) reported the window flickering during scroll/streaming; nobody on native Windows/macOS ever saw it. Root cause: the app shipped with Chromium's default GPU hardware acceleration and no remote-display handling. Over a remote connection the GPU compositor can't present accelerated layers cleanly across the wire, so the surface flashes on repaint. Local sessions composite on the GPU and never hit it. Detect a remote display before app `ready` (detectRemoteDisplay in bootstrap-platform.cjs) and fall back to software rendering via app.disableHardwareAcceleration() + --disable-gpu-compositing. Software compositing is rock-steady over the wire and the CPU cost is negligible next to the connection's latency. HERMES_DESKTOP_DISABLE_GPU overrides detection both ways for VNC/screen-sharing setups we can't sniff or remote hosts that do have working acceleration.
Contributor
🔎 Lint report:
|
WSLg renders Linux GUIs locally through a vGPU surface rather than shipping frames over the wire, so it doesn't show the remote-compositor flicker — confirmed by a WSL user seeing zero flickering. Drop the WSL branch from detectRemoteDisplay so WSLg keeps hardware acceleration; detection now covers only genuinely-remote displays (SSH X11 forwarding, VNC, RDP). The HERMES_DESKTOP_DISABLE_GPU override still works for anyone who does hit it.
davidgut1982
pushed a commit
to davidgut1982/hermes-agent
that referenced
this pull request
Jun 5, 2026
…mote-flicker fix(desktop): disable GPU acceleration on remote displays to stop flicker
1 task
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
fix(desktop): disable GPU acceleration on remote displays to stop flicker
T02200059
pushed a commit
to T02200059/hermes-agent
that referenced
this pull request
Jun 18, 2026
…mote-flicker fix(desktop): disable GPU acceleration on remote displays to stop flicker
Closed
7 tasks
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…mote-flicker fix(desktop): disable GPU acceleration on remote displays to stop flicker
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…mote-flicker fix(desktop): disable GPU acceleration on remote displays to stop flicker
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…mote-flicker fix(desktop): disable GPU acceleration on remote displays to stop flicker
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…mote-flicker fix(desktop): disable GPU acceleration on remote displays to stop flicker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Users on remote/forwarded displays reported the desktop window flickering during scroll/streaming. Nobody on native Windows/macOS ever saw it — the tell that it's a remote-display problem.
Root cause. The app shipped with Chromium's default GPU hardware acceleration and no remote-display handling (
main.cjshad no GPU switches at all; the existing "remote" code is all about the remote gateway backend, unrelated to the display). Over a remote connection (SSH X11 forwarding, VNC, RDP), Chromium's GPU compositor can't present accelerated layers cleanly across the wire, so the surface flashes on repaint. Local sessions composite on the GPU and never hit it.Fix. Detect a remote display before
app.readyand fall back to software rendering — the standard remedy (what VS Code/Slack expose for RDP/VNC). Detection (detectRemoteDisplayinbootstrap-platform.cjs, pure + unit-tested) flags:SSH_CONNECTION/SSH_CLIENT/SSH_TTY)DISPLAY=<host>:N, e.g.localhost:10.0) — but not local:0/:1SESSIONNAME=RDP-*)WSLg is intentionally not flagged: it renders locally via vGPU and doesn't show the flicker (confirmed by a WSL user with zero flickering). VNC/screen-sharing can't be sniffed reliably, so it's covered by the override.
When flagged:
app.disableHardwareAcceleration()+--disable-gpu-compositing.HERMES_DESKTOP_DISABLE_GPUoverrides both ways (1/true→ always disable for VNC/screen-sharing we can't sniff;0/false→ keep GPU on for remote hosts that do have working acceleration). The decision is logged.This also quietly fixes the terminal's WebGL surface: with
--disable-gputheWebglAddoncontext creation fails into its existing DOM-renderer fallback, which is stable over the wire.Changes
electron/bootstrap-platform.cjs— add puredetectRemoteDisplay({ env, platform }).electron/main.cjs— disable HW acceleration early when a remote display is detected; log the reason.electron/bootstrap-platform.test.cjs— tests (local stays on; WSLg stays on; SSH/X11-forward/RDP flagged; local:0/:1not flagged; override both ways).Test plan
node --test electron/bootstrap-platform.test.cjs— 10/10 passnpm run test:desktop:platforms— passeslinton changed files — 0 new problems (the 6main.cjserrors are pre-existing onmain, verified via stdin lint oforigin/main)npm run devconfirmed unaffected (GPU stays on; noremote display detectedboot line)HERMES_DESKTOP_DISABLE_GPU=1), confirm the boot log shows the disable line and the flicker is gone