Skip to content

Add pre-T2 MacBook Cirrus CS8409 speaker fix - #11064

Open
ozdadirri wants to merge 3 commits into
omacom:quattrofrom
ozdadirri:apple-cirrus-speakers
Open

ozdadirri wants to merge 3 commits into
omacom:quattrofrom
ozdadirri:apple-cirrus-speakers

Conversation

@ozdadirri

@ozdadirri ozdadirri commented Sep 9, 2026 •

Copy link
Copy Markdown

Problem

Pre-T2 2016–2017 MacBook Pros (MacBookPro13,1–13,3, MacBookPro14,1–14,3) pair a Cirrus CS8409 HDA bridge with a MAX98706 speaker amp. The in-tree snd_hda_codec_cs8409 driver never initialises the amp, so the card comes up with speaker_outs=0 and only headphone output works.

install/hardware/apple/fix-t2.sh does not help here — it gates on the T2 PCI ID (106b:180[12]), which these models predate. So today there is no path in Omarchy that restores speaker output on these Macs, and users have to re-apply an out-of-tree patch by hand after every update.

Write-up of the underlying issue and manual fix: https://medium.com/@chris.xg.wang/installing-omarchy-linux-on-your-old-mac-heres-the-fix-for-your-sound-1a0c289377f4

Change

  • install/hardware/apple/fix-cirrus-speakers.sh (new) — detects the affected models via /sys/class/dmi/id/product_name, excludes real T2 hardware, skips machines that already have a hand-built snd_hda_macbookpro driver (registered with DKMS or /usr/src/snd_hda_macbookpro-0.1 present), and otherwise installs snd-hda-macbookpro-dkms-git (davidjo/snd_hda_macbookpro). DKMS rebuilds the codec patch on every kernel bump, so the fix survives updates — no manual re-apply.
  • install/hardware/all.sh — dispatches the new leaf next to the other apple/ lines, right after fix-t2.sh.
  • migrations/1788959623.sh (new) — same detection and hand-built-driver guard, idempotent (omarchy-pkg-present guard), backfills the package on installs set up before the leaf existed.
  • test/shell.d/cirrus-speakers-test.sh (new) — static checks plus stubbed runs of both the installer and the migration across the six target models, rejected models, T2 hardware, the already-installed case, and both hand-built-driver cases.

Both scripts read lspci into a variable before matching to avoid the grep -q SIGPIPE / pipefail misfire (#6608).

Verification

  • ./test/shell — new test passes; the only failing files (config, locate, snapper, unowned-system-paths) fail identically on a clean quattro here (they need a local omarchy-pkgs checkout).
  • On a MacBookPro13,2: after the DKMS build + reboot, dmesg | grep -i cs8409 shows the patched codec, wpctl status lists the speaker sink, and speaker-test -D hw:0,0 -c 2 -t sine -f 440 produces output from both speakers.

Open questions for maintainers

  • -git AUR dependency. snd-hda-macbookpro-dkms-git has no pinned release. Happy to switch to a versioned/vendored package or move it into the Omarchy package repo if you'd prefer.
  • Model list. Widened to 13,1–13,3 / 14,1–14,3 after the review: owners report CS8409 on the non-Touch Bar 13,1 / 14,1 too (MacBook Pro 2015-2017 audio broken — need snd_hda_macbookpro driver #11619), and davidjo/snd_hda_macbookpro covers all six. Only 13,2 is hardware-tested here.
  • Whether newer linux-t2 / apple-t2-audio-config now covers any of these, shrinking the target.

MacBookPro13,2/13,3/14,2/14,3 pair a Cirrus CS8409 HDA bridge with a
MAX98706 speaker amp that the in-tree snd_hda_codec_cs8409 driver never
initialises, so the card comes up with speaker_outs=0 and only headphones
work. fix-t2.sh does not cover these models: it gates on the T2 PCI ID
(106b:180[12]), which the Touch Bar Macs predate.

Install the davidjo/snd_hda_macbookpro DKMS codec patch on those models,
excluding real T2 hardware. DKMS rebuilds it on every kernel bump, so the
fix survives updates.
Add a migration that runs the same pre-T2 Touch Bar MacBook detection and
installs snd-hda-macbookpro-dkms-git when it is missing, so machines set
up before the install leaf existed get the fix without a manual
re-apply after each omarchy update.
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 1ed9d451df4c551857cc0ea648c0b3d5471beb96 against quattro. Claude Opus 5.5 read the change and its surroundings, and Codex at medium effort reviewed it separately as a second opinion. It found the same two problems below, and independence is not guaranteed. On a disposable Omarchy worker, ./test/cli and test/shell.d/cirrus-speakers-test.sh both pass. The speaker fix itself could not be checked, because a VM has no CS8409.

1. The package does not exist where omarchy-pkg-add looks, so setup and updates on these Macs stop. omarchy-pkg-add is a plain pacman -S and exits 1 when a package does not install (bin/omarchy-pkg-add:8-21). snd-hda-macbookpro-dkms-git is an AUR package. It is not in the Omarchy repository on stable, rc or edge, or in the official repositories. On the worker, running migrations/1788959623.sh as a MacBookPro13,2 failed with error: target not found: snd-hda-macbookpro-dkms-git, exit 1. On a fresh install, run_logged passes that failure up and setup halts at fix-cirrus-speakers.sh. During omarchy update, omarchy-migrate runs under set -e, so this migration never writes its marker and every later migration and update step stops, on every retry (bin/omarchy-migrate:93-95, bin/omarchy-update:47-52). The tests stub omarchy-pkg-add to succeed, so they can't catch this. The package would have to be published in the Omarchy repository first and listed in install/omarchy-other.packages so the ISO carries it. That is the -git question already raised in the description, and it is the maintainer's decision.

2. The model gate leaves out MacBookPro13,1 and 14,1. fix-cirrus-speakers.sh:14 and migrations/1788959623.sh:11 match only 13,[23] and 14,[23], on the grounds that the non-Touch Bar models use a different codec. Owners in #11619 report a MacBookPro14,1 with CS8409 (subsystem 0x106b3300) whose speakers work with this driver. #12968 targets the same driver on a MacBookPro13,1. davidjo/snd_hda_macbookpro covers all of 13,1-13,3 and 14,1-14,3. test/shell.d/cirrus-speakers-test.sh:57 asserts the exclusion.

Not resolved here: #11619 reports that on a MacBookPro14,1 the stock snd-hda-codec-cs8409 still wins after a reboot until the initramfs is rebuilt. This PR only installs the package. Whether that holds on current Omarchy needs a reboot test on affected hardware once the package can be installed.

Related: #12689 (draft) covers the same CS8409 models plus 13,1, 14,1 and the CS8409 iMacs, using snd-hda-macbookpro-dkms, which is also not yet in the Omarchy repository. Neither is ready, so which approach lands is the maintainer's choice. #11619 is the issue this PR would address. It is not linked yet because nothing here has been seen to fix it.

Nothing was pushed to the branch. This now waits on the maintainer to decide whether and how the driver package is shipped. After that, the model gate needs widening and the change needs testing on one of these Macs, reboot included.

@ozdadirri

Copy link
Copy Markdown
Author

Thanks for the review — both points are fair.

  1. Agreed that the AUR -git package can't ship as-is. I'm happy to switch this PR to snd-hda-macbookpro-dkms from the Omarchy repo once one of omarchy-pkgs#249 / Add ~/.local/share/omarchy/bin to systemwide PATH #557 / use uwsm to properly wrap applications as systemd units #182 lands, and add it to install/omarchy-other.packages. Until then this PR should stay blocked rather than merge.
  2. I'll widen the gate to MacBookPro13,[1-3] / 14,[1-3] and update the test. I'll also add a guard that skips the install when snd_hda_macbookpro is already registered with DKMS or /usr/src/snd_hda_macbookpro-0.1 exists, so hand-built setups aren't broken (same issue raised on [Intel Mac P11] Consolidate model-specific Cirrus audio support #12689).

If maintainers would rather land #12689 instead, I'm fine closing this in its favour. Either way I can run a reboot test on my MacBookPro13,2, including the initramfs question from #11619, as soon as an installable package exists.

Owners report CS8409 on the non-Touch Bar 13,1 and 14,1 too, so widen the
model gate to 13,1-13,3 and 14,1-14,3.

Skip the install when snd_hda_macbookpro is already registered with DKMS or
its /usr/src tree exists: pacman would otherwise refuse the overlapping files
and fail setup or the migration, and a second DKMS version would race a
hand-built fork for updates/dkms.

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

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects audio drivers on a narrow set of older MacBook Pros.

Include the driver in the offline ISO package source before merging so affected MacBooks can complete setup.

Findings

  1. P1 Offline setup cannot install driver ▶

Summary

Adds a Cirrus speaker-driver installer for pre-T2 MacBooks, a migration for existing installs, and tests for hardware detection and existing drivers.

  • Selected older MacBook Pros get the CS8409 speaker codec fix.

Reviews (1) · Last reviewed commit: "Cover MacBookPro13,1/14,1 and keep hand-..." · Reviewed by Greptile

echo "Existing snd_hda_macbookpro driver found; leaving it in place"
else
echo "Detected pre-T2 MacBook with Cirrus CS8409 speakers"
omarchy-pkg-add snd-hda-macbookpro-dkms-git

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Offline setup cannot install driver

This step requests snd-hda-macbookpro-dkms-git, but the package is missing from install/omarchy-other.packages, which tells the ISO builder which extra packages to include. Fresh ISO installs still use an offline package source here. omarchy-pkg-add only runs pacman; it cannot fetch the AUR package. On a matching MacBook without a hand-built driver, this step fails instead of restoring the speakers. Make the package available through the package repository and include it in the ISO package list.

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at ac27893f9e96b9b97785509688f65469822f24e7 against quattro. Claude Opus 5.5 reviewed the new commit. Codex at medium effort and muse-spark-1.3 at high thinking each reviewed it separately as a second opinion. Both agreed with the findings below; their independence is not guaranteed.

The model gate is fixed. fix-cirrus-speakers.sh:18 and the migration now match all six of MacBookPro13,1–13,3 and 14,1–14,3. The new guard skips the install when /usr/src/snd_hda_macbookpro-0.1 exists or dkms status lists snd_hda_macbookpro, so hand-built drivers are left alone. Nothing wrong was found in that commit.

The package still can't be installed. On a disposable Omarchy worker, ./test/cli and test/shell.d/cirrus-speakers-test.sh pass. Run as a MacBookPro13,1, the migration fails with error: target not found: snd-hda-macbookpro-dkms-git and exits 1. Run as a MacBookPro14,1, the install script fails the same way. pacman -Si finds neither snd-hda-macbookpro-dkms-git nor snd-hda-macbookpro-dkms. Neither package is in omarchy-pkgs yet, because omarchy-pkgs #249, #557 and #182 are all still open. Until one of them ships, an affected Mac without a hand-built driver would stop at this step on a fresh install and on every omarchy update. You already said the PR should stay blocked until then, and that is still where it stands.

#12689 (draft) installs the same driver family on these Macs and also covers the CS8409 iMacs. The two reviewers disagreed on which approach should go forward. One kept this PR as the older one, and because #12689's CS8409 path has no guard for hand-built drivers. The other preferred #12689 for its iMac coverage. Neither can install its package today, so the choice is left to the maintainer.

Nothing was pushed. This is waiting on the maintainer to publish a CS8409 driver package and decide between this PR and #12689. After that, it needs the package name switched and your reboot test on the MacBookPro13,2.

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.

3 participants