{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreig2augb7rl2ek5ds6gkrzityngeupgfddl36jvffqigtxvltukfsm",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mpgwngcvyh32"
},
"path": "/t/very-high-gpu-usage-when-codex-is-active-window-report-md-and-reproduction-scripts-included/1385270#post_1",
"publishedAt": "2026-06-29T15:55:26.000Z",
"site": "https://community.openai.com",
"tags": [
"(click for more details)"
],
"textContent": "# Codex Desktop macOS GPU spike when focused\n\n## Summary\n\nOn macOS, the Codex Desktop app appears to trigger heavy sustained GPU/compositor activity whenever the Codex window is focused/frontmost. Switching focus to Chrome drops the GPU monitor to near idle immediately.\n\nThe effect reproduces with a small A/B script that focuses Chrome, samples `powermetrics`, then focuses Codex and samples again.\n\n## Environment\n\n * App: Codex Desktop\n * Bundle ID: `com.openai.codex`\n * Codex version: `26.623.61825` (`CFBundleVersion` `4548`)\n * Chromium base: `149.0.7827.197`\n * Machine: `Mac15,10`, Apple Silicon / `arm64`\n * macOS: `27.0` build `26A5368g`\n * Kernel: `Darwin 27.0.0`\n\n\n\n## Quick reproduction\n\n 1. Open Chrome and Codex Desktop.\n 2. Run a focus A/B capture:\n\n\n\n\n sudo powermetrics \\\n --sample-rate 1000 \\\n --sample-count 8 \\\n --samplers tasks,gpu_power,cpu_power,thermal \\\n --show-process-gpu \\\n --show-process-energy \\\n --output-file <output.txt>\n\n\n 3. Capture once with Chrome focused and once with Codex focused. In my local script, focus switching is done with `osascript` using bundle IDs `com.google.Chrome` and `com.openai.codex`.\n\n\n\n## Portable repro and logging script\n\nThe following script should run on any macOS machine with Codex installed in `/Applications/Codex.app`. It creates a timestamped folder containing:\n\n * `metadata.txt`: macOS, hardware, Codex version, current Codex process flags, thermal status, swap status.\n * `Chrome-powermetrics.txt`: raw baseline capture.\n * `Codex-powermetrics.txt`: raw target capture.\n * `summary.txt`: compact GPU active/power comparison to paste into an issue.\n\n\n\nUsage:\n\n\n chmod +x repro-codex-gpu-focus.sh\n ./repro-codex-gpu-focus.sh\n\n\nIf Chrome is not the desired baseline app, override the bundle ID:\n\n\n BASELINE_APP_ID=com.apple.Safari BASELINE_LABEL=Safari ./repro-codex-gpu-focus.sh\n\n\nrepro-codex-gpu-focus.sh (click for more details)\n\n## Results\n\nLaunch mode | Focused app | GPU active avg | GPU active max | GPU power avg | GPU power max\n---|---|---|---|---|---\nNormal Codex launch | Chrome | `1.94%` | `2.92%` | `19 mW` | `26 mW`\nNormal Codex launch | Codex | `70.16%` | `76.86%` | `2324 mW` | `3214 mW`\nReduced-GPU flags | Chrome | `1.70%` | `2.11%` | `15 mW` | `19 mW`\nReduced-GPU flags | Codex | `70.84%` | `78.59%` | `2644 mW` | `3404 mW`\n\nReduced-GPU test flags:\n\n\n open -a \"Codex\" --args \\\n --disable-zero-copy \\\n --disable-gpu-memory-buffer-compositor-resources \\\n --disable-accelerated-2d-canvas \\\n --disable-accelerated-video-decode \\\n --disable-features=CanvasOopRasterization\n\n\nThe reduced flags were visible in the Codex process command line, but did not reduce the GPU load. A harder launch using `--disable-gpu --disable-gpu-compositing` caused Codex to start without a visible window and required force quit, so that path was not usable.\n\n## Additional observations\n\n * `pmset -g therm` reported no thermal or performance warnings.\n * `sysctl -n vm.swapusage` reported `0.00M` swap used.\n * `powermetrics` often attributes the sustained work to `WindowServer` rather than directly to Codex per-process GPU columns, but the focus A/B isolates the trigger to Codex being frontmost.\n * Other background CPU noise was present during some captures (`fileproviderd`, `bird`, `cloudd`), but it did not explain the GPU delta: Chrome focus stayed around 2% GPU active while Codex focus stayed around 70%.\n\n\n\n## Expected\n\nAn idle/focused Codex Desktop window should not sustain roughly 70% GPU active residency and 2.3-2.6 W GPU power when another Chromium/Electron-style app focus state is near idle.\n\n## Request\n\nPlease investigate whether the focused Codex Desktop window has a rendering/compositor loop or macOS WindowServer interaction that keeps the GPU active. I can provide the raw `powermetrics` captures if useful.",
"title": "Very high GPU usage when Codex is active window. REPORT.md and reproduction scripts included"
}