gpui: Detect thermal state to help the system#45638
Merged
Anthony-Eid merged 18 commits intozed-industries:mainfrom Feb 5, 2026
Merged
gpui: Detect thermal state to help the system#45638Anthony-Eid merged 18 commits intozed-industries:mainfrom
Anthony-Eid merged 18 commits intozed-industries:mainfrom
Conversation
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
74df82b to
47cbd27
Compare
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
rtfeldman
pushed a commit
that referenced
this pull request
Feb 5, 2026
Apple recommends checking the system’s thermal state and adjusting behavior to reduce resource usage, giving the system a chance to cool down. While this API is macOS-specific, the same idea likely applies to other platforms - those are intentionally out of scope for this PR. As a first step, we cap the frame rate at 60 fps when the system reports a critical thermal state. In that situation, pushing higher frame rates doesn’t buy us anything and just adds more heat. This also gives us a hook for future improvements, like reducing other work when the system is under sustained thermal pressure. Ref: https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/RespondToThermalStateChanges.html Release Notes: - Zed now reduces resource usage when the system is under high thermal stress --------- Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com> Co-authored-by: Anthony Eid <anthony@zed.dev>
Contributor
|
I've been seeing frequent crashes on my Macbook Pro (2019 Intel) referencing code introduced in this PR: crates/gpui/src/app.rs:749:39 Lines 745 to 756 in d453d95 I first saw it on Friday less than a day after this was merged. It makes Zed Preview/Nightly unusable on my Mac Intel machine. I updated to macOS 26.3 yesterday, but saw it with 26.2 too. |
3 tasks
Contributor
Author
|
@notpeter thank you so much for all the infos and sorry for the trouble. I believe I’ve identified the issue and have opened a PR |
bennetbo
pushed a commit
that referenced
this pull request
Feb 16, 2026
Fixes #45638 (comment) Closes #49005 The issue was similar to the one we already had with the quit method https://github.com/zed-industries/zed/blob/8249ef56187b966c33f6667d0d3a35d88d8f2dc0/crates/gpui/src/platform/mac/platform.rs#L491 @notpeter Could you please test this branch to confirm it resolves the issue? - [ ] Tests or screenshots needed? - [x] Code Reviewed - [ ] Manual QA Release Notes: - Fixed an issue where Zed would randomly crash on macOS intel
github-actions bot
pushed a commit
that referenced
this pull request
Feb 16, 2026
Fixes #45638 (comment) Closes #49005 The issue was similar to the one we already had with the quit method https://github.com/zed-industries/zed/blob/8249ef56187b966c33f6667d0d3a35d88d8f2dc0/crates/gpui/src/platform/mac/platform.rs#L491 @notpeter Could you please test this branch to confirm it resolves the issue? - [ ] Tests or screenshots needed? - [x] Code Reviewed - [ ] Manual QA Release Notes: - Fixed an issue where Zed would randomly crash on macOS intel
Merged
3 tasks
zed-zippy bot
added a commit
that referenced
this pull request
Feb 16, 2026
…-pick to preview) (#49248) Cherry-pick of #49086 to preview ---- Fixes #45638 (comment) Closes #49005 The issue was similar to the one we already had with the quit method https://github.com/zed-industries/zed/blob/8249ef56187b966c33f6667d0d3a35d88d8f2dc0/crates/gpui/src/platform/mac/platform.rs#L491 @notpeter Could you please test this branch to confirm it resolves the issue? - [ ] Tests or screenshots needed? - [x] Code Reviewed - [ ] Manual QA Release Notes: - Fixed an issue where Zed would randomly crash on macOS intel Co-authored-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
naaiyy
added a commit
to Glass-HQ/Glass
that referenced
this pull request
Feb 16, 2026
Key changes: - Thermal state detection (zed-industries#45638) - GPUI detects system thermal state, throttles to ~60fps when overheating - Checkerboard shader for side-by-side diff (zed-industries#48417) - visual pattern for diff backgrounds - cosmic-text v0.17 (zed-industries#48504) - fixes font ligatures on Linux - Middle click tab close (zed-industries#44916) - on_aux_click/is_middle_click API additions - Soft wrap modes for wrap width (zed-industries#46422) - Tab switcher mode similar to vim/helix buffer picker (zed-industries#47079) - Multi_buffer optimization batch (zed-industries#48519) - TreeMap for diagnostics (zed-industries#48482) - performance improvement - Semantic token follow-up fixes (zed-industries#48485) - Claude Opus 4.6 and 1M context window model variants (zed-industries#48508) - Anthropic adaptive thinking types (zed-industries#48517) - Side-by-side diff: hunk gutter highlights restored, toolbar buttons for SplittableEditor - Shell quote bypass fix in terminal permission system (zed-industries#48436) - Project panel: Collapse All improvements (zed-industries#47328, zed-industries#48443) - Edit prediction: trailing newlines fix, cursor position in global coords - Properly discard tokens on language server stop (zed-industries#48490) - AgentTool::NAME const instead of hardcoded strings (zed-industries#48506) Conflict resolution: - collab/editor_tests.rs: deleted (collab removed) - vim (helix, motion, increment): deleted (vim removed) - GPUI (17 files): deleted from Glass (handled in Obsydian-HQ/gpui) - editor/items.rs: merged imports (added BufferId, kept Theme) - project_diff.rs: removed old native_button toggle (upstream uses toolbar buttons now) - lsp_store.rs: added SemanticTokenConfig, removed GlobalLogStore/LanguageServerKind - project_panel.rs: merged UI imports (added ContextMenuEntry, ScrollAxes) - Keymaps: took upstream JetBrains bindings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rtfeldman
pushed a commit
that referenced
this pull request
Feb 17, 2026
Fixes #45638 (comment) Closes #49005 The issue was similar to the one we already had with the quit method https://github.com/zed-industries/zed/blob/8249ef56187b966c33f6667d0d3a35d88d8f2dc0/crates/gpui/src/platform/mac/platform.rs#L491 @notpeter Could you please test this branch to confirm it resolves the issue? - [ ] Tests or screenshots needed? - [x] Code Reviewed - [ ] Manual QA Release Notes: - Fixed an issue where Zed would randomly crash on macOS intel
8 tasks
Caio-Ze
pushed a commit
to Caio-Ze/postprod-ide
that referenced
this pull request
Feb 21, 2026
…49086) Fixes zed-industries#45638 (comment) Closes zed-industries#49005 The issue was similar to the one we already had with the quit method https://github.com/zed-industries/zed/blob/8249ef56187b966c33f6667d0d3a35d88d8f2dc0/crates/gpui/src/platform/mac/platform.rs#L491 @notpeter Could you please test this branch to confirm it resolves the issue? - [ ] Tests or screenshots needed? - [x] Code Reviewed - [ ] Manual QA Release Notes: - Fixed an issue where Zed would randomly crash on macOS intel
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.
Apple recommends checking the system’s thermal state and adjusting behavior to reduce resource usage, giving the system a chance to cool down. While this API is macOS-specific, the same idea likely applies to other platforms - those are intentionally out of scope for this PR.
As a first step, we cap the frame rate at 60 fps when the system reports a critical thermal state. In that situation, pushing higher frame rates doesn’t buy us anything and just adds more heat. This also gives us a hook for future improvements, like reducing other work when the system is under sustained thermal pressure.
Ref: https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/RespondToThermalStateChanges.html
Release Notes: