Repository navigation
Conversation
JHL6540 PME pulls MacBookPro13,x/14,x out of deep sleep about every 45s with the lid still closed. logind then suspends again; after enough cycles resume hangs. Disable TB wakeup and skip PCIe port PM. Keep thunderbolt loaded and leave pm_async on.
Resume from deep sleep on Alpine Ridge is slow enough that the portable 3s debounce still feels like a hang. Write /etc/omarchy/lid-suspend-delay so those machines wait 20s; leave an existing value alone.
|
Follow-up: the installer also writes |
|
Reviewed at 5e177a3 by Claude Opus 5.5, with Codex Medium as a second opinion. Codex reached the findings below on its own and added the comparison with #11570 and the What ran. I tested this on a disposable Omarchy VM, which has no Mac hardware. Findings
Related. #11570 also disables S3 wake on the Alpine Ridge root ports for these same models, so the two compete on the wake loop. Asked separately, Codex judged this one the more targeted fix for the loop itself. #11570's remove/rescan and Wi-Fi reload address other resume failures. #10758 moves the MacBookPro14,1 to s2idle, and #9899 blacklists Waiting on the author for the scope changes above. After that, it needs a maintainer to confirm it on a T1 MacBook Pro and to choose between this and #11570. |
|
A data point from a 15-inch MacBookPro14,3 (Radeon Pro 555 drives the internal panel), which this PR's gate includes. "S3 works on this firmware" does not hold for this model. S3 ( What works here: s2idle on a kernel with omarchy-pkgs#596 + #544. 18 of 18 sleeps resumed, including a 3-minute lid close. noirq resume took about 0.49 s, with no Thunderbolt The Suggestion: keep the wakeup half for all T1 models, but don't treat |
|
Re-read at the same head (5e177a3) after @niconistal's MacBookPro14,3 report, by Claude Opus 5.5 with Codex Medium as a second opinion. Codex reached the same reading. It can see this session's notes, so its agreement is not guaranteed to be independent. Nothing new was run: the code hasn't changed since the worker run in the earlier comment. What the report changes. This pull request doesn't choose a sleep mode or touch The gate finding, sharpened. The report confirms that the This report is evidence for one part of the change, not verification of this head. It doesn't name the SHA, and the whole pull request wasn't installed. Waiting on the author for the scope changes, then on a maintainer to confirm on a T1 MacBook Pro and to choose between this and #11570. |
|
Following up on the bot's gate finding, with the 14,3's
So the PCI-ID udev rule carries over to the 14,3 and the fixed ACPI names don't. On this machine, the udev rule plus the T1 rule were enough: 18 s2idle sleeps without a wake loop, with The 14,3's s2idle switch is now in its own draft, #14692, which depends on omarchy-pkgs#596 and #544, as the bot suggested. |
|
Re-read at the same head (5e177a3) after @niconistal's The gate finding, narrowed. What the data doesn't settle. The 14,3 result (no wake loop with Related. #14692 (draft) moves the 14,3 to s2idle. It touches different files and doesn't compete with this one. Waiting on the author for the scope changes, then on a maintainer to confirm on a T1 MacBook Pro and to choose between this and #11570. |
|
Looks like the right direction for the Alpine Ridge PME loop on 13,x/14,x (#12194). Two open scope questions before merge:
Also note this sets |
|
Re-read at the same head (5e177a3) after @jandrusk's comment, by Claude Opus 5.5 with Codex Medium as a second opinion. Nothing new was run, because the code hasn't changed. Codex checked the comment against the source on its own and pointed out that it merges two separate 14,3 reports. Its agreement on the rest is not guaranteed to be independent, because it can read this session's notes. What the source confirms. The helper only toggles The 14,3 reports are two different results. The Waiting on the author for the scope changes in the first comment: narrow the gate to the models that have been checked, and drop the |
|
One lid-closed stretch on a MacBookPro14,2, Omarchy 4.5.0-3, The screen came back much faster than the previous deep resume on this machine, which had stalled in The lid was closed once. The machine did not stay down. With the lid still closed it completed four deep cycles:
logind issued the second suspend 0.2 s after the first resume, because the lid was still closed. The third and fourth followed about 25 s after the previous resume, again with no lid-open event. The first resume still logged Wi-Fi reloaded its firmware on the early resumes, then wedged. On this 4.5 / 7.2.15 boot, |
|
Re-read at the same head (5e177a3) after @hanscnelson's MacBookPro14,2 test, by Claude Opus 5.5 with Codex Medium and muse-wonder (pi, thinking high) as second opinions. Nothing new was run, because the code hasn't changed and the wake loop needs a T1 Mac that the workers don't have. Both reviewers reached the points below. muse-wonder added that the baseline run already had What the test shows. The 14,2 is the one model this pull request was proven on, on 4.0.2 with kernel 7.1.9. On 4.5.0-3 with What it leaves open. The report doesn't say whether the PCI half of the change was in place: the udev rule that sets Not caused by this change, as far as the data goes. The same machine without these settings already logged One question that would settle it, for @hanscnelson while the settings are still installed: with the dock attached as before, please run this just before one lid close. for d in /sys/bus/pci/devices/*; do [[ $(<$d/vendor) == 0x8086 && $(<$d/device) =~ ^0x15d[24]$ ]] && echo "${d##*/} $(<$d/device) $(<$d/power/wakeup)"; done
grep -E '^(RP05|RP09|RP12|XHC2|XHC3)[[:space:]]' /proc/acpi/wakeup
grep . /sys/firmware/acpi/interrupts/gpe32 /sys/firmware/acpi/interrupts/gpe33If it wakes by itself, please also post the two GPE counts and Waiting on the author for the scope changes in the first comment: narrow the gate to the models that have been checked, and drop the |
|
Follow-up on the same MacBookPro14,2, Omarchy 4.5.0-3,
One lid close produced five deep cycles (about 56 s, then 9 s, 3 s, 3 s, and 4 s). The lid-open event is during the fifth resume. Afterward:
Every one of those PCI devices read |
|
Re-read the source at unchanged head The follow-up answers the PCI-wakeup question from the last review. All wake settings this diff installs were checked before sleep: both The GPE counters rising from 0 to 5 do not distinguish a wake trigger from activity during resume. The baseline already had T1 descriptor failures; the Wi-Fi wedge followed repeated resumes, so neither is established as a regression caused by this change. Waiting on @ijt to account for this negative result with a revised approach and hardware evidence. Narrowing the model gate and removing or relocating the unused |
Fixes #12194
Why
On MacBookPro14,2 (2017 13", T1, no T2 chip) the two JHL6540 Alpine Ridge Thunderbolt 3 controllers emit PME about every 45s and pull the machine out of
deepS3 with the lid still closed. logind sees the closed lid and suspends again. That loop ran for hours here: the chassis got hot in a bag, and after enough cycles thunderbolt resume hung (tb_cfg_read/write: -108,pcieport … D3cold to D0, device inaccessible). Opening the lid did nothing; only a power-button hold recovered it.install/hardware/apple/fix-suspend-nvme.shalready matches these DMI ids. T2 setup correctly no-ops (106b:180[12]is absent). This is the missing T1 half.What
Gated on
MacBookPro13,[123]|MacBookPro14,[123]:8086:15d2/8086:15d4power/wakeup=disabled.pcie_port_pm=offso those ports do not sit in D3 for ~1s each on resume.Explicitly not in this PR
pm_async=off. That is correct on some T2 boxes and wrong here: it serialized the D3 waits into a ~60s black screen.blacklist thunderbolt. USB-C charging still works without the module; docks / DP-alt would not. Wakeup disable +pcie_port_pm=offis the conservative first patch.Test plan
PM: suspend entry (deep)and no wake until lid open. Machine stays cool../test/cliandtest/shell.d/alpine-ridge-suspend-test.sh.Proven on Omarchy 4.0.2-1, MacBookPro14,2, kernel 7.1.9-arch1-2. After these local equivalents, a 30-minute lid-closed stretch came back immediately and was cool to the touch.
Sibling: lid-close debounce in #12210 (#12193).