Skip to content

Keep every Intel Mac on its kernel in the linux-omarchy migration - #12328

Open
nipunhsud wants to merge 2 commits into
omacom:quattrofrom
nipunhsud:kernel-migration-skip-all-macs
Open

nipunhsud wants to merge 2 commits into
omacom:quattrofrom
nipunhsud:kernel-migration-skip-all-macs

Conversation

@nipunhsud

Copy link
Copy Markdown

Fixes #12281.

Problem

Migration 1789325478 exempts Macs from the linux-omarchy swap, but the test only recognises T2 Macs: the linux-t2 package or a -t2 kernel release. A T1 or pre-T2 Mac running stock linux matches neither, so it is switched to linux-omarchy and has BOOT_ORDER rewritten. #12097 (MacBookAir6,1 boots to an emergency shell) and #12131 (Haswell Mac HDMI audio underruns) are non-T2 Macs that took that swap.

Fix

Also skip when /sys/class/dmi/id/sys_vendor starts with Apple, the same idiom migrations/1786391100.sh uses. OMARCHY_KERNEL_DMI_VENDOR overrides the path so the test stays hermetic, matching the other OMARCHY_KERNEL_* overrides in the file. A missing or unreadable vendor file still migrates, so non-DMI machines and VMs are unaffected.

Machines that already ran the migration are untouched; this reaches late updaters coming from 4.0.3 or earlier.

Tests

test/shell.d/omarchy-kernel-migration-test.sh gains three cases: Apple Inc. and Apple Computer, Inc. are skipped with no calls, no config change and no marker; a missing vendor file still installs the kernel. All prior cases still pass.

Note: the existing assertion "the superseded migration must not install the PTL variant first" fails on current quattro independently of this change, because a73bcbf re-added migrations/1789095456.sh after ff85faf removed it.

🤖 Generated with Claude Code

The kernel migration exempts Macs by looking for the linux-t2 package or a
-t2 kernel release, so T1 and pre-T2 Macs on stock linux were switched to
linux-omarchy and had their boot order rewritten (omacom#12281). Two of those
could not live with it: a MacBookAir6,1 boots to an emergency shell on
linux-omarchy (omacom#12097) and a Haswell Mac gets HDMI audio underruns (omacom#12131).

Also skip when the DMI vendor reads Apple, with an env override so the test
stays hermetic. A missing or unreadable vendor still migrates.

Fixes omacom#12281

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@llstrk

llstrk commented Sep 18, 2026

Copy link
Copy Markdown

Recommendation: no blocking issue found in the tested scope

Verified: Apple machines skip the kernel migration

A/B-tested 33f076aa against 9c5482c with simulated package and boot operations:

Apple vendor fixture
  Baseline -> install packages -> change boot configuration
  PR       -> skip migration  -> boot configuration preserved
                                no rebuild marker

Both Apple Inc. and Apple Computer, Inc. are excluded, including a stock-linux fixture. Existing T2-package, running-T2 and ARM exclusions remain intact. Non-Apple, missing-DMI and empty-DMI cases still reach the migration path.

Impact: prevents pending migrations from switching kernels on these Apple machines. It does not restore machines that already migrated.

Existing test failure, not introduced by this PR

omarchy-kernel-migration-test.sh requires 1789095456.sh to be absent, but that filename now contains an unrelated Mise repair. The same assertion fails on baseline.

Suggested follow-up: correct the stale assertion without deleting the unrelated migration. The untouched full test file is not passing.

Test scope: fixture execution only; no Intel Mac boot or real package installation tested.

Automated AI review: Astra inspected the PR, Fable 5.1 and a separate Astra session reviewed it independently, then findings were checked against targeted tests.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge and removed ready Good to merge labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 33f076a. The Apple guard does what it says: a T1 or pre-T2 Intel Mac on stock linux keeps its kernel and boot order, and every other machine still gets linux-omarchy.

What was checked. On a disposable Omarchy worker I ran a reproduction of my own against migration 1789325478. It used a stock-linux x86_64 machine with stubbed package and Limine tools and a fixture DMI vendor. On the base (9c5482c), Apple Inc. and Apple Computer, Inc. were both migrated. On this head both were skipped. With the guard reverted they were migrated again. Dell Inc., an empty vendor file and a missing one still migrate in all three. ./test/cli passes at the head. In test/shell.d/omarchy-kernel-migration-test.sh, every case passes except the stale 1789095456.sh assertion you noted, which fails on the base too and is already gone on quattro (faffb8e). The change merges cleanly into current quattro.

One thing outside this PR stops its tests running once merged. On current quattro, b72d7e5 made omarchy-pkg-present and omarchy-pkg-add call pacman -Q -- <pkg>. The test's pacman stub (line 26) still reads the package from $2, so it sees --. The file now exits on its first case, before your new Apple cases. On the merged tree I fixed that locally, with the stub skipping a leading -- and the line 173 expectation updated for the new -S ... -- linux-omarchy form. Every case then passes, including yours, and they fail with the guard reverted. This is a quattro problem, not one in your diff, so nothing was pushed to your branch.

Second opinion. Codex at medium effort reviewed the diff. It found no defect in the guard. It confirmed the stub breakage above and found the line 173 expectation, which I had missed. It noted that DMI vendor is a heuristic: a Hackintosh with Apple SMBIOS is skipped, and a VM on a Mac host is not. Neither is a reported problem. It also said the new comment overstates things slightly ("keep the kernel they were installed with"), which I left alone because it changes no behaviour. Its agreement on the guard was not guaranteed to be independent of my own reading.

Waiting on the maintainer. Two things are theirs to decide: whether every Intel Mac should be held off linux-omarchy or the kernel should be fixed for these machines (#12131 is already fixed in 7.2.8 and #12097 has an upstream quirk patch), and the quattro test stub fix above. This PR closes #12281 and does not touch Macs that already ran the migration.

@jandrusk

Copy link
Copy Markdown

The Apple DMI-vendor guard looks correct for #12281 (T1 / pre-T2 Macs keep their kernel), and the tests cover Apple Inc. / Apple Computer, Inc. plus missing DMI. One related landmine on the same migration file: #14859 / #14908 report that 1789325478 now fails because linux-omarchy became a meta package for linux-omarchy-bore (#14873 is the open fix). Worth rebasing/coordinating so this Apple skip and the bore entry check land together rather than racing.

@omarchybot omarchybot added the ready Good to merge label Oct 12, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked at 33f076a against current quattro (4c1b4cb), because quattro has moved since the last review and #14873 now edits the same migration.

The test file runs again. 0e7d6c2 on quattro taught the pacman stub about the -- end-of-options marker, which was what stopped omarchy-kernel-migration-test.sh before the Apple cases. On a disposable Omarchy worker, with this branch merged into current quattro, all 21 cases in that file pass, the new Apple and missing-vendor cases included. kernel-headers-migration-test.sh and ./test/cli pass too. With the DMI guard removed, the run fails at the Apple Inc. case. That means the new test does catch the bug it covers.

#14873 does not collide with this. As @jandrusk pointed out, it changes the same migration so that the linux-omarchy-bore boot entry passes the completion check. I merged it on top of this branch and it merged cleanly, and all 22 cases in the combined test file pass. The two changes touch different parts of the migration: Apple machines exit before any install or Limine step, and everything else gets the wider entry check from #14873. They can land in either order.

Second opinion. Codex at medium effort reviewed the change as merged into quattro, and the combination with #14873, and found no defect. It noted that the tests cover a missing vendor file but not an unreadable one or the real sysfs path, which are coverage limits rather than bugs. Its agreement is not guaranteed to be independent of my reading.

Waiting on the maintainer. Whether every Intel Mac should stay off linux-omarchy is their decision. Nothing is left for the author.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 25, 2026
quattro removed the migration tests (omacom#16302), including test/shell.d/omarchy-kernel-migration-test.sh, which this branch extended with its Apple cases. Resolve the conflict by taking the deletion, per the house rule that migrations get no suite test; the migration change merges cleanly beside the Limine tooling skip from omacom#14188.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked, because this stopped merging into quattro. I merged quattro into your branch (8703ece) to fix that, and it merges cleanly again.

What the merge changed. The only conflict was test/shell.d/omarchy-kernel-migration-test.sh. quattro deleted it in dcfc438 (#16302), along with the other migration tests, and AGENTS.md now says migrations get no suite test. So the merge takes the deletion. Your Apple cases went with that file, which means the Tests section of the description now refers to a file that no longer exists. The migration change itself merged untouched, next to the new skip for machines without Limine tooling (#14188). Measured against quattro, this pull request is now just the guard in migrations/1789325478.sh.

What was checked. Without the test file, I wrote a reproduction of my own and ran it on a disposable Omarchy worker. It covers stock-linux x86_64 with stubbed package and Limine tools:

  • On quattro (796e169), Apple Inc. and Apple Computer, Inc. are both migrated.
  • On this head, both are skipped, with no install, no BOOT_ORDER change and no marker.
  • With the guard reverted, both are migrated again.
  • Dell Inc., an empty vendor file and a missing one still migrate. A -t2 running kernel is still skipped.

./test/cli passes. In ./test/shell, 408 of 413 files pass. The other five (agent-account-exec, ascii, branding-about-animation, first-run, runtime-smoke) fail the same way on quattro on the same worker, so they are not caused by this change. The project's own CI had not reported when this was written.

Second opinion. Codex at medium effort and muse-wonder (pi, thinking high) reviewed the merged head. They found no defect. They agreed the conflict resolution is right and the change is proportionate. They also agreed the OMARCHY_KERNEL_DMI_VENDOR override is consistent with the file's other overrides now that its test is gone. Their agreement is not guaranteed to be independent of my reading.

Related. Draft #12691 carries this same guard as part of a larger Intel Mac series. Beyond it, it fails the migration when the DMI vendor cannot be read. This pull request is the older of the two and is the one being brought forward. Which approach to take is the maintainer's call.

Waiting on the maintainer. They have to decide whether every Intel Mac should stay off linux-omarchy, and whether to amend this migration while 4.5.0 is still in RC. Nothing is needed from you.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This change appears safe to merge.

Summary

Adds an Apple vendor check to 1789325478.sh so Intel Macs keep their existing kernel and boot order.

  • Apple-branded Intel Macs keep their installed kernel during migration.

Acknowledged scope from nipunhsud: machines that already completed this migration remain untouched. The description also identifies the superseded-migration test failure as pre-existing; it is not reported here.

Reviews (1) · Last reviewed commit: "Merge quattro into kernel-migration-skip..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Make Omarchy work better on everything! verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kernel migration exempts T2 Macs only, so T1 and pre-T2 Macs are switched to linux-omarchy

4 participants