Repository navigation
Scope the MacBook NVMe suspend fix to Apple's NVMe controller - #11624
niconistal wants to merge 3 commits into
Conversation
The fix matched MacBookPro13,3 and 14,3, where 0000:01:00.0 is the AMD GPU and the NVMe drive sits at 02:00.0, so it disabled D3cold on the GPU instead. Only apply it where Apple's controller (vendor 0x106b) is at 01:00.0, and remove the service from existing installs where it is not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Data point from a MacBookPro14,3 (Radeon Pro 560 1002:67ef, subsystem 106B:0179) relevant to dropping the On this machine amdgpu cannot resume the Radeon after it loses power. S3 (kernel 7.1.9-arch1-2) and S4 (7.2.5-3-omarchy) both fail the same way: s2idle resumes fine with the Radeon kept out of D3cold ( |
|
Follow-up: I checked the ACPI tables on this 14,3. There is no |
|
Reviewed at e9ee03c. No defects found, and nothing was pushed. What was checked, on a disposable Omarchy worker VM:
Second opinion: Codex Medium reviewed the same diff and found no defects. It agreed with the above, and its independence from this review is not guaranteed. Competing fix: #10877 fixes the same issue a different way. It looks up the NVMe's real address instead. Codex Medium was asked to compare the two without my view, and both of us prefer this one, for three reasons:
The choice between them is the maintainer's. I've linked this pull request to #10826, which it fixes. Waiting on: confirmation on real hardware. The reproduction above uses a fake sysfs, which shows the logic is right but not how it behaves on the machine. @passerini, you opened #10826 on a MacBookPro13,3. Could you test this exact commit there? git clone https://github.com/niconistal/omarchy.git /tmp/omarchy-11624
cd /tmp/omarchy-11624 && git checkout e9ee03c9ab10c3c64c44518a030a09abe2c2a73d
bash -euo pipefail migrations/1789274148.sh # removes the unit aimed at the GPU
systemctl status omarchy-nvme-suspend-fix.service # expect: could not be found
bash install/hardware/apple/fix-suspend-nvme.sh # expect: no output, no unit written
# reboot, then:
cat /sys/bus/pci/devices/0000:01:00.0/d3cold_allowed # expect: 1Please reply with what those print, and whether suspend behaves any differently from before. |
|
Confirming this on a MacBookPro14,3 (15" 2017, Radeon Pro 560, T1), Omarchy 4.0.4, kernel 7.2.5-3-omarchy. NVMe pin hits the GPU. On its own this did not make S3 resume work here; the Alpine Ridge amdgpu and hibernation (S4). Same failure as described above: with What works for us: boot the panel on the iGPU via the Apple EFI variable |
|
Looked again at e9ee03c, the same head as my last review. Two things changed around it. Nothing changed in it, and nothing was pushed. Overlap with #14409. #14409 (lid-close suspend on the MacBookPro14,1) edits #10877 is gone. The competing fix my last comment compared against no longer resolves on GitHub, so there is nothing left to choose between for #10826. @macmsb's report on a MacBookPro14,3 shows the existing service landing on the Radeon at Second opinion: Codex Medium reviewed these three points and found no new defect. It reached the same conclusions, but it could not reach GitHub this time and worked from my summary, so its agreement is not independent. The conflict above comes from my own trial merge, which it could not run. The worker reproduction and suite results from my last comment still stand, because the head and the script on Still waiting on: a test of this exact commit on real hardware by @passerini, who opened #10826, or by a maintainer. The steps are in my previous comment. A confirmation from anyone else is useful context but cannot stand in for that test. |
|
This is the right fix for #10826 (15" models were pinning the dGPU). Prefer over conflicting #12687. Note merge conflict risk with #14409 (same script, different bug) — whichever lands second needs a fold-in. Still would love a confirm from @passerini on real 13,3 hardware. |
…nch Macs The migration removed omarchy-nvme-suspend-fix.service on any machine whose 01:00.0 is not Apple's controller, whatever the file held. An administrator who had edited it, for instance to point it at the drive on 02:00.0 as one 14,3 owner did, lost that edit without a word. Omarchy's migration guide asks a migration to match what the installer actually wrote before deleting it, so it now removes only the unit as the leaf generated it, with or without the escaped colons, and leaves an edited, symlinked or unreadable one where it is with a note saying so. An unreadable unit is read as edited rather than failing the migration, since the leaf always wrote it world-readable and a failure would hold up every migration after this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: Andrew Boyd <andrew@formkit.com>
|
I pushed a fix to the migration. The pull request is now at 8e2fc1d, and the hardware test I asked for earlier needs this commit instead of the old one. What was wrong: What was checked, on a disposable Omarchy worker VM, with this head merged into current
Second opinion: Codex Medium reviewed the head and found the problem above itself, and in a later round the unreadable-unit case. Its last round on the fix found nothing open. #12687, raised by @jandrusk above, is not a separate fix. It is a draft built on this pull request: its first commit is this one, and its other commits change custom-unit handling and add some unrelated test fixes. Codex Medium was asked to compare the two without my view. We both keep this pull request, which is the older one. The idea #12687 had that this one lacked is now included above. Its other changes would also make hardware setup fail when the unit has been edited, and would leave the migration stuck on a machine that has the old unit and nothing at Still waiting on: a test on real hardware, by @passerini, who opened #10826 on a MacBookPro13,3, or by a maintainer: git clone https://github.com/niconistal/omarchy.git /tmp/omarchy-11624
cd /tmp/omarchy-11624 && git checkout 8e2fc1d46fd2c71f3ab0024991bc1fd8950ca1d7
bash -euo pipefail migrations/1789274148.sh # removes the unit aimed at the GPU
systemctl status omarchy-nvme-suspend-fix.service # expect: could not be found
bash install/hardware/apple/fix-suspend-nvme.sh # expect: no output, no unit written
# reboot, then:
cat /sys/bus/pci/devices/0000:01:00.0/d3cold_allowed # expect: 1Please reply with what those commands print, and whether suspend behaves any differently from before. |
|
A data point from a MacBook8,1 (12-inch, early 2015) on Omarchy 4.0.6, kernel 7.2.8. The PR description says the 12-inch MacBooks keep the fix, but on the 8,1 the device at So on I can't say whether the 8,1 actually needs the quirk. Its suspend problems come from the SPI keyboard under S3, which #9735 handles with Filed by Claude Opus 5.5 via Claude Code. |
On the MacBook8,1, 0000:01:00.0 is the Broadcom Wi-Fi card, and Apple's S1X controller (106b:2001) sits at 03:00.0. The vendor check already stopped the leaf from writing the unit there, but the model match, the comments and the test all claimed the 8,1 has Apple's controller at 01:00.0. Drop it from the match, say where its devices really are, and test both the leaf and the migration against its Wi-Fi vendor ID. Reported by JPKFin on the pull request, from lspci on a MacBook8,1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed a fix for the MacBook8,1 case @JPKFin raised. The pull request is now at 0174dda, and the hardware test I asked for earlier should use this commit. What was wrong: the MacBook8,1 does not have Apple's controller at The outcome on an 8,1 is what @JPKFin described. What was checked, on a disposable Omarchy worker VM, with this head merged into current
Second opinion: Codex Medium and muse-wonder (pi, thinking high) reviewed the whole diff at this head. Neither found a defect. Both agreed that dropping the 8,1 is right for this pull request and that extending the quirk to One question for the maintainer, which I have not changed: Codex Medium found a 2019 report of a MacBookPro13,3 with Apple's S3X controller ( The pull request description still says the 12-inch MacBooks keep the fix. With this commit the 8,1 does not; the 9,1 and 10,1 still do. The overlap with #14409 in Still waiting on: a test on real hardware. @passerini, who opened #10826 on a MacBookPro13,3, or @JPKFin on the 8,1, where the migration should remove the unit pinning the Wi-Fi card: git clone https://github.com/niconistal/omarchy.git /tmp/omarchy-11624
cd /tmp/omarchy-11624 && git checkout 0174dda6cb1b5c0909072301b96858b5319835a3
bash -euo pipefail migrations/1789274148.sh # removes the unit pinning the GPU or Wi-Fi card
systemctl status omarchy-nvme-suspend-fix.service # expect: could not be found
bash install/hardware/apple/fix-suspend-nvme.sh # expect: no output, no unit written
# reboot, then:
cat /sys/bus/pci/devices/0000:01:00.0/d3cold_allowed # expect: 1Please reply with what those commands print, and whether suspend or Wi-Fi behaves any differently from before. |
[Medium impact] The PR appears safe to merge. SummaryNarrows the MacBook suspend fix to the intended models with an Apple controller at
The focused Apple NVMe test suite passed. No actionable issues were found. Reviews (1) · Last reviewed commit: "Leave the MacBook8,1 out of the NVMe sus..." · Reviewed by Greptile |
install/hardware/apple/fix-suspend-nvme.shdisables D3cold on0000:01:00.0for every model in its regex, including the 15-inch MacBookPro13,3 and 14,3. On those two models01:00.0is the AMD GPU and the NVMe drive is at02:00.0. The file exists, so the check passes and the fix lands on the GPU. The drive is never touched.From a MacBookPro14,3 on Omarchy 4.0.3:
The quirk comes from Dunedan/mbp-2016-linux, which scopes it to "models with Apple's NVMe controller (MacBookPro13,1, MacBookPro13,2, MacBookPro14,1 and MacBookPro14,2)". The lspci dumps in that repo show those models with Apple's controller
[106b:2003]at01:00.0, and the 13,3 and 14,3 with the GPU there instead.Changes
01:00.0reports Apple's vendor ID0x106b, instead of just checking that a device exists there. The 12-inch MacBooks and 13-inch models keep the fix.ExecStartpath loses its\:escapes, which systemd logs as "Ignoring unknown escape sequences" on every boot. The written value is unchanged.01:00.0is not Apple's controller have the service disabled and removed. The GPU goes back to its default at the next boot.test/shell.d/apple-suspend-nvme-test.shcovers both the leaf and the migration, for every affected model and both 15-inch ones.Testing
test/shell.d/apple-suspend-nvme-test.shpasses../test/shell: the only failures are four suites that also fail on a cleanquattrocheckout here, because there is noomarchy-pkgscheckout.🤖 Generated with Claude Code
Fixes #10826