From eff408d60a9307c7da18f94e1072e80e5d48884d Mon Sep 17 00:00:00 2001 From: 777genius Date: Mon, 1 Jun 2026 17:31:18 +0300 Subject: [PATCH] fix(main): support disabling gpu for rdp --- README.md | 6 ++++++ src/main/index.ts | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index e5debee2..8e685bd2 100644 --- a/README.md +++ b/README.md @@ -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. +
+What if the Linux app freezes or shows a blank window over RDP? +
+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. +
+
Does it read or upload my code?
diff --git a/src/main/index.ts b/src/main/index.ts index 196494b0..48c40315 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -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)