Skip to content

docs: point 2020 5K iMac hardware acceleration at the companion tooling - #12524

Open
McoreD wants to merge 17 commits into
omacom:quattrofrom
McoreD:feat/imac20-amdgpu-hwaccel-opt-in
Open

McoreD wants to merge 17 commits into
omacom:quattrofrom
McoreD:feat/imac20-amdgpu-hwaccel-opt-in

Conversation

@McoreD

@McoreD McoreD commented Sep 19, 2026 •

Copy link
Copy Markdown

Summary

Follow-up to #12203, which keeps 2020 5K iMacs (iMac20,1 / iMac20,2, Navi 14) bootable with plymouth.enable=0 nomodeset, without GPU acceleration.

This PR is now docs only. It adds a paragraph to manual/44-mac-support.md that:

  • explains why Omarchy keeps the safe flags: the stock linux-t2 amdgpu still fails SMU init intermittently, because t2linux 6001 enables UCLK DPM during init (t2linux/wiki#743);
  • points users who want hardware acceleration now at the community imac20-amdgpu-patch tooling. It rebuilds only amdgpu with the deferred-UCLK fix from wiki#743, adds an imac20-hwaccel Limine entry next to the safe one, and rebuilds both on every linux-t2 upgrade.

The earlier omarchy-install-imac20-amdgpu-hwaccel command is removed. It booted the stock module, which isn't reliable (see below), and the working fix needs a kernel-module rebuild that doesn't belong in Omarchy.

Results on the iMac20,1 (106b:0219)

From every boot in the machine's journal, 2026-09-16 to 2026-10-02 (full table in #12203):

amdgpu, with plymouth.enable=0 amdgpu.modeset=1 video=efifb:off Boots SMU init failed (msg_reg: 6, -62)
linux-t2 package 7.2.6.arch2-4 (6001) 4 2
Rebuilt with the deferred-UCLK fix (7.2.6, then 7.2.7 via the pacman hook) 3 (4 days of daily use) 0

Once linux-t2 carries the deferred-UCLK fix, #12203's drop-in can switch from nomodeset to plymouth.enable=0 video=efifb:off, and this paragraph can go.

Test plan

  • ./test/cli
  • bash test/shell.d/imac20-display-test.sh

Fixes #12197 (second half: hardware acceleration)

🤖 Generated with Claude Code

amdgpu SMU init fails on iMac20,1/iMac20,2 with Radeon Pro 5300/5500, so Plymouth and the kms hook blank the panel before LUKS. Persist plymouth.enable=0 nomodeset for that hardware, migrate existing installs, and document the models.

Fixes omacom#12197
Companion to fix-imac20-display.sh. Once the safe-fallback path (which
keeps the EFI framebuffer through LUKS via nomodeset) has the user at
a working desktop, this turns the GPU back on.

How it works:
- install/hardware/apple/install-imac20-amdgpu-hwaccel.sh clones the
  McoreD/imac20-amdgpu-patch companion repo, runs the build +
  pacman-hook + Limine hwaccel-entry scripts in order, and verifies
  the patched module is in place before declaring success.
- bin/omarchy-install-imac20-amdgpu-hwaccel exposes the same logic
  as a user-runnable command (post-install opt-in).
- The Limine safe entry remains the default; a new imac20-hwaccel
  entry is added at the top level for the user to pick manually.
- The companion repo contains the t2linux 6001 SMU init fix in
  source form, plus a build script that applies it against the
  running kernel-t2 source tree.

Wire-up:
- install/hardware/all.sh runs it after fix-imac20-display.sh on
  matching hardware.
- manual/44-mac-support.md documents the opt-in flow and links
  to the companion repo.

Tests:
- test/shell.d/imac20-amdgpu-hwaccel-test.sh asserts the install
  script gates on the same Navi 14 detector, runs the right companion
  scripts in order, no-ops on non-iMac20 hardware, and that the
  hardware detector only matches iMac20,* products (not iMac19,*,
  not MacBookPro16,1 even with the same GPU).
McoreD added a commit to McoreD/imac20-amdgpu-patch that referenced this pull request Sep 19, 2026
Reorganise the README around three distinct layers:

1. Stock (kernel, amdgpu, Mesa/RADV, mpv, Hyprland, Limine,
   Omarchy) — works on every Linux box with a Radeon RX 5500/5500M
   once a SMU-init patch is in place.

2. Community / 3rd-party (a single 16-line patch by Atharva Tiwari
   in t2linux/linux-t2-patches@main, dated Jul 9 2026, that
   hardcodes the macOS-derived SMU feature masks 0xABC9AFBB /
   0xFFFFFD42 for the exact Apple iMac20,1/iMac20,2 PCI signature
   1002:7340 / 106b:0219).

3. Custom for this user (~250 lines of bash: build, install,
   backup, pacman hook, Limine wiring). No kernel or driver code.

Also note explicitly that the patch can be retired once upstream
Linux lands a Navi 14 SMU-init bypass (likely AMD ongoing
smu_v13_0 work) and arch-mact2/linux-t2 can take it directly.

Switch maintainer email to McoreD@users.noreply.github.com (was
mcored@gmail.com in the original draft).

Add reviews/ to the file inventory. Add the "Pair project"
omacom/omarchy#12524 next to the existing #12203 reference.

Update verified-state example output to use "vaapi[nv12]"
(the actual AMD VCN hardware-decoded format) rather than the older
generic "VO: [gpu]" form, so future readers see specifically that
the AMD VCN block is doing the decode.
@llstrk

llstrk commented Sep 25, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Verified: the first commit (91fc171, the safe display fallback also proposed in #12203) behaves as described in the tested scope. The detector matches only iMac20,* machines with a Navi 14 (1002:7340) display-class device. The drop-in's KERNEL_CMDLINE[default]+= is applied to every kernel entry, and the ISO rebuilds Limine after hardware setup, so a fresh install boots with plymouth.enable=0 nomodeset. imac20-display-test.sh passes (11 checks), including migration idempotence and retry.

The second commit (6bb38b5, the HW-acceleration opt-in) has four issues. The first affects the same users the first commit helps.

Fresh installs on the targeted iMacs stop during hardware setup

install/hardware/all.sh runs install-imac20-amdgpu-hwaccel.sh through run_logged on every install, not only when a user opts in. The ISO runs this inside the target chroot, where /proc/cmdline is the live ISO's command line. On matching hardware every path through the script exits non-zero:

ISO finalizer -> omarchy-apply-system -> omarchy-apply-hardware (set -euo pipefail) -> all.sh
  fix-imac20-display.sh             writes nomodeset drop-in        exit 0
  install-imac20-amdgpu-hwaccel.sh  no "nomodeset" in /proc/cmdline exit 1
    -> later hardware steps skipped, omarchy-apply-system fails
    -> installer reports "Installation halted." before Limine finalization

A sandboxed simulation of the hardware step (head run_logged, fake sysfs, stubbed system commands, system paths redirected to a private root) produced:

Case Exit Next all.sh step ran
iMac20,1 + Navi 14, ISO cmdline without nomodeset 1 no
iMac20,1 + Navi 14, nomodeset added at the ISO menu non-zero at the git clone stub no
MacBookPro16,1 + Navi 14 (control) 0 yes
iMac20,1 + Navi 14, HW-accel line removed from all.sh 0 yes

In the nomodeset case the real script would also need bc and network access in the chroot, and the companion build then fails because its kernel source tree is absent (next finding).

Impact: on iMac20,1/iMac20,2 with Radeon Pro 5300/5500, installation cannot complete, which cancels the benefit of the first commit. The manual describes the command as something to run after install, which matches the intended design rather than this wiring.

Suggested change: remove the run_logged ... install-imac20-amdgpu-hwaccel.sh line from install/hardware/all.sh and the test assertion that requires it. Keep the HW-accel path as the separately invoked command only.

No imac20-hwaccel boot entry is created

The companion's install-limine-hwaccel-entry.sh writes KERNEL_CMDLINE[imac20-hwaccel]+=... and runs limine-mkinitcpio. In limine-entry-tool, the key inside KERNEL_CMDLINE[...] selects the command line of an existing kernel entry, named after the installed kernel package (process_kernel resolves the name through pacman; addKernel/addUki call getKernelCmdline(kernelName)). No package is named imac20-hwaccel, so the key is never read and no new menu item appears. With UKIs enabled, the command line is embedded per kernel, so a menu alias alone would not help either.

The printed promotion step, sed -i 's/KERNEL_CMDLINE\[default\]/KERNEL_CMDLINE[imac20-hwaccel]/', searches for [default] in a file that only contains [imac20-hwaccel], so it changes nothing.

Impact: the script summary ("pick 'imac20-hwaccel'") and the manual describe a boot entry that does not exist. Every linux-t2 entry keeps the first commit's nomodeset.

Suggested change: create a real, separately bootable entry (for example a second UKI or kernel entry whose command line drops nomodeset and keeps the root/unlock arguments). Verify the generated limine.conf and embedded UKI command line, and derive the promotion instructions from that design.

The companion build depends on one machine's layout and is fetched unpinned

The PR clones the companion repo's default branch and runs three of its scripts as root (git pull --ff-only on later runs). The manual says the command rebuilds amdgpu.ko against the installed linux-t2-headers. The companion scripts instead require:

  • a built full kernel source tree at $HOME/build/linux-7.2.6 (headers are not enough), which nothing in the PR prepares;
  • a hardcoded CONFIG_LOCALVERSION="-arch2-Watanare-T2-1-t2" (current linux-t2 is 7.2.6.arch2-5); built and live vermagic are printed but not compared;
  • a copy of repatch-amdgpu.sh from $HOME/build/linux-t2-patched/... for the pacman hook, and a hook script with fixed build paths under the author's home directory and a fixed -T2-4-t2 suffix.

The default branch also changed after this PR was opened (repatch-amdgpu.sh rewritten on 2026-09-21), so the root-run code can change without an Omarchy review.

Impact: outside the author's machine the build step fails, and a hook left behind can reference a missing executable. Unpinned root execution means users run whatever the companion's main contains at install time.

Suggested change: pin a reviewed companion commit, make prerequisites, kernel-release matching and privilege elevation explicit in the command, and correct the manual. Consider whether a module rebuild is needed at all (next finding).

The linux-t2 package already applies the 6001 patch

The PR says the 6001 patch is in t2linux/linux-t2-patches but "the Arch package does not yet pull it". The linux-t2 PKGBUILD pins T2_PATCH_HASH and prepare() applies every *.patch in that checkout. 6001-drm-amd-pm-Fix-boot-problems-in-5300.patch is present at the pin from 7.1.3-2 onward, including 7.2.6.arch2-1 (the kernel named in #12197) and current 7.2.6.arch2-5. The companion's copy is byte-identical to upstream. A byte scan of amdgpu.ko from official, digest-checked linux-t2 packages agrees:

Package 0xABC9AFBB (LE bb af c9 ab) occurrences
pre-6001 packages (7.1.2-2, 7.1.3-1) 0
7.2.6.arch2-1 stock 1

Impact: the rebuild adds no 6001 code that the stock module lacks. The script's "Verifying patched module" check (count(bbafc9ab) >= 1) passes on an untouched stock module, so it cannot detect a skipped or failed install. The stock-backup check next to it is inverted: it warns for a missing or unpatched backup and stays silent for a patched one, the opposite of its message. This PR does not establish what made amdgpu bind on the author's HW-accel boot (for example, the boot parameters in the companion drop-in, such as amdgpu.modeset=1 and video=efifb:off, are an untested alternative explanation).

Suggested change: compare the stock linux-t2 module booted with the HW-accel parameters against the rebuilt module on the target iMac. If the stock module binds, the opt-in can be a boot-entry change without a module rebuild or third-party clone. If a rebuild is still needed, replace the constant scan with a check that distinguishes the rebuilt module (for example a hash or vermagic comparison) and fix the backup predicate.

Command note: omarchy-install-imac20-amdgpu-hwaccel performs root writes (/opt, /usr/lib, /lib/modules, /etc) without elevating, so as a normal user it stops at the git clone into /opt. Under sudo, Arch's default env_reset removes OMARCHY_PATH, so the source "$OMARCHY_PATH/install/..." line resolves to /install/... and fails. Resolving the script path inside the command and elevating internally would make the documented invocation work.

Test note: test/shell.d/imac20-amdgpu-hwaccel-test.sh fails at this head (not ok - install clones the companion repo). Its first run points OMARCHY_DMI_PRODUCT_NAME at a file created only later, so the detector exits before any call. Even when reordered, the stubs live under $stub_dir/opt/... while the script calls absolute /opt/imac20-amdgpu-patch/... paths, and the stub git would create /opt/imac20-amdgpu-patch on the host and read the host's /proc/cmdline. Adding environment overrides for the install root and the cmdline file (as the migration already has) would let the test run safely.


Review information

Test scope: Source review of both commits, the companion repo (at the commit current when the PR was opened and at current main), limine-entry-tool, the Omarchy ISO installer flow and the linux-t2 package recipe history. Sandboxed runs: both new tests, a simulation of the hardware setup step with stubbed system commands and privately redirected paths, and a byte scan of modules from official linux-t2 packages. No iMac hardware, real boot, companion script execution or full test suite run. The report that the HW-accel boot works on the author's iMac was not independently reproduced.

AI process: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@McoreD

McoreD commented Sep 26, 2026

Copy link
Copy Markdown
Author

Thanks for the thorough review. Here's where things stand, checked on the iMac20,1 this PR was built on (Omarchy 4.0.4, linux-t2 7.2.6.arch2-4, Limine UKIs). I put this together with Claude Code on the machine itself. The PR branch hasn't been updated yet. The changes below are live on the machine and in the companion repo, and the PR will be reworked to match.

1. Hardware setup halts fresh installs: agreed

The run_logged … install-imac20-amdgpu-hwaccel.sh line comes out of install/hardware/all.sh, along with its test assertion. HW accel becomes an explicit post-install command only.

2. No imac20-hwaccel entry is created: agreed, confirmed locally

KERNEL_CMDLINE[imac20-hwaccel] never produced an entry here either. The entry I had been booting was a separately built UKI.

What runs on the machine now, and what the PR will adopt:

  • Limine [default] (and so every snapshot entry) is the safe path: nomodeset modprobe.blacklist=amdgpu.
  • A second UKI with the same cmdline minus those flags, plus amdgpu.modeset=1 video=efifb:off, is registered with limine-entry-tool --add-efi.
  • Both are verified in the generated limine.conf and in each UKI's embedded .cmdline.
  • Promotion becomes default_entry, not a sed on a key that doesn't exist.
  • A pacman hook rebuilds the second UKI after linux-t2 upgrades, because the copy embeds the kernel. If that fails, the hook removes the entry, so the next boot falls back to safe.

3. Companion build is machine-specific and unpinned: agreed

The companion scripts you reviewed are gone (McoreD/imac20-amdgpu-patch f496033, d97d64a). The replacement:

  • targets the newest installed linux-t2 instead of uname -r;
  • builds with .config/Module.symvers from linux-t2-headers;
  • requires make kernelrelease and vermagic to equal the target krel;
  • installs to updates/ instead of overwriting the package's module.

Regardless of point 4, the PR will not clone or run a moving third-party branch as root.

4. linux-t2 already applies 6001: confirmed, but the conclusion isn't settled yet

  • Byte scan of the modules in my pacman cache: linux-t2 7.2.6.arch2-1 and -4 both contain 0xABC9AFBB, and so does my rebuild. You're right that the constant check can't tell them apart, and the backup predicate was inverted.
  • The journal on this machine argues against dropping the rebuild yet:
    • Stock 7.2.4-arch1-3 (which by your pin analysis already had 6001) failed with hw_init of IP block <smu> failed -62 in two boots without nomodeset.
    • Every boot that reached SMU is initialized successfully! loaded the rebuilt module (out-of-tree taint, srcversion E2F71DC4…, vs the package's 3E1046AE…).
    • Stock 7.2.6 with amdgpu.modeset=1 video=efifb:off has never been booted, so your alternative explanation (the boot parameters did it) is still open.
  • To settle it, I've added a non-default Limine entry that boots the HW-accel flags with the package module, overlaid into a copy of the initramfs. I'll post the result.
    • If stock initializes the SMU, the PR becomes a boot-entry-only opt-in with no rebuild or companion repo.
    • If it doesn't, the rebuild stays, pinned and reviewed, with a check that tells rebuilt from stock (srcversion, not the constant).

Command / test notes: agreed

The command will resolve its own path, elevate internally instead of relying on OMARCHY_PATH under sudo, and get install-root/cmdline overrides so the test runs sandboxed. The test gets fixed along with it.

One more correction to the PR description: on this machine, the post-install crash loops I attributed to the GPU path were unrelated. A stale AQ_DRM_DEVICES=/dev/dri/card0 pin (card0 is simpledrm only under nomodeset) caused them, plus a forced-llvmpipe workaround. Neither belongs in the PR.

I'll push the reworked branch after the A/B boot.

The linux-t2 package's own amdgpu brings Navi 14 up on iMac20,1 with
amdgpu.modeset=1 video=efifb:off, so drop the companion-repo clone,
patched module build and install-time run. The opt-in command now
builds a second UKI with those flags, adds it as a Limine entry next
to the safe nomodeset default, and installs a pacman hook that
rebuilds it on linux-t2 upgrades (removing it if the rebuild fails).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@McoreD

McoreD commented Sep 26, 2026

Copy link
Copy Markdown
Author

Updated: no patched module any more

I pushed a99ecf3, which removes the companion repo and the module build from this PR.

Why: on the same iMac20,1 I A/B tested the patched amdgpu against the linux-t2 package's own module (7.2.6.arch2-4), both booted with amdgpu.modeset=1 video=efifb:off. The package module reached the desktop and the patched one did not. The "6001" signature check the old script relied on also matches the stock module, so the package appears to ship that fix already. The machine has been on the stock module since, with:

amdgpu 0000:03:00.0: SMU is initialized successfully!
amdgpu 0000:03:00.0: [drm] Display Core v3.2.384 initialized on DCN 2.0
vulkaninfo: AMD Radeon Graphics (RADV NAVI14), radv

What changed:

  • Removed install/hardware/apple/install-imac20-amdgpu-hwaccel.sh and its all.sh wiring. Nothing clones a repo or builds a kernel module, and nothing runs at install time.
  • omarchy-install-imac20-amdgpu-hwaccel now just builds a second UKI with the flags above and adds it as an imac20-hwaccel Limine entry. The safe nomodeset entry from Keep EFI framebuffer on 2020 5K iMacs with Navi 14 #12203 stays the default.
  • A pacman hook rebuilds the entry on linux-t2 upgrades. If the rebuild fails, the hook removes the entry instead of leaving a stale UKI.
  • --default and --remove flags.
  • Rewrote the manual paragraph and the tests.

Caveats: this is one machine. I haven't isolated whether the fix came from the newer linux-t2 pkgrel or from video=efifb:off. That's why this stays opt-in and #12203 keeps nomodeset as the default. If more iMac20 owners confirm it works, a follow-up could make hardware acceleration the default.

I've updated the PR description to match. https://github.com/McoreD/imac20-amdgpu-patch is no longer needed by this PR.

@llstrk

llstrk commented Sep 27, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Follow-up to the earlier review and the author's update, checked at a99ecf3.

Verified: all four earlier findings and both notes are resolved at this head.

Earlier claim Status at a99ecf3
Fresh installs halt during hardware setup Resolved. install-imac20-amdgpu-hwaccel.sh is deleted, and fix-imac20-display.sh is the only iMac20 step left in all.sh. The test asserts that the HW-accel command stays out of all.sh.
No imac20-hwaccel boot entry Resolved. limine-entry-tool --add-efi registers the copied UKI as its own top-level entry. It has no cmdline: line, so the UKI's embedded command line is used. That command line is linux-t2's full one, with amdgpu.modeset=1 video=efifb:off in place of nomodeset. --default sets a default_entry path that Limine accepts.
Companion build is machine-specific and unpinned Resolved. No clone, module build or companion reference remains.
linux-t2 already applies 6001 Resolved. The rebuild, the constant scan and the inverted backup check are gone. What made amdgpu bind is still open, as the author notes (see the last section).
Command note (no elevation, OMARCHY_PATH under sudo) Resolved. Root writes go through sudo inside the command, and nothing sources $OMARCHY_PATH.
Test note (failing test, host paths) Resolved. imac20-amdgpu-hwaccel-test.sh passes 6/6, and every path goes through the OMARCHY_* overrides into a temp directory. Nine mutants of the command (for example no trap, no set_default, no hook) all fail the test.

The first commit (the #12203 fallback) is unchanged, and imac20-display-test.sh still passes 11/11, including on a local merge with the quattro tip at bf44355.

The reworked command has two new problems, both on its failure and removal paths, plus two smaller notes.

A failed or interrupted second build leaves the default entries on the HW-accel command line

build_entry uses the default UKI as scratch space. limine-mkinitcpio with no arguments rebuilds every installed kernel's UKI and rewrites each entry's cmdline: in limine.conf. So between the first build and the second, the normal "Omarchy" entries boot without nomodeset:

write drop-in: HW-accel flags        trap set: restore drop-in only
limine-mkinitcpio                    default UKIs now HW-accel     <- window opens
cp default UKI -> hwaccel UKI
write drop-in: safe flags            trap cleared (line 59)
limine-mkinitcpio                    default UKIs safe again       <- window closes
limine-entry-tool --add-efi

The EXIT trap only rewrites the drop-in and never rebuilds, and it is cleared before the second full rebuild. Sandboxed runs of the command with stubbed limine-mkinitcpio, limine-entry-tool and objcopy gave:

Case Exit Drop-in Default linux-t2 UKI and its cmdline:
Second build fails 1 safe HW-accel
cp fails 1 safe HW-accel
Ctrl-C, SIGHUP or SIGTERM after the first build 130 / 129 / 143 safe HW-accel
Hook --rebuild, second build fails (after --default) 0 safe HW-accel; the imac20-hwaccel entry is removed
Hook --rebuild, cp fails 0 safe safe; the previous kernel's HW-accel UKI stays registered, with no message

The last row is silent because (build_entry) runs as an if ! condition (line 106), where bash ignores set -e. Only the two explicit command-line checks and the final limine-entry-tool status can fail it. The real limine-mkinitcpio also exits 0 when a per-kernel build fails, so failures reach the command-line check rather than stopping at the build call. Where the first build produces no .cmdline (UKIs disabled, or sbctl together with Snapper, where limine-mkinitcpio-hook builds without one), the first check always fails after the HW-accel flags are already in every entry. Neither is the default on a UEFI Omarchy install.

Impact: on the machines this PR targets, an interrupted opt-in or a failing rebuild during a linux-t2 upgrade can leave the default entries on the unverified HW-accel path, which the safe entry exists to avoid. The hook does remove the HW-accel entry as described, but the next boot does not fall back to safe, because the default entries keep the HW-accel command line.

Suggested change: build the second UKI directly instead of through the default one, as limine-mkinitcpio-install does internally:

  1. Take the last line of limine-entry-tool --get-cmdline linux-t2 (as root; upstream uses | tail -n 1).
  2. Swap nomodeset for the HW-accel flags and write the result to a temp file.
  3. Build with /usr/bin/mkinitcpio --kernel <version> --cmdline <file> --uki <temp>. Use the explicit /usr/bin path: the hook package's /usr/local/bin/mkinitcpio wrapper returns 0 for non-preset calls whatever mkinitcpio did.
  4. Verify the result, move it into place and run --add-efi.

This never touches the default entries and drops the drop-in swap and the second full rebuild. If the current design stays, the trap needs to restore and rebuild, and --rebuild needs an explicit check after each step.

--remove drops Omarchy's default_entry instead of restoring it

Omarchy's /boot/limine.conf comes from default/limine/limine.conf, which has default_entry: 2. --default rewrites that line to default_entry: imac20-hwaccel. remove_entry (line 46) then rewrites it to #default_entry: <OS name>/<kernel name>, so no default is set.

installed         default_entry: 2               -> Omarchy/linux-t2, autoboots
--default         default_entry: imac20-hwaccel
--remove          #default_entry: <OS name>/...  -> unset -> entry 1 = "Omarchy" directory

With default_entry unset (and no LoaderEntryDefault EFI variable or remember_last_entry, which Omarchy does not set), Limine 12.9 selects entry 1. In Omarchy's layout that is the /+Omarchy directory, and a selected directory disables autoboot. This is from Limine's menu.c, a model of that selection applied to the limine.conf from an omarchy-iso fresh install, and a sandboxed run of the command. The run shows default_entry: 2 replaced after --default then --remove, and kept when --remove runs without --default. A failed hook rebuild while the HW-accel entry is the default takes the same path. The test misses this because its fixture starts from limine-entry-tool's own template line (#default_entry: <OS name>/<kernel name>), not Omarchy's default_entry: 2.

Impact: after the documented --default then --remove flow, every boot stops at the Limine menu until limine.conf is edited or omarchy-refresh-limine runs. Meanwhile the command reports "only the safe entry remains".

Suggested change: save the replaced default_entry line when --default runs and restore it on removal, or write default_entry: 2 back. In the test, seed Omarchy's template and assert that default_entry: 2 is kept without --default and comes back after --remove and after a failed rebuild. Seeding alone is not enough: the current assertions still pass on the current behaviour once the #default_entry: check is adjusted.

Smaller notes on the hook and --default

Stale HW-accel UKI: the hook triggers only on the linux-t2 package. The default UKIs are also rebuilt by 90-mkinitcpio-install.hook (firmware, systemd, cryptsetup and similar paths) and by omarchy-hibernation-setup/-remove and omarchy-plymouth-set, none of which refresh the HW-accel copy. With --default, the machine then boots an older initramfs and command line (for example without a new resume=) until the next linux-t2 upgrade or a manual re-run. Suggested change: give the hook the same triggers as 90-mkinitcpio-install.hook, or document that the command should be re-run after those changes. The code comment "limine-mkinitcpio only builds the default UKI" is also inaccurate: without arguments it rebuilds every installed kernel.

Enrolled config: --default and --remove edit limine.conf with sed after limine-entry-tool's post hooks have run. With ENABLE_ENROLL_LIMINE_CONFIG=yes in /etc/default/limine (not an Omarchy default), the enrolled checksum no longer matches and Limine refuses the config. Running limine-enroll-config after the edit, as limine-entry-tool's own hook does, avoids it.

Open question: which change made amdgpu bind

The update says the source of the fix is not isolated. A source reading of Linux 7.2 suggests the two new flags may be inert on this kernel, which would point to the linux-t2 update:

  • amdgpu.modeset is only consulted when nomodeset is set. Without nomodeset, =1 behaves like the default.
  • video=efifb:off is read only by efifb. linux-t2 7.2.6.arch2-4 has CONFIG_SYSFB_SIMPLEFB=y and CONFIG_DRM_SIMPLEDRM=y, so for a simplefb-compatible GOP mode the firmware framebuffer is claimed by simpledrm and efifb never probes.

This is a hypothesis, not tested on hardware, and whether the iMac's GOP mode is simplefb-compatible was not checked. On an HW-accel boot, journalctl -k -b | grep -Ei 'simple-framebuffer|simpledrm|efifb' would show which framebuffer driver ran. One boot with only nomodeset removed would show whether the extra flags matter. If they do not, dropping nomodeset for known-good kernels could replace the second UKI.


Review information

Test scope: Source review of a99ecf3 against the earlier head, limine-entry-tool/limine-mkinitcpio-hook 1.39.0 (the version packaged at PR time; the relevant behaviour is the same in 1.40.0), Limine 12.9.0, omarchy-iso's install flow, pacman hook ordering and Linux 7.2 framebuffer/amdgpu code. Sandboxed runs: both PR tests at the head and on a local merge with quattro, mutants of the HW-accel test, the command with stubbed limine-mkinitcpio, limine-entry-tool and objcopy under success, failure and signal cases, real objcopy on synthetic PE files with a .cmdline section, and a model of Limine's default-entry selection. No iMac hardware, real boot, real limine-mkinitcpio run or Secure Boot setup. The author's hardware results were not reproduced.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
Address review on omacom#12524:

- Build the hardware-acceleration UKI directly with mkinitcpio from the
  safe UKI's cmdline (nomodeset swapped for the amdgpu flags) instead of
  swapping the display drop-in and rebuilding the default UKI twice. A
  failed or interrupted build can no longer leave the Omarchy entries on
  the hardware-acceleration path.
- --default saves the default_entry line it replaces, and --remove (or a
  failed rebuild) puts it back, falling back to Omarchy's
  `default_entry: 2`, so autoboot keeps working.
- Edit limine.conf before limine-entry-tool writes it, so the tool's
  write comes last.
- Also rebuild on mkinitcpio, initcpio, firmware and microcode changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdE7TC6c48x9W7U7MfdU9V
@McoreD

McoreD commented Sep 27, 2026

Copy link
Copy Markdown
Author

Thanks, both critical issues are fixed in 38cba39.

  1. Failed build leaves the default on HW-accel. The second UKI is now built on its own with mkinitcpio -k <linux-t2 vmlinuz> -U <tmp> --cmdline <tmp>, using the safe UKI's cmdline with nomodeset swapped for amdgpu.modeset=1 video=efifb:off. The display drop-in, the safe UKI and the Omarchy entries are never touched, so a failed or interrupted build changes nothing. The UKI is only copied into place once its cmdline checks out.
  2. --remove after --default kills autoboot. --default now saves the default_entry line it replaces and --remove (and a failed --rebuild) puts it back, falling back to default_entry: 2.

Smaller notes:

  • Stale UKI: the hook now also fires on mkinitcpio, usr/lib/initcpio/*, usr/lib/firmware/* and boot/*-ucode.img. A manual limine-mkinitcpio after a drop-in change still needs a rerun of the command, which the manual covers.
  • Enrolled config checksum: limine.conf is now edited before limine-entry-tool writes it, so the tool's write (and its re-enrol, when enabled) comes last.
  • Flags vs newer linux-t2: it is the flags. The same linux-t2 build blanks the panel with the default cmdline and comes up with amdgpu.modeset=1 video=efifb:off.

Tests cover the failed opt-in, failed rebuild and --remove after --default paths.


Generated by [Claude Code](https://claude.ai/code)

@llstrk

llstrk commented Sep 30, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: after a typical linux-t2 upgrade, the hook builds the HW-accel UKI from the old kernel.

Since the earlier review, at 38cba39: failed-build, --remove and enrolled-config fixed; stale UKI partly; flags question closed.

--rebuild uses the old kernel

linux_t2_kernel takes the first linux-t2 pkgbase, but kernel-modules-hook restores the old kernel's directory first. Impact: the HW-accel entry boots the old kernel, whose modules go after one safe boot.

Suggested change: take vmlinuz from pacman -Ql linux-t2.

Reproducer (fails at 38cba39)

Append to test/shell.d/imac20-amdgpu-hwaccel-test.sh (it reuses the file's run, $tmp_dir and $stubs):

# During a linux-t2 upgrade, kernel-modules-hook (in Omarchy's base packages)
# copies the running kernel's module directory, pkgbase and vmlinuz included,
# back into /usr/lib/modules in its 10-linux-modules-post.hook, before the
# zz- hook runs. Only the new directory belongs to the linux-t2 package.
echo "iMac20,1" >"$tmp_dir/product_name"
old_kver=7.2.6-arch2-Watanare-T2-5-t2
new_kver=7.2.7-arch1-Watanare-T2-2-t2
rm -rf "$tmp_dir/modules"
for kver in "$old_kver" "$new_kver"; do
  mkdir -p "$tmp_dir/modules/$kver"
  echo linux-t2 >"$tmp_dir/modules/$kver/pkgbase"
  : >"$tmp_dir/modules/$kver/vmlinuz"
  : >"$tmp_dir/modules/$kver/modules.builtin"
done
cat >"$stubs/pacman" <<SH
#!/bin/bash
# linux-t2 owns only the upgraded kernel's directory.
case \$1 in
  -Ql) printf 'linux-t2 %s\n' "$tmp_dir/modules/$new_kver/"{pkgbase,vmlinuz,modules.builtin} ;;
  -Qqo) [[ \$2 == "$tmp_dir/modules/$new_kver/"* ]] && echo linux-t2 || exit 1 ;;
esac
SH
chmod +x "$stubs/pacman"

run || fail "opt-in succeeds after a linux-t2 upgrade" "$(cat "$tmp_dir/out.log")"
: >"$tmp_dir/calls.log"
run --rebuild || fail "--rebuild succeeds after a linux-t2 upgrade"
grep -Fq "mkinitcpio -k $tmp_dir/modules/$new_kver/vmlinuz " "$tmp_dir/calls.log" ||
  fail "rebuild after a linux-t2 upgrade builds the upgraded kernel" "$(grep '^mkinitcpio' "$tmp_dir/calls.log")"
pass "rebuild after a linux-t2 upgrade builds the upgraded kernel"

Output at 38cba39:

ok - iMac20 hardware acceleration is an opt-in command
ok - opt-in adds a hardware-acceleration entry next to the safe default
ok - --default makes the hardware-acceleration entry the default
ok - failed rebuild falls back to the safe entry
ok - failed opt-in leaves the safe boot path alone
ok - --remove drops the entry and the hook
ok - other hardware is left alone
mkinitcpio -k /tmp/tmp.KfuAyo3Eb5/modules/7.2.6-arch2-Watanare-T2-5-t2/vmlinuz -U /tmp/tmp.6nsnLLgzI4/hwaccel.efi --cmdline /tmp/tmp.6nsnLLgzI4/cmdline
not ok - rebuild after a linux-t2 upgrade builds the upgraded kernel

With linux_t2_kernel reading the linux-t2 package's file list instead (below), and a pacman stub added to the file's existing single-kernel setup ([[ $1 == -Ql ]] && printf 'linux-t2 %s\n' "$tmp_dir/modules/6.18.1-arch1-Watanare-T2-1-t2/vmlinuz"), the whole file passes:

linux_t2_kernel() {
  local _ path
  while read -r _ path; do
    [[ $path == "$MODULES_DIR"/*/vmlinuz ]] && { echo "$path"; return 0; }
  done < <(pacman -Ql linux-t2 2>/dev/null)
  return 1
}
ok - iMac20 hardware acceleration is an opt-in command
ok - opt-in adds a hardware-acceleration entry next to the safe default
ok - --default makes the hardware-acceleration entry the default
ok - failed rebuild falls back to the safe entry
ok - failed opt-in leaves the safe boot path alone
ok - --remove drops the entry and the hook
ok - other hardware is left alone
ok - rebuild after a linux-t2 upgrade builds the upgraded kernel

mkinitcpio failures go undetected

sudo mkinitcpio runs the hook package's /usr/local/bin wrapper, which exits 0 for non-preset calls. Impact: a UKI that mkinitcpio reports as failed is installed and kept by --rebuild.

Suggested change: call /usr/bin/mkinitcpio.

Reproducer (fails at 38cba39)

On an Omarchy system with limine-mkinitcpio-hook, mkinitcpio resolves to the hook package's /usr/local/bin/mkinitcpio. This script runs the same failing call through the real binary and through the wrapper. It was run in a read-only sandbox on an Omarchy host with mkinitcpio 41.1, whose wrapper differs from the 1.40.0 file only in how the preset warning is printed (echo -e instead of printf). data/limine-1.40.0-usr-local-bin-mkinitcpio is install/arch-linux/limine-mkinitcpio-hook/usr/local/bin/mkinitcpio from limine-entry-tool tag 1.40.0.

#!/bin/bash
# Exit status of the installed mkinitcpio and of limine-mkinitcpio-hook's
# /usr/local/bin/mkinitcpio wrapper for the same failing non-preset call.
# The kernel path does not exist, so mkinitcpio stops before reading any
# configuration or writing anything; the sandbox root is read-only.
set -uo pipefail
out=$(mktemp -d)
mkdir -p "$out"
here=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
tmp=$(mktemp -d)
echo "quiet nomodeset" >"$tmp/cmdline"

{
  for f in /usr/bin/mkinitcpio /usr/local/bin/mkinitcpio; do
    if [[ -f $f ]]; then echo "present: $f"; else echo "missing: $f"; fi
  done
  if [[ -f /usr/local/bin/mkinitcpio ]]; then
    echo "wrapper sha256: $(sha256sum </usr/local/bin/mkinitcpio | cut -d' ' -f1)"
    echo "upstream 1.40.0 sha256: $(sha256sum <"$here/data/limine-1.40.0-usr-local-bin-mkinitcpio" | cut -d' ' -f1)"
    cmp -s /usr/local/bin/mkinitcpio "$here/data/limine-1.40.0-usr-local-bin-mkinitcpio" && echo "installed wrapper == upstream 1.40.0 file" || echo "installed wrapper differs from upstream 1.40.0 file"
  fi
  if [[ -x /usr/bin/mkinitcpio ]]; then
    echo "mkinitcpio version: $(/usr/bin/mkinitcpio --version 2>&1 | head -n1)"
    /usr/bin/mkinitcpio -k /nonexistent/vmlinuz -U "$tmp/hwaccel.efi" --cmdline "$tmp/cmdline" >"$out/direct.stdout" 2>"$out/direct.stderr"
    echo "/usr/bin/mkinitcpio exit: $?"
    echo "  stderr: $(tr '\n' ' ' <"$out/direct.stderr")"
  fi
  if [[ -x /usr/local/bin/mkinitcpio ]]; then
    /usr/local/bin/mkinitcpio -k /nonexistent/vmlinuz -U "$tmp/hwaccel.efi" --cmdline "$tmp/cmdline" >"$out/wrapper.stdout" 2>"$out/wrapper.stderr"
    echo "/usr/local/bin/mkinitcpio exit: $?"
    echo "  stderr: $(tr '\n' ' ' <"$out/wrapper.stderr")"
    PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
    echo "mkinitcpio resolved with Arch's default PATH: $(type -P mkinitcpio)"
  fi
  echo "UKI written: $([[ -e $tmp/hwaccel.efi ]] && echo yes || echo no)"
} 2>&1 | tee "$out/report.txt"
rm -rf "$tmp"

Output:

present: /usr/bin/mkinitcpio
present: /usr/local/bin/mkinitcpio
wrapper sha256: dbf8a01b8a5741c3b76ce539805b4c9892ca7dd18138d2e7f18390fd5b4b54f8
upstream 1.40.0 sha256: 44dc8ad53bfa348d0ccef6907cafaf8b79726f4630a9def9fd15d602be9f2025
installed wrapper differs from upstream 1.40.0 file
mkinitcpio version: mkinitcpio "41.1"
/usr/bin/mkinitcpio exit: 1
  stderr: ==> ERROR: Invalid option -k -- '/nonexistent/vmlinuz' must be readable 
/usr/local/bin/mkinitcpio exit: 0
  stderr: ==> ERROR: Invalid option -k -- '/nonexistent/vmlinuz' must be readable 
mkinitcpio resolved with Arch's default PATH: /usr/local/bin/mkinitcpio
UKI written: no

Test case, appended to test/shell.d/imac20-amdgpu-hwaccel-test.sh. The mkinitcpio stub on PATH behaves like the wrapper; the usr-bin-mkinitcpio stub behaves like mkinitcpio when a MODULES entry or hook fails: it writes the UKI, warns, and exits 1.

echo "iMac20,1" >"$tmp_dir/product_name"
rm -f "$tmp_dir/uki/omarchy_linux-t2-hwaccel.efi"
cat >"$stubs/usr-bin-mkinitcpio" <<'SH'
#!/bin/bash
while (( $# )); do
  case $1 in
    -U | --uki) uki=$2; shift ;;
    --cmdline) cmdline=$2; shift ;;
  esac
  shift
done
cat "$cmdline" >"$uki"
echo "==> WARNING: errors were encountered during the build. The image may not be complete." >&2
exit 1
SH
cat >"$stubs/mkinitcpio" <<SH
#!/bin/bash
"$stubs/usr-bin-mkinitcpio" "\$@"
if [[ " \$* " == *" -P "* || " \$* " == *" -p "* ]]; then
  echo "(preset call: would offer to run limine-mkinitcpio)" >&2
fi
SH
chmod +x "$stubs/usr-bin-mkinitcpio" "$stubs/mkinitcpio"

OMARCHY_MKINITCPIO="$stubs/usr-bin-mkinitcpio" run &&
  fail "a build that mkinitcpio reports as failed stops the opt-in" "$(cat "$tmp_dir/out.log")"
[[ ! -e $tmp_dir/uki/omarchy_linux-t2-hwaccel.efi ]] ||
  fail "a build that mkinitcpio reports as failed adds no UKI"
pass "a build that mkinitcpio reports as failed stops the opt-in"

Output at 38cba39 (after the file's seven existing ok lines):

==> WARNING: errors were encountered during the build. The image may not be complete.
Added the 'imac20-hwaccel' Limine entry.
Reboot and pick it from the Limine menu. The Omarchy entry stays the safe default.
Once it works, make it the default with: omarchy-install-imac20-amdgpu-hwaccel --default
not ok - a build that mkinitcpio reports as failed stops the opt-in

With the build call changed to sudo "${OMARCHY_MKINITCPIO:-/usr/bin/mkinitcpio}" -k ... and OMARCHY_MKINITCPIO="${OMARCHY_MKINITCPIO:-$stubs/mkinitcpio}" added to the file's run helper, all eight checks pass.

Details

Verified:

  • The safe UKI, the display drop-in and the Omarchy entries are never rebuilt; interrupted and failed builds leave them unchanged.
  • --default then --remove restores default_entry: 2 exactly; a failed --rebuild restores it too.
  • Every limine.conf edit is followed by a limine-entry-tool call, whose post hook re-enrolls the checksum when enrollment is enabled.
  • imac20-amdgpu-hwaccel-test.sh passes 7/7 and imac20-display-test.sh 11/11, also merged with quattro.

Stale UKI (partly resolved): the new triggers cover pacman upgrades of mkinitcpio, initcpio, firmware, extramodules and microcode. omarchy-hibernation-setup/-remove, migrations and a manual limine-mkinitcpio still rebuild only the default UKIs, and the manual has no sentence about rerunning the command. 90-mkinitcpio-install.hook also triggers on systemd, cryptsetup, lvm and dkms paths. Suggested: one manual sentence to rerun omarchy-install-imac20-amdgpu-hwaccel after those.

Flags question: the entry uses the flags the author reports testing. In mainline 7.2, amdgpu.modeset=1 does nothing without nomodeset; whether video=efifb:off matters depends on the iMac's GOP mode. The HW-accel line also keeps plymouth.enable=0, which may differ from the boot that blanked.

Optional notes:

  • The test "limine-entry-tool writes limine.conf after the default_entry edit" passes with the second register_entry deleted, because sed is not logged. A sed stub that logs would make it effective.
  • The hook has no Operation = Remove for linux-t2, so after removing that kernel with --default set, the HW-accel entry stays the default until the next rebuild.
  • Open docs: add 2020 iMac models to the T2 Mac list #10783 also adds an A2115 row to the Mac manual (different wording and place); merging both would list it twice.

Review information

Test scope: Source and sandboxed tests at 38cba39; no hardware, real pacman transaction or boot.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

McoreD and others added 2 commits October 2, 2026 04:16
The rebuild was skipped when /proc/cmdline already had plymouth.enable=0
and nomodeset. Users hit by omacom#12197 type exactly those flags into the
Limine editor, so if limine-mkinitcpio failed on the first run, the retry
completed without rebuilding and the next unedited boot was black again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stock linux-t2 amdgpu failed SMU init on 2 of 4 boots with the
hardware-acceleration flags on the iMac20,1 (t2linux 6001 enables UCLK
DPM during init, t2linux/wiki#743), so an entry that boots it is not
reliable. What works needs an amdgpu rebuilt with the deferred-UCLK fix,
which does not belong in Omarchy. Drop the opt-in command and its test,
and document the companion tooling in the Mac support manual instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@McoreD McoreD changed the title feat: opt-in HW acceleration for 2020 5K iMacs (Navi 14) docs: point 2020 5K iMac hardware acceleration at the companion tooling Oct 1, 2026
@McoreD

McoreD commented Oct 1, 2026

Copy link
Copy Markdown
Author

Thanks for the follow-up review. The old-kernel --rebuild bug is gone, because the command is gone: as of b6ef500 this PR is docs only. The new PR description explains why.

Correction to my 2026-09-27 comment. I wrote "it is the flags", meaning the stock linux-t2 amdgpu comes up with amdgpu.modeset=1 video=efifb:off. That was wrong. The iMac20,1's journal shows the package module (7.2.6.arch2-4) failed SMU init on 2 of 4 boots with those exact flags. The failure was SMU: No response msg_reg: 6, hw_init of IP block <smu> failed -62, on back-to-back boots on 2026-09-27.

Message 6 is EnableAllSmuFeatures. t2linux/wiki#743 bisected the 5300 hang to UCLK DPM being in that request, and 6001's hardcoded mask includes it. The current 7.2.7.arch1-1 package module still has that mask and no fix. So a boot entry that uses the stock module isn't reliable, whatever the flags.

What does work, on 3 of 3 boots so far, is the same flags with an amdgpu.ko rebuilt with the deferred-UCLK patch from wiki#743 in place of 6001. That's a kernel-module rebuild, which doesn't belong in Omarchy. So this PR now drops the command and its test and documents the community tooling instead: https://github.com/McoreD/imac20-amdgpu-patch. Its tool picks the newest installed linux-t2 release (sort -V), so the restored-old-kernel case from your reproducer doesn't affect it.

Tests: ./test/cli and imac20-display-test.sh pass.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Adds hardware detection and boot configuration for a specific Mac model.

The PR appears safe to merge; no outstanding finding or new actionable issue was identified.

Summary

This PR keeps the 2020 5K iMac boot workaround and documents why its safe kernel flags remain necessary. It points users seeking GPU acceleration to separate community tooling rather than adding an Omarchy acceleration command.

Reviews (5) · Last reviewed commit: "Merge fix/imac20-navi14-luks-display (#1..."

Comment thread migrations/1789574960.sh Resolved
McoreD and others added 7 commits October 2, 2026 05:13
limine-mkinitcpio exits 0 when it skips a kernel whose build failed, so
the migration could record the repair while the linux-t2 entry still
lacked plymouth.enable=0 nomodeset, and later runs would skip it. Check
the linux-t2 entry's cmdline in limine.conf after the rebuild and exit
non-zero, leaving the migration pending, when the flags are missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading the cmdline: line after the entry's path: in limine.conf assumed
a layout limine-entry-tool doesn't guarantee, and could reject a good
rebuild and block later migrations. Read the .cmdline section of the
linux-t2 UKI with objcopy instead, as omarchy-upgrade-to-quattro does,
and fail only when a UKI lacks the flags or none exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@McoreD

McoreD commented Oct 2, 2026

Copy link
Copy Markdown
Author

For reviewers: the 4/5 in Greptile's latest summary comes from the Grok update fallback. That code isn't part of this PR. It arrived in the incremental range Greptile reviewed because upstream quattro was merged in, and it's upstream's f45461a (#13992).
This PR's diff against quattro is still only the iMac20 files: bin/omarchy-hw-imac20-navi14, install/hardware/all.sh, install/hardware/apple/fix-imac20-display.sh, manual/44-mac-support.md, migrations/1789574960.sh, test/shell.d/imac20-display-test.sh. The finding belongs with #13992.

@greptile-apps

greptile-apps Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@earlvanze

earlvanze commented Oct 11, 2026 •

Copy link
Copy Markdown

Sharing a tested result for the other Apple GPU variant: 1002:7340 / 106b:0218, revision 41, iMac20,1.

The exact working patch, pinned source inputs/checksums, source-preparation helper, build/UKI staging steps, verification and recovery notes are now public:

https://gist.github.com/earlvanze/be879691a3977660154ebde3df00dfaa

This adapts the Atharva Tiwari / Ed Schofield v4 delayed-UCLK proposal to linux-t2 7.2.6.arch2-4, narrowly matching 0218 rev 41. It leaves the existing T2 6001 workaround for 0219 unchanged. Simply extending that older patch's device match to 0218 is not the fix. Credit for the delayed-UCLK approach belongs to the upstream authors and Guna's earlier diagnosis.

On this machine:

  • A stock boot reproduced the SMU message 6 timeout / DPM enable failure / -62; successful live module reload had not made subsequent boots reliable.
  • The patched module passed one warm reboot and one complete power-off/on, with its loaded srcversion checked after boot.
  • Hyprland ran on the internal display at 3840×2160, ~60 Hz. UCLK DPM and memory-voltage scaling remained enabled, with 98 MHz idle memory clocks. A 30-second 1080p60 VA-API H.264 encode completed.
  • Two startup sdma0 fence-fallback warnings remain. Native 5K, repeated suspend/resume cycles, long-term load and future kernels are unverified.

Persistence uses an updates/ module override plus a separate patched UKI, preserving the stock module/UKI. The runbook explains the temporary kernel/header hold and its security-update tradeoff, how to verify the actual loaded module and boot selection, and recovery when the stock accelerated entry also fails.

The separate companion-tooling hardware guard PR prevents installing the existing 0219 payload on unsupported hardware; it does not itself ship this 0218 driver fix. The source helper was also checked against fresh source extracts and reproduced the exact patched source used for the tested build.

Follow-up: One deep/S3 suspend/resume cycle also passed: same boot and Hyprland process, operator-confirmed working desktop after unlock, and a successful post-resume 10-second VA-API encode. Memory clocks returned to 98 MHz idle. Resume logged AMDGPU power-state, PCIe/xHCI and Broadcom P2P warnings/errors, detailed in the runbook; this is a functional single-cycle result. Hyprland still reports 3840×2160, with no 5120×2880 mode listed.

Fan-control follow-up (iMac20,1): The functional suspend result above does not mean every resume behavior is resolved. Several hours after that cycle, the chassis fan was at ~3,600 RPM with t2fanrd r16.48baf96-1 running but Apple SMC fan1_manual=0. Restarting t2fanrd restored fan1_manual=1 and variable speeds, including ~2,300 RPM. Loss of control during resume is suspected, not proven: we did not sample that flag across the sleep boundary. A local post-resume restart unit passed systemd validation and a manual start; its automatic execution across another sleep/wake cycle is still untested. Unit contents are in the linked field report.

A separate source of noise remained after restoring control: /etc/t2fand.conf had a linear 55–75°C curve, so the daemon correctly requested full speed during a Rust build plus background synchronization at CPU package temperatures of 75–78°C. GPU temperature was only ~40°C at ~4 W. We locally tried a 55–82°C exponential curve; the next 30-second sample showed ~2,200–2,750 RPM, CPU package 73–82°C, and a final sample of 74°C. The daemon uses averaged temperatures. This is preliminary tuning on one machine, not a proposed universal default or a validated long-term thermal profile.

Potential Omarchy follow-ups: reproduce SMC fan-control ownership across suspend/resume on T2 Macs, and review whether fan defaults should distinguish desktop iMacs from other T2 models. The AMDGPU patch and acoustic tuning should remain separate changes.

@jandrusk

Copy link
Copy Markdown

Description says this is now docs-only, but the diff still ships bin/omarchy-hw-imac20-navi14, install/hardware/apple/fix-imac20-display.sh, and migrations/1789574960.sh. Either trim those to match the docs-only claim, or update the summary so reviewers know the install/migration path is still intentional.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! and removed enhancement New feature or request labels Oct 14, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 9240f48 against quattro, by reading the diff and comparing it with #12203. No code ran: what this pull request ships is #12203's fix, which is reviewed as its own item.

What this lands. The description says docs only, but the diff against quattro still carries #12203's detector, installer step, migration and test, because #12203 is merged into this branch. Its own change is the paragraph in manual/44-mac-support.md. Everything else is a copy of #12203, and the copy is older than #12203's current head.

What the copy is missing. #12203's 4bfea61 changed migrations/1789574960.sh to check only omarchy_linux-t2.efi, and added a test for it. This branch still checks every *linux-t2.efi. On an install upgraded from before quattro, a leftover <machine-id>_linux-t2.efi without the flags makes the migration exit 1 even when the image that boots was rebuilt correctly, and omarchy-migrate then stops before any later migration. If #12203 merges first, a normal merge of this branch keeps #12203's version, so nothing gets reverted. If this merges instead of #12203, the bug ships.

Which one carries the fix. #12203 is older and has the correction, so it is the one being brought forward for this bug. This pull request will not be marked ready while it carries its own copy.

The manual paragraph. The parts about this repository are accurate at this head: the installer writes plymouth.enable=0 nomodeset to /etc/limine-entry-tool.d/imac20-display.conf on iMac20 with Navi 14, and the paragraph no longer names the removed omarchy-install-imac20-amdgpu-hwaccel command. The UCLK mechanism and what the companion tooling does are claims about outside projects and could not be checked from here. Whether the manual should point users at community tooling that rebuilds amdgpu is the maintainer's decision.

Codex Medium gave the second opinion and found the same thing: identical workaround, #12203 ahead on the migration, nothing inaccurate in the repository claims. Its independence from this review is not guaranteed, so treat that as agreement rather than a separate finding. This is now waiting on the maintainer to decide #12203 and the manual paragraph. Once #12203 lands, this branch can drop down to just the manual change, either by merging quattro back in or by starting again from quattro.

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!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T2 iMac20,1 (2020 5K, Radeon Pro 5300): amdgpu SMU init fails; Plymouth/KMS black screen before LUKS

5 participants