Repository navigation
Conversation
Carry the Linux form of open-acpica/acpica#1235 in the base and BORE kernels, keeping their shared fixes aligned. Bump both package releases and add SHA-256/BLAKE2 checksums for the checked-in patch. During ACPI power-up a bridge's Primary Bus Number can still be zero. ACPICA must retain the address derived from the parent instead of using that reset value and caching an operation region at the host bridge. The equivalent correction reduced three firmware sequences from 6.939 s to 1.836 ms on MacBookPro14,1; controller-loss and Wi-Fi faults remain separate. Broader hardware coverage and upstream review are still needed. The patch records its pending upstream status and removal condition, preserving the source submission's existing human author sign-off. Validate both recipe manifests/checksums, apply to the exact 7.2.5 helper without fuzz/offset, and pass the 15-case actual-C replay and checkpatch. The full new package builds and BORE boot test have not been performed. Upstream: open-acpica/acpica#1235 Assisted-by: LLM
|
Tested the equivalent of this change on a MacBookPro14,3 (JHL6540, two Alpine Ridge host routers), Before. The first resume after boot sets up the After. I applied the same logic as a local kretprobe module, which keeps the parent-derived bus when the Dependencies and limits.
The full list of suspend fixes for this machine and how they depend on each other is in #596. |
Moves the pin from the boot-set integration commit to quattro-upstream, which now has #541 with its review fixes (first boot hands off only for a failed step, and the retry waits for NetworkManager), #543's update-verify entrypoint, #545's provision entrypoints and #549's keyslot-only LUKS check. #544 is not in it, so the Plymouth fragment still ships and no HOOKS baseline dependency applies.
Moves the pin from f7ea7ecc to the head of quattro-upstream, which adds omacom#552's reset-prepare, reset-verify, reset-commit and reset-rollback entrypoints, omacom#553's luks-slots entrypoint and recovery key handling, omacom#556's encrypt unit output to kmsg at notice, and omacom#560's snapshot restore check with its limine-snapper-sync pre and post hooks. The pin's UTC date is still 20260925, so pkgrel goes to 4. omacom#544 is not in it, so the Plymouth fragment still ships and no HOOKS baseline dependency applies.
The engine enabled omarchy-mac-migrate-verify.service with systemctl; with the unit gone the link would dangle. Also correct which omarchy-mac pull requests every omarchy-mac-pkgs pin includes (#544 has not merged).
|
Thanks for reproducing this on MacBookPro14,3. The first-resume primary-bus reset values and preserved parent-derived buses support the diagnosis on a second Mac model. Your equivalent probe-module correction used separate Thunderbolt LC protection from #596. It supports the ACPICA fix, but isn't a test of this exact package or proof that this carry alone fixes controller loss/suspend. ACPICA #1235 remains open, unchanged and signed, without review comments. This carry still targets — GPT-6.1 Sol high |
|
Adding MacBookPro13,3 results from a kernel built with this carry at On the original With the correction built into Scope: I rebuilt the existing I've also reported the hardware evidence directly on ACPICA #1235. Full chronology and limitations. |
|
Tested on a MacBookPro14,3 (15" 2017, two Alpine Ridge controllers behind PEG1 and PEG2), S3 (deep). Rebase. I rebased the patch onto 7.2.8 and renamed it to Method. kprobes on
Separate issue, not caused by this patch. On some resumes Caveat. The test kernel also carried the patches from #596 and #815. Level-0 runs (resume timings only, no method kprobes) showed the same UPSB pattern. Conclusion. On this machine the patch does what it says: the mailbox waits drop from seconds to milliseconds. I would suggest renaming it to 0778 when you rebase. Thanks for tracking this down! |
|
Additional built-kernel evidence from MacBookPro14,3 (15-inch 2017, i7-7820HQ, Radeon Pro 560, two Alpine Ridge Thunderbolt domains), tested November 5–6. I carried this PR's Linux-form correction at Direct PCI-context checkOf 14 selected operation regions, eight became initialized during each platform test:
All eight corrected contexts match the actual PCI/ACPI topology. The other six selected regions remained uninitialized, not verified as either correctly or incorrectly addressed. These were read-only, running-BTF-validated metadata checks with explicit model/kernel/boot guards; no AML was evaluated by the reader. No kernel-memory dump is attached. This check does not establish per-access polling counts. Comparable serialized
|
| Kernel-reported phase | Before | With correction |
|---|---|---|
| noirq device resume | 18449.478 ms | 1143.967 ms |
| normal device resume | 509.023 ms | 455.371 ms |
That is 17.306 s / 93.8% less time in the noirq phase, not a 93.8% total-system wake improvement. Both measurements were serialized (pm_async=0) without compiler load. The corrected trace retained all 4984/4984 entries and recorded no nonzero PM callback results.
Important timing qualification: the corrected run advertised the usual five-second debug pause but skipped it because a wakeup was already pending. Therefore I am comparing the separately delimited resume phases and PCI contexts, not total transition duration or equal debug pauses. These platform tests did not enter real sleep.
The patch also applied to the exact source with zero fuzz/offset; the actual-C 15-case replay passed with compiler warnings treated as errors and ASan/UBSan.
A later, separately controlled real s2idle lid cycle slept 26.563 s, accepted EC/LID wake before device resume, and returned visibly in approximately one second. That cycle additionally required an EC wake-capability workaround, T1 USB remote-wake disabled, and T1Bridge #49; it is not evidence that this ACPICA correction alone fixes suspend. Repeated/long sleeps and battery retention remain unvalidated on this machine.
Thanks for the correction. These results add built-kernel address verification on 7.2.15 to the existing evidence, without claiming new authorship of the patch.
Prepared with AI assistance from local test records and the machine owner's separate visual confirmation. No additional hardware test was run for this comment.
Submitting this directly in the omarchy repo since omarchy seems to have a lot of old macbooks in its userbase. For it to change upstream it has to go through the acpica review process, the linux kernel release candidates, then the arch linux kernel has to be released after that, which could make this change take a couple months or longer (if ever). If and when it gets merged, I'll keep track of it and submit a follow up PR to remove this patch from this repo since it will be directly inherited.
-----------everything below this line is written by ai------------
Carry the PCI operation-region address correction proposed in open-acpica/acpica#1235 in
linux-omarchyandlinux-omarchy-bore. On a MacBookPro14,1, this fixes incorrectly cached PCI addresses during resume and reduces three affected firmware sequences from 6.939 seconds to 1.836 milliseconds.Upstream status: ACPICA #1235 is open for review, not accepted or merged. This is a proposed downstream carry of its current source change, not an already accepted upstream backport. The upstream PR contains the full diagnosis, trace excerpts, historical rationale and standalone reproducer. Please keep this carry aligned with upstream review and remove it when the packaged base kernel includes the correction. Merge timing can follow that review.
What changes
0771-acpica-preserve-parent-derived-pci-bus.patchto the standard and BORE recipes, following this repository's practice of keeping shared kernel fixes in both variants.7.2.5-6to7.2.5-7.drivers/acpi/acpica/hwpci.c: six insertions and eleven deletions. Existingprepare()applies it with--fuzz=0; no new build logic, kernel configuration, power hook, DMI quirk or sleep-policy change is needed.The patch links to the upstream PR and identifies its human-signed source commit,
615f1b568156. Its existing author sign-off and AI-assistance disclosure are preserved. Paths, identifiers and theFixes:reference are translated to Linux form; the functional correction is unchanged.Root cause and why it should be corrected
acpi_hw_get_pci_device_info()locates each bridge using the bus derived from its parent. It then reads that bridge's Primary Bus Number register and overwrites the already established address before reading the Secondary Bus Number.During this machine's ACPI power-up, the bridge header is accessible before the PCI core has restored the bridge's bus-number registers. The primary register can still contain its reset value, zero. The captured upstream bridge is at
04:00.0, but its primary register reads zero; the overwrite redirects the next configuration read to host bridge00:00.0. Derivation nevertheless returnsAE_OK, and the operation region retains the wrong address. The downstream bridge shows the same mechanism.Consequently, the firmware mailbox region at offset
0x530directs 150,120 polling reads to the host bridge, instead of the intended Thunderbolt bridge. Associated accesses at0x538and writes are likewise misdirected. Three firmware retry sequences exhaust their counters. Leaving this unchanged retains incorrect address derivation and misdirected configuration accesses, as well as the visible delay. No host-bridge corruption, exploit or security-boundary crossing was demonstrated.The correction retains the parent-derived address and removes the redundant primary-register read. It preserves device/header checks and secondary-bus reads/error handling. It changes neither firmware retry limits nor PCI power sequencing, and removes one configuration read per inspected bridge rather than adding polling or delays.
The code originated in ACPICA
08fd52445bf4, imported into Linux as95abccb576c4. The patch uses the Linux commit in itsFixes:tag.Hardware evidence and performance
Tested hardware: MacBookPro14,1, 2017 13-inch Intel MacBook Pro, two Thunderbolt 3 ports, no Touch Bar; firmware 451.120.7.0.0, Alpine Ridge controller 8086:1578.
The controlled stock/corrected comparison used Linux 7.2.3-arch1-3 with the same temporary Thunderbolt LC-skip protection and
pm_test=platform. These automatic-return diagnostic transitions include a deliberate five-second pause and do not enter actual sleep.The affected firmware sequences save approximately 6.937 seconds (99.97% shorter). This percentage is not a total-system wake speedup. All six mailbox CIOR calls succeeded after correction, and traced operation-region addresses matched the actual bridge addresses. Later combined real-sleep tests also succeeded, but included separate controller protection and therefore do not establish that this patch alone fixes suspend.
The machine currently runs the official
linux-omarchy 7.2.5-3; the source recipe targeted here is7.2.5-6. The corrected 7.2.3 kernel was built and booted earlier. These are distinct from a new build or hardware test of this packaging PR.Scope and compatibility limits
This is a generic ACPICA correctness change, not a Mac-specific workaround. ACPICA serves other hardware and operating systems, so one MacBook cannot establish universal safety. Restored bridges should retain the same addresses because the primary register normally agrees with the parent-derived bus. Other firmware/topology behavior still needs upstream review and broader testing.
The expanded reproducer compiles the actual C helper and passes 15 cases: four corrected failures and eleven unchanged comparisons. Coverage includes ordinary bridges/endpoints, namespace scopes, nonzero root buses and CardBus headers. The nonzero-root/CardBus additions are simulated fixtures, not physical-device coverage; the patch does not reconstruct an unavailable ancestor secondary-bus value. No universal no-regression claim is made, and BORE has not been boot-tested here.
The separate Thunderbolt power-transition/controller-loss fault can still produce the xHCI 65,535 ms timeout with this address fix present. A corrected-kernel stock-driver control reproduced that fault while the three firmware sequences remained fast (2.675 ms). This PR therefore does not claim to resolve the full minute-long wake, lid wake delivery, sleep power consumption, or intermittent BCM4350 Wi-Fi failure.
Related controller work: omacom/omarchy#10593, omacom/omarchy#10758 and #349. This carry is separate from those driver/state-restoration changes and should not close their reports.
Validation
bash -nandmakepkg --printsrcinfo; source/checksum array lengths and all checked-in hashed sources, including architecture configs, match.drivers/acpi/acpica/hwpci.c.-Wall -Wextra -Werror. The complete reproducible harness is in ACPICA bitwarden: add for aarch64 #1235.checkpatch.pl: zero errors, warnings or checks.git diff --checkpasses for both recipes and for the resulting kernel-source diff (the outer diff of a new.patchfile naturally contains unified-diff context markers).bin/build-matrix linux-omarchy linux-omarchy-boreselects both x86_64 edge builds.acpiexec/acpisrcbuild, the equivalent corrected Linux 7.2.3 kernel build/boot, and the hardware comparison above.A full build of the new 7.2.5 package recipes, full patch-stack application and new hardware/BORE boot testing have not been performed locally. Existing remote archive/signature inputs are unchanged and were not downloaded/reverified for these targeted checks. The repository's normal package build/review remains necessary before shipping.