feat(desktop): notify renderer when GPU acceleration is disabled due to remote display - #49310
Merged
Conversation
…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.
Contributor
🔎 Lint report:
|
Closed
7 tasks
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.
Surfaces the already-computed
REMOTE_DISPLAY_REASONto the renderer so users on remote displays learn why GPU acceleration is disabled, instead of just seeing degraded rendering with no explanation.#37932 (merged) detects RDP/SSH/X11 and disables hardware acceleration to stop Chromium compositor flicker — but the only feedback was a main-process
console.log. This adds the user-facing layer #37932 lacked.Changes
electron/main.cjs:hermes:get-remote-display-reasonIPC handler returningREMOTE_DISPLAY_REASON(ornull)electron/preload.cjs: exposegetRemoteDisplayReason()onwindow.hermesDesktopsrc/global.d.ts: type declarationsrc/components/remote-display-banner.tsx: dismissible<Alert>banner, renders only when reason is non-nullsrc/app/desktop-controller.tsx: render at shell root in theoverlaysblocksrc/i18n/{en,zh,zh-hant,ja}.ts+types.ts: banner stringsIn a normal local session
REMOTE_DISPLAY_REASONisnull→ banner never renders, zero overhead.Validation
main.cjs:142-149): detection works, feedback was console.log-only.alert,codicon,Info) resolve; matches existinggetVersionIPC + overlay-block patterns.node --checkon both.cjsfiles clean;npx tsc --noEmitclean (full root install).Salvaged from #49284 by @sprmn24, cherry-picked onto current main with authorship preserved.
Infographic