Fix suspend/resume on MacBookPro14,1#5970
Open
erikwb wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a MacBookPro14,1-specific workaround to improve suspend/resume reliability by switching the sleep mode to s2idle and blacklisting thunderbolt, and wires it into the overall install flow.
Changes:
- Introduce
fix-suspend-s2idle.shto applymem_sleep_default=s2idleand blacklistthunderbolton MacBookPro14,1. - Invoke the new Apple suspend fix script from the main
install/config/all.shrunner.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| install/config/hardware/apple/fix-suspend-s2idle.sh | New hardware-specific script to apply s2idle + module blacklist on MacBookPro14,1. |
| install/config/all.sh | Runs the new s2idle suspend fix during the full install configuration sequence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+5
| # Fix suspend/resume on MacBookPro14,1 (2017 13" Intel, no Touch Bar). | ||
| # | ||
| # This machine hangs or fails to resume from the firmware's default S3 ("deep") | ||
| # sleep. Two changes make s2idle suspend reliable: | ||
| # 1. Default to s2idle instead of deep (S3 is broken on this platform). |
| DROP_IN="/etc/limine-entry-tool.d/apple-mbp-suspend-s2idle.conf" | ||
| DEFAULT_LIMINE="/etc/default/limine" | ||
|
|
||
| if [[ ! -f $DROP_IN ]] || ! grep -q 'mem_sleep_default=s2idle' "$DROP_IN"; then |
| EOF | ||
| fi | ||
|
|
||
| if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'mem_sleep_default=s2idle' "$DEFAULT_LIMINE"; then |
Comment on lines
+33
to
+41
| cat <<EOF | sudo tee "$DROP_IN" >/dev/null | ||
| # Omarchy: default to s2idle suspend on MacBookPro14,1 (S3 is broken) | ||
| KERNEL_CMDLINE[default]+=" mem_sleep_default=s2idle" | ||
| EOF | ||
| fi | ||
|
|
||
| if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'mem_sleep_default=s2idle' "$DEFAULT_LIMINE"; then | ||
| sudo tee -a "$DEFAULT_LIMINE" < "$DROP_IN" >/dev/null | ||
| fi |
This 2017 13" Intel MacBook Pro (no Touch Bar) fails to resume from the
firmware default S3 ("deep") sleep. Two changes make s2idle suspend
reliable:
- default mem_sleep to s2idle (via a limine-entry-tool drop-in), since
S3 is broken on this platform
- blacklist the thunderbolt module, which otherwise blocks a clean
resume
Wired into install/config/all.sh next to the existing apple fixes and
scoped by DMI product name to exactly MacBookPro14,1, the only model
this was verified on.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9ca4453 to
84ab18d
Compare
Author
|
Most of copilot's suggestions look counter to convention in the other hardware scripts, but it does look prudent to just use the drop-in directory. |
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.
These 2017 Kaby Lake, non T1, Intel MacBook Pros fail to resume from the firmware default S3 or even s2idle sleep. Two changes make s2idle suspend reliable:
Wired into install/config/all.sh next to the existing apple fixes and scoped by DMI product name to MacBookPro14,1.