feat(desktop): notify renderer when GPU acceleration is disabled due to remote display - #49284
Closed
sprmn24 wants to merge 1 commit into
Closed
feat(desktop): notify renderer when GPU acceleration is disabled due to remote display#49284sprmn24 wants to merge 1 commit into
sprmn24 wants to merge 1 commit into
Conversation
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.
sprmn24
force-pushed
the
feat/desktop-rdp-gpu-notification
branch
from
June 19, 2026 22:04
e933177 to
0fa2c46
Compare
Contributor
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.
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.logwas written to the main process log.This PR surfaces that information to the user via a dismissible banner:
hermes:get-remote-display-reasonIPC handler inmain.cjsreturning the already-computedREMOTE_DISPLAY_REASONstring (ornullin normal sessions)preload.cjsaswindow.hermesDesktop.getRemoteDisplayReason()getRemoteDisplayReason?to thehermesDesktoptype inglobal.d.ts<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."desktop-controller.tsxalongside other overlays (same pattern as NotificationStack)remoteDisplayBanneradded toen.ts,types.ts,zh.ts,zh-hant.ts, andja.tsIn a normal local session
REMOTE_DISPLAY_REASONisnulland 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
Changes Made
apps/desktop/electron/main.cjs— addhermes:get-remote-display-reasonIPC handlerapps/desktop/electron/preload.cjs— exposegetRemoteDisplayReasonapps/desktop/src/global.d.ts— type declarationapps/desktop/src/components/remote-display-banner.tsx— new dismissible banner componentapps/desktop/src/app/desktop-controller.tsx— render banner at shell rootapps/desktop/src/i18n/en.ts— banner i18n stringsapps/desktop/src/i18n/types.ts— i18n type definitionsapps/desktop/src/i18n/zh.ts,zh-hant.ts,ja.ts— translationsHow to Test
ssh -X) and launch — banner should appear withssh-sessionreasonHERMES_DESKTOP_DISABLE_GPU=1— banner should appear withoverridereasonnode --checkandtsc --noEmitboth pass cleanChecklist
node --check apps/desktop/electron/main.cjs && node --check apps/desktop/electron/preload.cjspassednpx tsc --noEmitpassed clean