Repository navigation
Conversation
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.
| # 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 |
| 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
|
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. |
|
Thanks for working on this machine, @erikwb. There is now a second pull request fixing the same bug, and I think that one should be the one taken forward. So I have not run this one on a test machine, and it waits on the maintainer to decide. The competing fix. #10758 fixes suspend on the MacBookPro14,1 too. Its investigation is in #10593. It also defaults to s2idle through a limine drop-in, but it keeps Thunderbolt working instead of turning it off: an out-of-tree module ( What I found in this pull request, at 84ab18d:
Both are right about s2idle: running Checked: the diff, read against This waits on the maintainer to choose between the two approaches. |
|
This pull request now targets What changed with the retarget, at 84ab18d:
I did not port it or run it on a test machine, because the competing fix is still the one I would take forward. #10758 also defaults this model to s2idle, but keeps Thunderbolt working by fixing its suspend handling instead of switching it off, and it ships a migration. It is not ready either: it depends on the Checked: this diff, #10758 and #9899, read against |
|
Thank you for this, @erikwb. On Closed at the maintainer's request. The review above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent. |
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.