Skip to content

[Intel Mac P11] Consolidate model-specific Cirrus audio support - #12689

Draft
andrew-boyd wants to merge 8 commits into
omacom:quattrofrom
andrew-boyd:intel-mac/p11-cirrus-audio
Draft

andrew-boyd wants to merge 8 commits into
omacom:quattrofrom
andrew-boyd:intel-mac/p11-cirrus-audio

Conversation

@andrew-boyd

@andrew-boyd andrew-boyd commented Sep 20, 2026 •

Copy link
Copy Markdown

[Intel Mac P11] Consolidate model-specific Cirrus audio support

Consolidate the separate Cirrus audio tracks while keeping their model and package boundaries. Software follow-ups anchor the CS8409 model gate, avoid an unrelated stock-header request, preserve custom service/user configuration and back up saved routes. Driver and mixer tuning are unchanged.

Draft consolidation for source review and hardware-owner follow-up. Known defects remain; no hardware or merge-readiness certification is claimed. Part of the 14-feature Intel Mac series with three package companions.

Contribute: open follow-up PRs in andrew-boyd/omarchy with base intel-mac/p11-cirrus-audio. Use [Intel Mac P11] in the title and a contributor branch such as intel-mac/p11/describe-change. Link this feature in the series index. Merging a follow-up into this branch updates its roll-up.

This existing draft: #12689.

Full Intel Mac scope and current revision

The project covers all 64-bit Intel Macs: pre-T1, T1 and T2. MacBookPro13,3 is only the first available physical test machine. Each feature has its own hardware boundary; one model's success does not validate the rest.

Candidate head: 718268634ed323174a43c2b83690af921019bd83; reconciled upstream: 8f324c90b82790d31ab33565441e07cbdb8d2308. Published contribution commits and author/co-author metadata remain in the history.

Ready for attended physical testing; Mac hardware remains untested by this effort. The reconciled combined ISO passed fresh unencrypted/encrypted VM installations, desktop/password-lock checks, strict Neovim startup/theme checks, synthetic Apple EFI preservation through a disk wipe, and affected package/DKMS/migration checks. ISO SHA-256: 9e6288ef5cc1eadce519cdd7384c8030286eb938a6288eb218f025a61b433252.

Exact sources, results, retained failures and reproduction. These results cover the pinned combined image; standalone-versus-combined differences remain explicit. Full inventory and retained work tracks.

Scope and dependencies

Preserve separate CS8409, MacBook CS4208 and iMac CS4208 tracks. The two DKMS package tracks conflict on one machine. Source closures do not erase iMac coverage or the MacBookPro13,2 speaker report.

The inventory now records 188 source/context PRs: 101 have dispositions in feature tables and 87 remain only in separate work tracks. This is not 188 implemented PRs or 188-to-14 compression. The 14 feature PRs and three package companions remain the published coordination targets; retained backlog is not claimed complete.

Every affected source PR and recommended action

Current open/closed/merged state is administrative history, not proof that two patches preserve identical behavior. Included/partial identifies selected contributions; alternatives, deferred work and context are not automatically ISO content.

Source and author State Treatment and rationale Recommended action
leifliddy/macbook12-audio-driver#60 — @doctor merged context: Merged driver preparation/DKMS changes underpin package omacom/omarchy-pkgs#153. Its preparation files match, while the older pinned Makefiles differ; the package does not contain every change in this driver PR. Already merged; retain evidence and credit. No action requested.
omacom/omarchy-pkgs#153 — @doctor open included: Selected MacBook CS4208 package foundation with the existing recorded matching-kernel preparation follow-up. It conflicts with the separate CS8409 package on one system; do not install both model tracks together. Consider closure only after maintainers accept preserved behavior and hardware coverage.
omacom/omarchy-pkgs#155 — @shawnyeager open superseded: CS8409 package predecessor credited through omacom/omarchy-pkgs#249; preserved independently, not an additional companion PR. Maintainers may assess the named successor before closure.
omacom/omarchy-pkgs#182 — @gjinali open alternative: Camera/audio package bundle for #7732 with offline source preparation and post-transaction DKMS verification. Compare its delivery guarantees with the selected package companions; the whole bundle is not incorporated merely because package names overlap. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy-pkgs#249 — @j7j7 open included: Selected CS8409 package foundation, with the previously documented offline preparation/build compatibility work. Review the exact recipe and built archive receipts rather than assuming the source PR is byte-identical to the integrated package. Consider closure only after maintainers accept preserved behavior and hardware coverage.
omacom/omarchy#10458 — @inspiretelapps open included: Selected iMac CS4208 in-tree configuration, with later preservation of administrator settings and audio routes. No new speaker/mixer tuning was inferred without hardware. Consider closure only after maintainers accept preserved behavior and hardware coverage.
omacom/omarchy#11064 — @ozdadirri open alternative: Exact Touch Bar-model/AUR CS8409 installer with a reported MacBookPro13,2 speaker test; upstream closed #11625 in its favor. Keep that evidence and model-gating rationale, while retaining the selected pinned package and wider iMac track. The claim that every 13,1/14,1 has a different codec is not adopted as a blanket exclusion. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#11623 — @andyholst closed alternative: Combined NVRAM/audio proposal. Its calibration applies a shared file by PCI ID and can retain the embedded default MAC when no interface identity is available; audio uses live git clone/pull and stock linux-headers. Retain the signal/audio reports, but prefer the selected model/subsystem calibration paths and pinned packaged audio delivery. The bundle is not fully superseded by either single roll-up. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#11625 — @andyholst closed alternative: Unpinned direct-clone CS8409 delivery with differing installer/migration gates. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#12286 — @teomurgi open alternative: Complete conflicting MacBook proposal includes automatic EFI writes and freeze sleep policy; preserve separately. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#6921 — @sunoxen-lab open included: MacBook CS4208 baseline combined with the existing linked mixer/current-kernel upgrade contribution; uses package omacom/omarchy-pkgs#153. Consider closure only after maintainers accept preserved behavior and hardware coverage.
omacom/omarchy#7140 — @shawnyeager closed superseded: CS8409 predecessor credited through #9516; narrower model coverage retained as comparison. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#7732 — @gjinali open alternative: Complete MacBookPro13,1 camera/audio/SPI transition bundle with reported hardware validation, dependent on package omacom/omarchy-pkgs#182. Preserve as a broader model-specific alternative; no one feature roll-up supersedes all of its coverage. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#8285 — @jack-lech open alternative: Different CS8409 -git package name and installer/cache ownership; not stacked. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#9516 — @j7j7 closed included: Selected CS8409 package-backed installer including its distinct iMac track. Later exact-model/header checks preserve custom configuration. Upstream closure in favor of #8285 does not erase the wider model evidence or source credit. Already closed; retain evidence and credit. No action requested.
sunoxen-lab/omarchy#1 — @doctor open partial: Existing mixer/service/current-kernel upgrade work included. Its separate s2idle proposal is retained as an unselected alternative. Keep uncovered work open; this feature alone does not fully supersede it.

Validation and attribution

Required fresh-image checks are satisfied, with qualified reruns. The full source suite passed 273 files with two disclosed skips, but repeated NetworkManager Polkit failures during that suite temporarily locked its test account. The following password/desktop/recovery checks failed there and passed separately in a clean overlay of the same ISO; the original aggregate remains failed. The first build attempt also failed one libfprint USB-emulation test; unchanged-source isolated repeats, two complete suites and normal package checks passed afterward. That intermittent build-test failure remains documented, and its cause is not established. VM fixtures and DKMS builds do not establish physical device behavior. Physical Wi-Fi, audio, camera, Touch Bar, fingerprint, graphics and suspend behavior remain unverified by this effort.

Original source histories remain linked above. Source-authored commits already included in the roll-ups remain ancestors of this revision; additional copied contributions receive native attribution. Original attribution mapping. No original PR is edited or closed by this effort.

Consolidate existing source contributions for draft review.
Original implementation authors are retained as author/co-authors; the committer assembled and reconciled the candidate. No contributor approval or sign-off is implied.
Known defects and excluded alternatives remain documented in the PR body.

Source-PR: omacom#9516
Source-PR: omacom#6921
Source-PR: sunoxen-lab#1
Source-PR: omacom#10458
Source-Commit: omacom#9516ff83da9
Source-Commit: omacom#9516ad69a65
Source-Commit: omacom#9516db6d259
Source-Commit: omacom#6921316e1f0
Source-Commit: omacom#69210345c98
Source-Commit: omacom#69212d7cbf6
Source-Commit: sunoxen-lab#13fd681d
Source-Commit: sunoxen-lab#13f64870
Source-Commit: sunoxen-lab#1579cef0
Source-Commit: omacom#104585cf2638

Co-authored-by: J7 <31825378+j7j7@users.noreply.github.com>
Co-authored-by: S-M Robinson <seanmichael@hey.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Jake Pillai <jakepillai@me.com>
Co-authored-by: inspiretelapps <207020073+inspiretelapps@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@macintog

Copy link
Copy Markdown

Reviewing b006a68c, I found three installation and upgrade details worth addressing before this leaves draft:

  • CS8409 offline delivery: install/omarchy-other.packages includes macbook12-audio-driver-dkms, but not snd-hda-macbookpro-dkms, which install/hardware/apple/fix-cs8409-audio.sh installs. The CS8409 package therefore needs to be included in the offline package set as well.
  • CS8409 kernel headers: both that installer and migrations/1786889011.sh request linux-headers. That does not ensure matching headers for a selected linux-omarchy, linux-lts, or other retained kernel. Could these paths use the headers corresponding to the kernel the driver will be built for? Matching headers may already be present, but these calls do not establish that prerequisite.
  • Activation on existing installations: the CS8409 migration installs the driver without requesting a reboot. Separately, migrations/1788673159.sh installs the iMac WirePlumber configuration without restarting WirePlumber or requesting a reboot. Those changes can remain unapplied in the current session. Could each migration explicitly handle activation or signal the required restart? The MacBook CS4208 migration already uses omarchy-state set reboot-required, so there is an existing pattern for the driver case.

These are source-review findings; I have not run an offline ISO installation, a DKMS build, or an audio-session test for this revision.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Sep 27, 2026
ahmadtv added a commit to ahmadtv/omarchy-imac18-3 that referenced this pull request Oct 1, 2026
omacom/omarchy#12689 (draft) plus omacom/omarchy-pkgs#249 would install
davidjo's snd-hda-macbookpro-dkms on iMac18,x/19,x. It registers as
snd_hda_macbookpro/0.1 -- our DKMS name, another version -- and
audio_rival_dkms skipped every entry with our name, so the clash went
unnoticed until a kernel update let the wrong build win updates/dkms
(no headset capture, no remote buttons).

- audio_rival_dkms reports our name with any other version, plus any
  other package building snd-hda-codec-cs8409, as before
- a rival whose source tree a pacman package owns is removed with
  pacman -R; deleting its files left the package registered, and its
  next upgrade restored them
- mod_audio_detect reports partial while a rival exists, so the status
  banner flags it right after the Omarchy update, before a kernel update
- the 0.2 version lives in one constant, AUDIO_DKMS_VER; AUDIO_SRCROOT
  makes the source root overridable for testing

Tested against a fake source root (ours only; plus davidjo 0.1; plus an
other-named cs8409 driver; plus unrelated APFS DKMS) and on the live
machine (no rival, audio still "applied"). The pacman -R branch is not
exercised live: that needs the rival package installed.

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

ahmadtv commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

A heads-up from an iMac18,3 owner on how this lands on machines that already have a CS8409 driver. Until now, building it by hand was the only way to get sound on these Macs, so many will.

The install hook and migration 1786889011.sh add snd-hda-macbookpro-dkms whenever the model matches, without checking for an existing install. Two cases go wrong:

  1. Installed with davidjo's own dkms.sh. It uses /usr/src/snd_hda_macbookpro-0.1, the same directory this package installs into (dkms.sh sets src_dir='/usr/src/snd_hda_macbookpro-0.1'). pacman will refuse with "exists in filesystem", so omarchy-pkg-add fails during the migration.
  2. A fork with another version under the same DKMS name. jackdanyell's iMac18,3 fork registers snd_hda_macbookpro/0.2. The package adds snd_hda_macbookpro/0.1 next to it, and both build snd-hda-codec-cs8409 into the same updates/dkms path, so after the next kernel update whichever DKMS builds last wins. On my iMac18,3 that's a patched build with the headset mic and the EarPods remote buttons (https://github.com/ahmadtv/omarchy-imac18-3), which davidjo's driver doesn't have, so it would silently lose them. My patcher now guards against this, but people who built a fork by hand won't have that.

Suggestion: skip the install when dkms status already lists snd_hda_macbookpro (any version), or when an snd-hda-codec-cs8409 module already exists under /usr/lib/modules/*/updates/. Fresh installs behave exactly as this PR intends, and existing working setups are left alone.

@jandrusk

jandrusk commented Oct 8, 2026

Copy link
Copy Markdown

Two of the earlier review points look like they're still open at the current head, and both can break omarchy update on existing Macs:

  1. Existing hand-built CS8409 driver (@ahmadtv's report). migrations/1786889011.sh runs omarchy-pkg-add snd-hda-macbookpro-dkms whenever the model matches. If davidjo's dkms.sh already populated /usr/src/snd_hda_macbookpro-0.1, pacman fails with "exists in filesystem" and the migration fails. If a fork registered a different version under the same DKMS name, both builds race for updates/dkms. A guard along these lines would avoid both:

    if ! pacman -Q snd-hda-macbookpro-dkms &>/dev/null &&
       { [[ -e /usr/src/snd_hda_macbookpro-0.1 ]] || dkms status snd_hda_macbookpro 2>/dev/null | grep -q .; }; then
      echo "Existing snd_hda_macbookpro DKMS install found; leaving it in place"
      exit 0
    fi

    Doing the same check in install/hardware/apple/fix-cs8409-audio.sh would cover the installer path too.

  2. Offline install (@macintog). install/omarchy-other.packages gains macbook12-audio-driver-dkms but not snd-hda-macbookpro-dkms, which the CS8409 installer adds, so offline installs on those models fail at that step.

The branch also conflicts with quattro now, and migrations/1788673159.sh has the same name as the one in #10458. That's expected since this carries #10458, but only one of the two should merge.

@ozdadirri

Copy link
Copy Markdown

Author of #11064 here. I have a physical MacBookPro13,2 (CS8409 + MAX98706) and can run attended tests of the CS8409 track: fresh install, the migration on an existing install, and speakers after a reboot and a kernel update.

One thing I'd like to see before testing: the existing-install guard @ahmadtv and @jandrusk described. Many 13,x/14,x owners (me included) previously built davidjo's driver by hand, so the migration would currently fail for us with "exists in filesystem".

On my side I don't mind which of #11064 and this lands; I'd just like one of them to unblock these Macs.

@martin-irwin

Copy link
Copy Markdown

A data point for the CS4208 / 12-inch MacBook part of this, from a MacBook10,1:

Installing the out-of-tree macbook12-audio-driver gets the speakers working but breaks the headphone jack. That driver has no headphone support; its README says so. The headphone code (headphones_a1534) is commented out. So auto-installing it, as in #6921, trades the jack for the speakers.

An alternative that gives you both, on the stock driver: https://github.com/martin-irwin/macbook12-cs4208-audio

  • Stock snd-hda-codec-cs420x stays loaded. It handles the jack and jack detection, and there's nothing to rebuild on kernel updates.
  • A small daemon replays the macOS verb traces from that driver over hwdep. It replays the speaker init when playback starts with the jack empty, and macOS's headphone switch on plug-in. Switching is instant in both directions, and the player doesn't pause.
  • A WirePlumber rule. It pins the output to S16LE/44.1 kHz (the amp's format) and turns on api.alsa.soft-mixer, because the speaker path ignores the hardware Master. This matches the soft-mixer rule mentioned in the linked follow-up.
  • The chime must be un-muted. The amp is only powered when the EFI startup chime is not muted (SystemAudioVolume bit 0x80). If someone's chime is muted, the speakers stay silent with either approach.

It's tested on one MacBook10,1 (kernel 7.2.15). I'm happy to help adapt it into a hardware script here if that's useful.

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.

8 participants