fix(main): support disabling gpu for rdp

This commit is contained in:
777genius 2026-06-01 17:31:18 +03:00
parent 8d722e62dc
commit eff408d60a
2 changed files with 11 additions and 0 deletions

View file

@ -227,6 +227,12 @@ Use the desktop app as the primary product. The browser/web path is not needed f
No. You can start with the free model with no auth right away. If you want Claude, Codex, OpenCode/OpenRouter, or other provider-backed models, the app guides runtime detection/setup and provider authentication from the UI.
</details>
<details>
<summary><strong>What if the Linux app freezes or shows a blank window over RDP?</strong></summary>
<br />
Some RDP (Remote Desktop Protocol) sessions expose virtual GPU drivers that can break Electron rendering. Launch with `AGENT_TEAMS_DISABLE_GPU=1` to disable Electron hardware acceleration for that run, for example `AGENT_TEAMS_DISABLE_GPU=1 pnpm dev` from source or `AGENT_TEAMS_DISABLE_GPU=1 ./Agent.Teams.AI.AppImage` for AppImage builds.
</details>
<details>
<summary><strong>Does it read or upload my code?</strong></summary>
<br />

View file

@ -257,6 +257,11 @@ const appStartedAtMs = Date.now();
const openCodeManagedHostInstanceId = `${process.pid}-${appStartedAtMs}`;
let openCodeLifecycleBridge: OpenCodeReadinessBridge | null = null;
if (process.env.AGENT_TEAMS_DISABLE_GPU?.trim() === '1') {
app.disableHardwareAcceleration();
logger.info('Hardware acceleration disabled by AGENT_TEAMS_DISABLE_GPU=1');
}
function hasWarningRelayDiagnostics(diagnostics: readonly string[]): boolean {
return diagnostics.some(
(diagnostic) => !isInformationalOpenCodeRuntimeDeliveryDiagnostic(diagnostic)