Repository navigation
Keep Thunderbolt USB-C xHCI awake on Intel MacBooks - #7044
shawnyeager wants to merge 14 commits into
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]>
Fix fip function on zsh
* Add QR code capture * Keep the decoded QR value on the clipboard only Freeze the screen before selecting like the other region captures do, restrict decoding to QR so stray barcodes can't take the clipboard, and stop echoing the decoded value to stdout and the notification, since an otpauth:// secret would otherwise land in the journal and notification history. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Mark the copied QR value as sensitive Clipboard history records every selection, so the otpauth:// secret this command is built to capture would survive in it. --sensitive offers the x-kde-passwordManagerHint type that the clipboard capture skips on. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This reverts commit 1777085.
* Offer the Quattro upgrade from the Update menu Ship omarchy-upgrade-to-quattro as a command on the dev branch and add an "Omarchy To Quattro" entry under Update, so the upgrade can be started from the menu instead of curl | bash. The Quattro case comes before the *Omarchy* case because the existing glob would otherwise swallow the new label. The script is the copy that already ships on rc, so the two branches stay identical. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Invite the Quattro upgrade once after updating Send a one-time notification when this version lands, and add the mako rule that turns it into a click target for omarchy-upgrade-to-quattro, the same way the Wi-Fi, update, and Voxtype invitations work. The migration tolerates a missing session so an update run without a desktop doesn't fail on the notification. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Set the version to 3.8.5 dev sits on the Omarchy 3 line alongside master and rc, but its version file had been bumped to 4.0.0.alpha, so anything reading it reported a release this branch does not carry. rc moves to 3.8.5 alongside this. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Kernel 7.1 unpacks the initramfs asynchronously, which races /init: the early /proc, /sys, /dev, and /run mounts fail while unpacking settles, so plymouthd exits when it can't read /proc/cmdline and encrypted boots fall back to an unthemed text LUKS prompt. Pin initramfs_async=0 in the Limine defaults for fresh installs, and drop it into a Limine config plus a UKI rebuild for existing ones. Co-Authored-By: Claude Opus 5 <[email protected]>
Sync upstream dev
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an Apple Intel Thunderbolt USB‑C xHCI “keep awake” workaround by installing a udev rule and wiring it into both the installer and migrations.
Changes:
- Add a new Apple hardware config script that installs a udev rule for Intel JHL6540 (8086:15d4).
- Add a migration that applies the same fix via sourcing the config script.
- Run the new fix as part of the global hardware configuration flow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| migrations/1786836656.sh | New migration to apply the Thunderbolt USB‑C xHCI wake workaround. |
| install/config/hardware/apple/fix-tb-usb-wakeup.sh | New installer script that writes a udev rule and triggers it. |
| install/config/all.sh | Hooks the new Apple workaround into the standard install sequence. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The rule matches ACTION=="add", but udevadm trigger sends "change" unless told otherwise, so on an existing install the migration wrote the rule and left the controller free to suspend until the next boot's coldplug. Co-Authored-By: Claude Opus 5.5 <[email protected]>
xhci_pci's probe calls pm_runtime_allow() on Alpine Ridge controllers (XHCI_DEFAULT_PM_RUNTIME_ALLOW), so any probe after the add event -- a rebind, which is how the controller is recovered, or a remove and rescan around suspend -- put power/control back to auto. Matching bind as well writes it again once the driver is attached. Co-Authored-By: Codex Medium <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Reviewed, with two fixes pushed to your branch. The approach holds, and there's one question below for the maintainer. Pushed
Checked
The unplug bug itself needs a JHL6540 MacBook, so it was not reproduced here. Your report is the only evidence so far. Codex Medium gave a second opinion over two rounds. It found the Open
|
|
Reviewed a4caa97. Running the leaf with Checked
Codex Medium reviewed the new commit and the whole PR, and found nothing. It agreed with the conclusions above, and since it can read this session's working files, that agreement is not guaranteed to be independent. Waiting on @shawnyeager, or anyone with a 2016–2017 MacBook Pro that has the JHL6540 controller ( git fetch https://github.com/shawnyeager/omarchy fix-macbook-tb3-usb-hotplug
git checkout a4caa97e026ec580a94fe3853a9f159f1d8b5b62
bash install/config/hardware/apple/fix-tb-usb-wakeup.sh
grep . /sys/bus/pci/devices/*/power/control | grep -f <(lspci -Dnd 8086:15d4 | cut -d' ' -f1)The last line should print The |
|
Thanks for tracking this down. The diagnosis that the controller is asleep matches what I see on my MacBookPro14,3, and the cause turns out to be in the kernel, with an upstream fix now queued. On Apple machines Linux skips Upstream 2d89ca89b01f ("ACPI: PCI: take native PME control on Apple machines"), which Rafael Wysocki queued in linux-pm for 7.5, fixes this. I opened omacom/omarchy-pkgs#3475 (draft) to carry it in I tested it on a MacBookPro14,3 with no udev rule and the kernel's default runtime PM. Here both Alpine Ridge xHCIs and the ports in front of them sit in D3hot rather than D3cold. With the patched kernel, a USB 3 SSD enumerated within a quarter of a second of the root port's PME interrupt, on both controllers. It did so again after an s2idle cycle, once I had set the re-created bridges back to This rule shouldn't conflict with the kernel fix, though I haven't run the two together. It is still useful until a kernel carrying the fix ships, and on the 14,3 it shouldn't be needed after that. |
|
Retargeted this to GPT-6 in Codex (effort not exposed) checked the diff, ancestry, callers and related PRs. Opus 5.5 High and muse-wonder via pi, thinking high reviewed the same history and overlapping diffs and agreed that this needs a maintainer decision; that agreement is not guaranteed independent. #15537 covers MacBookPro14,1 and adds root-hub/resume handling, so neither PR fully replaces the other. #11570 addresses the separate S3 recovery case. No code was pushed and no new worker tests ran: the queue rules stop an automatic port when the branch carries unrelated Waiting on the maintainer to decide how to carry the hardware fix forward without the unrelated history. Any resulting port needs current-base checks and confirmation on affected hardware. |
Summary
On Intel MacBooks whose USB-C ports sit behind an Intel JHL6540 Thunderbolt 3 xHCI controller (
8086:15d4), the controller runtime-suspends into D3cold after a device is unplugged. The next plug-in never enumerates — no kernel USB event, no/dev/sd*, nothing for udiskie to mount — untilxhci_hcdis rebound.This is separate from
usbcore.autosuspend(already disabled byusb-autosuspend.sh). The PCI device itself is asleep.Fix
install/config/hardware/apple/fix-tb-usb-wakeup.shpower/control=onandd3cold_allowed=0on8086:15d4install/config/all.shfor fresh installs1786836656.shapplies the same script on existing machinesTested
Reproduced on Omarchy 4 /
MacBookPro14,3(2017 15" T1):enable=0,runtime=suspendedpower/control=onand an xhci rebind/dev/sdaNotes
T2 Macs use different Thunderbolt silicon and already have their own suspend path. This only matches JHL6540 (
8086:15d4).