Skip to content

Keep EFI framebuffer on 2020 5K iMacs with Navi 14 - #12203

Open
McoreD wants to merge 9 commits into
omacom:quattrofrom
McoreD:fix/imac20-navi14-luks-display
Open

McoreD wants to merge 9 commits into
omacom:quattrofrom
McoreD:fix/imac20-navi14-luks-display

Conversation

@McoreD

@McoreD McoreD commented Sep 16, 2026 •

Copy link
Copy Markdown

Summary

The T2 installer path gives a 2020 27-inch iMac a kernel, keyboard, Wi-Fi, audio, and fans, then leaves the 5K AMD panel to stock Plymouth + kms. On iMac20,1 / iMac20,2 with Radeon Pro 5300/5500 (Navi 14, 1002:7340), amdgpu takes over the EFI framebuffer and SMU init fails (hw_init of IP block <smu> failed -62). The LUKS prompt is invisible.

This follows the existing hardware-quirk pattern (see install/hardware/asus/fix-asus-ptl-b9406-display.sh):

  • Detect only iMac20, and Navi 14 display class 1002:7340. MacBookPro16,1 also uses that GPU as a dGPU, so the GPU ID alone is not enough.
  • Persist plymouth.enable=0 nomodeset in /etc/limine-entry-tool.d/imac20-display.conf so Limine regenerates keep a working EFI simple-framebuffer through unlock.
  • Migrate existing quattro installs the same way.
  • Document iMac20,1 / iMac20,2 on the Mac support T2 list.

nomodeset is a last-resort that reaches a desktop without GPU acceleration. A later amdgpu SMU fix can drop it. Navi 10 5700/5700 XT parts are left alone.

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

Every boot from 2026-09-16 to 2026-10-02, taken from journalctl -k on the machine (rebuilt modules identified by the out-of-tree taint):

amdgpu Cmdline Boots SMU init failed (msg_reg: 6, -62)
linux-t2 package 7.2.4, stock Omarchy cmdline quiet splash, Plymouth, kms 2 2: black LUKS prompt (#12197)
linux-t2 package 7.2.6.arch2-4 (6001) plymouth.enable=0 amdgpu.modeset=1 video=efifb:off 4 2, back to back on 2026-09-27
Rebuilt from vanilla 7.2.6 + 6001 (same mask as the package) same 6 0
Rebuilt with the deferred-UCLK patch instead of 6001 (t2linux/wiki#743), 7.2.6 then 7.2.7 same 3 (4 days of daily use) 0, DPM_UCLK enabled after init
any plymouth.enable=0 nomodeset (this PR) 12 n/a: simpledrm desktop, no acceleration
  • Hardware acceleration works on this machine today with the third row: plymouth.enable=0 amdgpu.modeset=1 video=efifb:off plus an amdgpu.ko rebuilt from vanilla source with the deferred-UCLK patch, which replaces t2linux 6001. That needs a module rebuild, which Omarchy can't ship. It lives in https://github.com/McoreD/imac20-amdgpu-patch.
  • 6001 modules fail intermittently because 6001 still enables UCLK DPM inside EnableAllSmuFeatures. wiki#743 bisected the hang to that bit. Six clean boots on the rebuilt 6001 module don't contradict this; the samples are small. The current linux-t2 7.2.7.arch1-1 module still has 6001's mask and not the deferred-UCLK fix, so it can fail the same way.
  • The flags don't affect the failing step. Boots that passed and boots that failed are identical up to EnableAllSmuFeatures.
    With Omarchy's kms hook ahead of encrypt, amdgpu takes over the framebuffer about 3.7 s into boot, before the passphrase prompt. So on the package module, a failure blanks LUKS whatever Plymouth is set to.

That is why this PR keeps nomodeset as the default. Once linux-t2 ships the deferred-UCLK fix, the drop-in can switch to plymouth.enable=0 video=efifb:off and keep acceleration.

Fixes #12197

Test plan

  • bash test/shell.d/imac20-display-test.sh
  • bash test/shell.d/t2-hardware-test.sh
  • ./test/cli (metadata includes omarchy-hw-imac20-navi14)
  • On iMac20,1 with Radeon Pro 5300: with plymouth.enable=0 nomodeset, LUKS is visible and Hyprland starts on simpledrm (12 boots, table above)
  • On iMac20,1: the migration itself on a fresh install. This machine got the same flags from local tooling, not from this migration.
  • Confirm a T2 MacBook Pro with Navi 14 is not given nomodeset

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
McoreD added a commit to McoreD/imac20-amdgpu-patch that referenced this pull request Sep 19, 2026
README.md rewritten to explain the intent of the patch, the hardware
signature it targets, the pairing with omacom/omarchy#12203, the quick
start, verification, and rollback procedures.

AGENTS.md added so any AI coding agent that opens this repo understands
the layout, the critical invariants (vermagic match, magic constants,
LOCALVERSION, strip before install, backup before overwrite, safe Limine
entry stays default), and what NOT to do (no upstream pushes, no direct
/boot/limine.conf edits, no pacman -Syu without verifying the patch
survives).
@McoreD

McoreD commented Sep 19, 2026

Copy link
Copy Markdown
Author

Companion repo for opt-in HW acceleration

This PR correctly defers the Navi 14 SMU bug to nomodeset and ships the user to a working desktop. For anyone who wants the full hardware-accelerated path, there's now a companion repo that ships the patched amdgpu.ko (with the t2linux 6001 SMU fix compiled in) plus the install / build / pacman-hook / Limine hwaccel-entry scripts:

https://github.com/McoreD/imac20-amdgpu-patch

It targets the exact hardware signature this PR detects (1002:7340, 106b:0219) and pairs cleanly with the safe-fallback path this PR adds — that path is what makes the install robust enough to even consider turning the patched module on.

Verified on the iMac20,1 used to develop this:

$ lsmod | grep amdgpu
amdgpu              17944576  36        # was 0 before the patch

$ vulkaninfo --summary
GPU0: AMD Radeon Graphics (RADV NAVI14)   # was no devices before

$ mpv --vo=gpu file.mp4
VO: [gpu] 3840x2160 yuv420p                # was [wlshm] (software) before

The repo has the same review-brief structure (AGENTS.md + reviews/) that this PR demonstrates, so anyone scanning it will land in the same shape. Recommend linking it from manual/44-mac-support.md as the "if you want the GPU working" next step after this PR's safe fallback lands — happy to draft that follow-up.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by Claude Opus 5.5 at 91fc171 against quattro, with Codex at medium effort as a second opinion.

What ran: ./test/cli, test/shell.d/imac20-display-test.sh and test/shell.d/t2-hardware-test.sh all pass on a clean Omarchy worker VM. The SMU failure itself can't be reproduced on a VM, so nothing here confirms the fix on an iMac. The detector, install leaf and migration follow the existing T2 pattern and read correctly for iMac20,1 and iMac20,2 with 1002:7340, MacBookPro16,1, Navi 10 and the Navi 14 HDMI audio function.

The open question is whether nomodeset is still needed. This adds nomodeset to the default entry on every matching iMac, permanently, so every one of them runs without GPU acceleration on every future kernel. Your follow-up #12524 reports that on linux-t2 7.2.6.arch2-4 the stock amdgpu initializes the SMU and RADV works with plymouth.enable=0 amdgpu.modeset=1 video=efifb:off. If that holds, the failure in #12197 (on 7.2.6-arch2-Watanare-T2-1-t2) may be fixed in the current linux-t2, or avoided by flags that keep acceleration. Codex agreed. Its independence isn't guaranteed, though, because it was shown the question as framed here.

Could you say, on the current linux-t2 package and with no hand-typed flags, which of these happens on your iMac20,1 across a few cold boots:

  1. The stock command line: does the LUKS prompt still disappear with the SMU -62 error?
  2. plymouth.enable=0 alone, and plymouth.enable=0 video=efifb:off: is the LUKS prompt visible, and does amdgpu bind?

If the stock kernel now works, the smaller change is the flags that keep acceleration, or none at all. If it still fails, nomodeset stays the fallback. #10169 is also relevant: it hits the same SMU -62 on the iMac20,2's Navi 10 (1002:7319), and works around it with amdgpu.ppfeaturemask instead of disabling KMS. It targets different hardware, so it doesn't compete with this PR, but its body cites a t2linux report that isolates the same early DPM_UCLK enablement on the Radeon Pro 5300.

One smaller finding in the migration, migrations/1789574960.sh:27-32: the rebuild is skipped when /proc/cmdline already carries both flags. The people this migration exists for are booting with exactly those flags typed into the Limine editor, as #12197 describes. If the first run writes the drop-in and limine-mkinitcpio then fails, the retry sees the drop-in and the hand-typed flags, skips the rebuild, and completes. The next boot without typing them is black again. Rebuilding whenever the marker is missing, whatever the running command line says, closes that gap at the cost of one redundant rebuild on fresh installs. Codex raised this one, and I confirmed it against the source.

This is waiting on you for the answers above. The maintainer decides whether to merge.

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>
@McoreD

McoreD commented Oct 1, 2026

Copy link
Copy Markdown
Author

Thanks for the review. Below are the answers from the iMac20,1 (106b:0219) this was built on, using every boot in its journal (2026-09-16 to 2026-10-02). The full table is now in the PR description.

Is nomodeset still needed? For stock Omarchy, yes. My claim in #12524 that the stock amdgpu works was wrong. It was based on two good boots.

Your questions 1 and 2:

  1. Stock cmdline: both boots on the package module failed with -62, and the LUKS prompt went black. I haven't repeated that on 7.2.7. The failing code is unchanged there.
  2. plymouth.enable=0 with video=efifb:off: the flags don't reach the failing step. Passing and failing boots are identical up to EnableAllSmuFeatures. With Omarchy's HOOKS=(... kms ... encrypt ...), amdgpu modesets about 3.7 s into boot (kernel timestamps), before the passphrase prompt at 13–45 s. When SMU init fails there, the EFI framebuffer is already gone, so LUKS is blank whatever Plymouth is set to. I didn't test plymouth.enable=0 alone separately. Without nomodeset, amdgpu.modeset already defaults to on, so that's effectively the same set.

What gives hardware acceleration here: the same flags, plus an amdgpu.ko rebuilt with the deferred-UCLK patch from wiki#743 in place of 6001. UCLK is left out at init and enabled in smu_late_init.
It passed 3 of 3 boots across four days of daily use, including the boot straight after the two failures and the 7.2.7 upgrade, rebuilt automatically by a pacman hook. DPM_UCLK is enabled and RADV is on Navi 14.
That needs a kernel module rebuild, which doesn't belong in Omarchy, so it lives in https://github.com/McoreD/imac20-amdgpu-patch. Once linux-t2 carries the fix, this drop-in can change from nomodeset to plymouth.enable=0 video=efifb:off.

Migration: fixed in 27ff7db. The rebuild now runs whenever the repair marker is missing, whatever the running cmdline says, so a retry after a failed limine-mkinitcpio can't be skipped because of flags typed into the Limine editor. The /proc/cmdline check is gone, and the retry test covers it. imac20-display-test.sh, t2-hardware-test.sh and ./test/cli pass.

One limit: this machine got its safe flags from my local tooling, not from this migration, so the on-hardware migration test is still unchecked in the test plan.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 3/5

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

The PR does not appear safe to merge until the Codex credential check and Grok limit freshness are corrected.

Summary

The PR adds an iMac20 Navi 14 boot workaround and migration. Since the previous review, upstream merges also brought changes to agent-usage collectors and the agents panel.

  • The iMac migration now checks the rebuilt linux-t2 UKI’s embedded command line before recording completion.
  • The merged collector changes add incremental scans, credential handling, and provider-specific usage reporting.

Reviews (6) · Last reviewed commit: "Merge upstream quattro"

Comment thread migrations/1789574960.sh Resolved
@McoreD

McoreD commented Oct 1, 2026

Copy link
Copy Markdown
Author

A question for the maintainers about where the real fix should live.

Today fix-t2.sh puts T2 Macs on linux-t2, so the amdgpu fix for these iMacs has to come from t2linux/linux-t2-patches. That's stalled:

linux-omarchy (omacom/omarchy-pkgs) already carries targeted hardware quirks, including applesmc and amdgpu display fixes. Two questions:

  1. Is there any plan to move T2 Macs onto linux-omarchy, with the T2 patch set (t2bce, apple-bce successors and the rest) folded in, instead of linux-t2?
  2. If so, or if linux-omarchy is ever an option for these iMacs: would you carry a narrow amdgpu patch matched on 1002:7340 / 106b:0219 (and 0218)? It would leave UCLK DPM out of EnableAllSmuFeatures and enable it after init, replacing linux-t2's 6001. On this machine it took SMU init from 2 failures in 4 boots on the stock module to 3 of 3 clean so far, with full memory clocks.
    With that, Keep EFI framebuffer on 2020 5K iMacs with Navi 14 #12203's drop-in could become plymouth.enable=0 video=efifb:off, and these iMacs would boot with hardware acceleration out of the box instead of nomodeset.

If neither is on the table, #12203 as it stands (safe nomodeset) is the right default until linux-t2 or upstream picks up a fix.

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>
Comment thread migrations/1789574960.sh Resolved
McoreD and others added 2 commits October 2, 2026 05:28
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 added a commit to McoreD/omarchy that referenced this pull request Oct 1, 2026
McoreD added a commit to McoreD/omarchy that referenced this pull request Oct 1, 2026
McoreD added a commit to McoreD/omarchy that referenced this pull request Oct 2, 2026
@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 migration that can remove a separately installed agent command. That's upstream's 821ae58 (#14004), which came in when quattro was merged into this branch. It isn't part of this PR.
Greptile's own summary also notes that the iMac threads are resolved. This PR's diff against quattro is still only the six iMac20 files, and the Grok finding belongs with #14004.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for the answers and the table. Read by Claude Opus 5.5 at f09091e; no second opinion ran on this head, because the reviewer's daily allowance (Codex Medium) was already spent.

The migration finding is fixed. In migrations/1789574960.sh the rebuild now runs whenever the repair marker is missing, whatever /proc/cmdline says, and the marker is written only after every *linux-t2.efi UKI's embedded .cmdline carries both plymouth.enable=0 and nomodeset. A retry after a failed limine-mkinitcpio can no longer be skipped. That was checked by reading the source; nothing ran on a worker for this head.

Why the review stops here this time. Each review needs two models to agree on what kind of change this is before it goes further, and only one could be asked today, so the classification at this head is unsettled. The full review, with tests on a worker and a second opinion, runs again once the reviewer is available.

Your question about moving T2 Macs to linux-omarchy, or carrying a narrow amdgpu patch there, is for the maintainer. Until then this is waiting on the bot's next review and on the maintainer.

@omarchybot omarchybot removed bug Something isn't working compatibility Make Omarchy work better on everything! labels Oct 2, 2026
McoreD added a commit to McoreD/omarchy that referenced this pull request Oct 3, 2026
@jandrusk

Copy link
Copy Markdown

Appreciate the thorough iMac20 Navi 14 write-up and tests.

Main open question before merge is product, not code shape: this permanently adds nomodeset for every matching iMac20,1/20,2, which drops GPU acceleration on machines that can init amdgpu. #11278 on the same GPU recovered with an SMC power drain and then ran accelerated on linux-t2 7.2.6; your follow-up #12524 also suggests newer linux-t2 may no longer need nomodeset.

Could this gate on a detected SMU failure / opt-in, or document it as a recovery path rather than the default install leaf? Happy either way once maintainers pick the policy.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Oct 14, 2026
T2 Macs installed before the 3.x move to CUSTOM_UKI_NAME="omarchy" can still carry an unused <machine-id>_linux-t2.efi: neither that migration nor omarchy-upgrade-to-quattro removes it. It never gets the new flags, so requiring every *linux-t2.efi to carry them failed this migration on every run and blocked every later migration for that user. Check omarchy_linux-t2.efi, the image limine-mkinitcpio builds on quattro.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by Claude Opus 5.5 at 4bfea61 against quattro, with Codex Medium as a second opinion over two rounds.

What ran, on a clean Omarchy worker VM: with this branch merged onto current quattro (84cfb93), ./test/cli passes (125 checks) and so do test/shell.d/imac20-display-test.sh (13) and test/shell.d/t2-hardware-test.sh (6). On the branch alone, ./test/cli stops at vscode generated theme references current theme file. That test fails the same way on the quattro commit this branch last merged (0537ae1), is fixed on current quattro, and has nothing to do with this change. The real detector and migration also ran on the worker's non-Apple hardware: the detector returned false, and the migration wrote no drop-in, rebuilt nothing and recorded no marker.

One fix pushed, 4bfea61. migrations/1789574960.sh checked every *linux-t2.efi in /boot/EFI/Linux for the flags. T2 Macs installed in 3.x before the move to CUSTOM_UKI_NAME="omarchy" (migration 1758487662) can still have an unused <machine-id>_linux-t2.efi. Nothing removes that file: omarchy-upgrade-to-quattro only cleans up <machine-id>_linux.efi. The old file never gets the new flags, so on such an iMac the migration failed on every run, and because migrations run in order, every later migration for that user was blocked too. The check now reads only omarchy_linux-t2.efi, the image limine-mkinitcpio builds on quattro. A failed build that leaves that image without the flags still keeps the migration pending. A new test puts a leftover machine-id UKI next to the rebuilt one: it fails against the old glob and passes now. Codex raised this finding and I checked it against the 3.x history. Its second round on this head found nothing more open. Its independence isn't guaranteed, because its brief described the finding.

Not changed: a custom ESP_PATH. Codex also noted that the check hard-codes /boot/EFI/Linux, so a machine whose /etc/default/limine moves the ESP (to /efi, for example) would keep the migration pending. Stock Omarchy uses /boot, so I left this alone.

What this doesn't prove. The SMU failure can't happen on a VM, so the only hardware evidence is your own boot table on the iMac20,1. The bot doesn't count a pull request author's own testing as independent confirmation, so this isn't marked verified. Your PR description also notes that the migration hasn't run on real hardware yet. If you can run it on the iMac at 4bfea61, that result will help the maintainer decide.

Waiting on the maintainer. Whether these iMacs should get nomodeset by default, losing acceleration, or only as an opt-in or recovery step (as @jandrusk asked, citing #11278), and your question about linux-omarchy carrying a narrow amdgpu patch, are both product decisions for them. #10169 targets the iMac20,2's Radeon Pro 5700 XT, not Navi 14, so it doesn't compete with this PR.

@omarchybot

Copy link
Copy Markdown
Collaborator

CI follow-up at 4bfea61e6d90c54e5356becc8caef4d66d1fb658: Check translation structure is recorded as failed, but GitHub returns no log, no jobs from any attempt, and no check runs. I could not identify a failed command or establish whether this change caused the failure. The named workflow and its test scripts are absent from this head; running today's versions would not reproduce that historical run.

Checked by GPT-6 in Codex at high effort, with Opus 5.5 High as a second opinion. Opus agreed that the evidence establishes no actionable code defect and noted that the run may have failed before starting any job. Its independence is not guaranteed. No tests ran on a worker in this follow-up, and no changes were pushed. CI remains unverified, and this stays with the maintainer alongside the boot-policy decision described in the previous review.

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

3 participants