Skip to content

feat(desktop): notify renderer when GPU acceleration is disabled due to remote display - #49284

Closed
sprmn24 wants to merge 1 commit into
NousResearch:mainfrom
sprmn24:feat/desktop-rdp-gpu-notification
Closed

feat(desktop): notify renderer when GPU acceleration is disabled due to remote display#49284
sprmn24 wants to merge 1 commit into
NousResearch:mainfrom
sprmn24:feat/desktop-rdp-gpu-notification

Conversation

@sprmn24

@sprmn24 sprmn24 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

When Hermes Desktop detects a remote display (RDP, SSH X11-forwarding), it silently disables GPU hardware acceleration to prevent Chromium compositor flicker. The detection and disable already worked correctly, but the renderer had no way to know — only a console.log was written to the main process log.

This PR surfaces that information to the user via a dismissible banner:

  • Adds hermes:get-remote-display-reason IPC handler in main.cjs returning the already-computed REMOTE_DISPLAY_REASON string (or null in normal sessions)
  • Exposes it via preload.cjs as window.hermesDesktop.getRemoteDisplayReason()
  • Adds getRemoteDisplayReason? to the hermesDesktop type in global.d.ts
  • New <RemoteDisplayBanner /> component: calls the IPC on mount, shows a dismissible Alert only when reason is non-null — e.g. "Software rendering active — RDP session detected. GPU acceleration is disabled to prevent flickering."
  • Rendered at shell root in desktop-controller.tsx alongside other overlays (same pattern as NotificationStack)
  • i18n key remoteDisplayBanner added to en.ts, types.ts, zh.ts, zh-hant.ts, and ja.ts

In a normal local session REMOTE_DISPLAY_REASON is null and the banner never renders — zero overhead for the common case.

Related Issue

Related: #37932 (merged — detects remote displays and disables GPU acceleration to stop flicker; this PR surfaces that already-computed reason to the renderer, the user-facing layer #37932 lacked) and #45341 (open — Windows GPU crash --no-angle + HERMES_DESKTOP_DISABLE_GPU, complementary mechanism).

Type of Change

  • ✨ New feature

Changes Made

  • apps/desktop/electron/main.cjs — add hermes:get-remote-display-reason IPC handler
  • apps/desktop/electron/preload.cjs — expose getRemoteDisplayReason
  • apps/desktop/src/global.d.ts — type declaration
  • apps/desktop/src/components/remote-display-banner.tsx — new dismissible banner component
  • apps/desktop/src/app/desktop-controller.tsx — render banner at shell root
  • apps/desktop/src/i18n/en.ts — banner i18n strings
  • apps/desktop/src/i18n/types.ts — i18n type definitions
  • apps/desktop/src/i18n/zh.ts, zh-hant.ts, ja.ts — translations

How to Test

  1. On Windows, open an RDP session and launch Hermes Desktop — banner should appear with the RDP reason
  2. On Linux, SSH with X11 forwarding (ssh -X) and launch — banner should appear with ssh-session reason
  3. In a normal local session — banner should not appear
  4. Set HERMES_DESKTOP_DISABLE_GPU=1 — banner should appear with override reason
  5. Click dismiss — banner disappears for the session
  6. node --check and tsc --noEmit both pass clean

Checklist

  • Contributing Guide read
  • Conventional Commits format
  • Duplicate PR check done (no existing PR surfaces remote-display reason to renderer)
  • node --check apps/desktop/electron/main.cjs && node --check apps/desktop/electron/preload.cjs passed
  • npx tsc --noEmit passed clean
  • Platform: Windows 11 + WSL2 Ubuntu

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/gateway Gateway runner, session dispatch, delivery labels Jun 19, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: #37932 (merged — detects remote displays and disables GPU acceleration to stop flicker; this PR surfaces that already-computed reason to the renderer, the user-facing layer #37932 lacked) and #45341 (open — Windows GPU crash --no-angle + HERMES_DESKTOP_DISABLE_GPU). Same desktop GPU-handling area, complementary mechanisms.

…to remote display

Remote displays (RDP/SSH/X11) silently disable GPU hardware acceleration with
only a console.log, leaving the user unaware that software rendering is
active. Expose the detected reason over IPC and surface a dismissible banner
in the renderer.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via #49310 — your commit was cherry-picked onto current main with your authorship preserved in git history (commit 8ebe37f). Thanks for completing the user-facing layer #37932 was missing!

@teknium1 teknium1 closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants