Repository navigation
Install the CS4208 speaker driver on 12-inch MacBooks - #6921
sunoxen-lab wants to merge 4 commits into
Conversation
Mainline detects the codec on MacBook9,1 and MacBook10,1 but never enables the speaker amp, so PipeWire plays to a silent analog path.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds automatic installation and migration support for the CS4208 speaker driver on 12-inch MacBooks (2016/2017), plus coverage to validate wiring and behavior.
Changes:
- Wire a new Apple hardware setup leaf to install the CS4208 DKMS driver on supported MacBook models.
- Add a migration to retrofit existing installs while skipping machines already configured.
- Add shell tests asserting setup wiring, model matching, and migration behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/shell.d/cs4208-audio-test.sh | Adds integration-style shell tests for the new leaf + migration behavior. |
| migrations/1786719479.sh | Introduces a migration to install the CS4208 driver on eligible machines and request reboot. |
| manual/44-mac-support.md | Documents that the installer applies the CS4208 speaker driver fix on supported models. |
| install/omarchy-other.packages | Ensures the ISO caches macbook12-audio-driver-dkms. |
| install/hardware/apple/fix-cs4208-audio.sh | Adds the install-time hardware fix leaf for CS4208 audio. |
| install/hardware/all.sh | Wires the new CS4208 fix into the hardware setup pipeline. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Enable speakers on 12-inch MacBooks (MacBook9,1 / 2016 and MacBook10,1 / 2017). | ||
| # Mainline snd_hda_codec_cs420x detects the CS4208 but never runs the macOS | ||
| # init that powers the speaker amplifier, so PipeWire plays to a silent analog | ||
| # path. The out-of-tree module replays that init. | ||
| # MacBook8,1 (2015) is not supported by this driver. | ||
| # https://github.com/leifliddy/macbook12-audio-driver | ||
| # https://github.com/basecamp/omarchy/issues/2101 | ||
|
|
||
| product_name="${OMARCHY_MACBOOK12_AUDIO_MODEL:-$(cat /sys/class/dmi/id/product_name 2>/dev/null)}" | ||
| if [[ $product_name == "MacBook9,1" || $product_name == "MacBook10,1" ]]; then | ||
| echo "Detected 12-inch MacBook with CS4208 audio" | ||
|
|
||
| omarchy-pkg-add macbook12-audio-driver-dkms | ||
| fi |
| if [[ $product_name == "MacBook9,1" || $product_name == "MacBook10,1" ]]; then | ||
| echo "Detected 12-inch MacBook with CS4208 audio" | ||
|
|
||
| omarchy-pkg-add macbook12-audio-driver-dkms |
| echo "Install the CS4208 speaker driver on 12-inch MacBooks" | ||
|
|
||
| # Fresh installs get this from install/hardware/apple/fix-cs4208-audio.sh. | ||
| # Existing MacBook9,1 / MacBook10,1 installs still have silent speakers: | ||
| # mainline detects the codec and PipeWire plays, but the speaker amp is never | ||
| # enabled. Skip machines that already have the packaged module or the same | ||
| # DKMS driver installed by hand. | ||
|
|
||
| product_name="${OMARCHY_MACBOOK12_AUDIO_MODEL:-$(cat /sys/class/dmi/id/product_name 2>/dev/null)}" | ||
| if [[ $product_name != "MacBook9,1" && $product_name != "MacBook10,1" ]]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| if omarchy-pkg-present macbook12-audio-driver-dkms; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| if dkms status 2>/dev/null | grep -q '^macbook12-audio/'; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| omarchy-pkg-add macbook12-audio-driver-dkms | ||
| omarchy-state set reboot-required |
| grep -Fq $'omarchy-state\tset\treboot-required' "$calls" || | ||
| fail "the migration asks for the reboot that loads the module" "$(cat "$calls")" | ||
| pass "the migration installs the CS4208 driver" | ||
|
|
| fail "the CS4208 audio fix runs during hardware setup" | ||
| grep -qx 'macbook12-audio-driver-dkms' "$other_packages" || | ||
| fail "the ISO caches the CS4208 speaker driver" | ||
| grep -Fq 'MacBook9,1' "$leaf" && grep -Fq 'MacBook10,1' "$leaf" || |
Upstream's dkms.conf sets PACKAGE_NAME="macbook12-audio-driver", so dkms status prints that, never "macbook12-audio". The skip for a hand-installed driver never fired, and the test stub printed the same wrong name so it passed anyway. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The CS4208 clause landed between them and the NVMe fix, which made the NVMe fix read as 12-inch only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
install/hardware/apple/fix-cs4208-audio.sh:13
- Installing only the DKMS module leaves this hardware setup incomplete. Upstream marks software volume as required because the speaker path has no usable hardware volume control, but this repository only copies
alsa-soft-mixer.conffor ASUS ROG machines (install/user/hardware/asus/fix-audio-mixer.sh:3-5). These MacBooks therefore get no soft mixer or persisted mixer initialization, so the volume slider can remain ineffective. Add MacBook-specific user setup and backfill it for existing users.
omarchy-pkg-add macbook12-audio-driver-dkms
migrations/1786719479.sh:18
- This matches every DKMS state, including
macbook12-audio-driver/0.1: addedor a build installed only for an old kernel. In those cases the migration exits even though the running kernel still lacks the driver. Query the running kernel and only skip when DKMS reportsinstalled.
if dkms status 2>/dev/null | grep -q '^macbook12-audio-driver/'; then
| linux-ptl | ||
| linux-ptl-headers | ||
| macbook12-spi-driver-dkms | ||
| macbook12-audio-driver-dkms |
|
I validated this approach on the affected hardware: a MacBook10,1 running Omarchy with the CS4208 codec. The internal speakers work, and PipeWire reports the expected two-channel stereo profile. I found two integration gaps before this can land cleanly:
The corresponding upstream driver lifecycle fix is macbook12-audio-driver#60. This keeps #6921 as the main Omarchy PR while giving each repository a focused, reviewable change. |
migrations/1786719479.sh already exists on quattro as the Antigravity agent migration. omarchy-migrate records completion by filename, so sharing it would both conflict on merge and skip this migration on every machine that already ran the other one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed at Pushed: Blocking:
Also: the hand-install guard at The Copilot notes about missing shebangs and Tested: on a disposable Omarchy worker, Related: #12008 is the open issue for this bug. It also names un-muting the startup chime in NVRAM as a third requirement on some units, which this PR doesn't address, so it isn't linked as fixed. #12689 (draft) folds this PR into a larger Intel Mac audio consolidation. Asked to compare them without being told our view, Codex Medium recommended carrying this one forward as the focused fix, with the software-volume work added, over the consolidation. Second opinion: Codex Medium reviewed this head. It raised the package, software-volume and DKMS-guard findings above, and I checked each against Waiting on: the author, for software volume (for example by merging sunoxen-lab#1) and the DKMS guard. It also needs the maintainer to land omacom/omarchy-pkgs#153. After that, it needs a test at the full head SHA on a MacBook9,1 or 10,1. |
|
Heads-up for 12-inch MacBook audio: the out-of-tree driver this installs has no headphone support, so the 3.5 mm jack stops working once it's installed. I posted details and a stock-driver alternative that keeps both speakers and headphones in #12689: https://github.com/martin-irwin/macbook12-cs4208-audio |
|
Checked again at The headphone jack. The comment above says the driver has no headphone support, that its README says so, and that Correction to my earlier note on the DKMS guard. I suggested matching Still blocking, as before:
Tested: on a disposable Omarchy worker, with this head merged into current Second opinion: Codex Medium and muse-wonder (via pi, thinking high) each read the driver source and this head. Both found the headphone claim false at the pinned commit and on Waiting on: the maintainer, for whether to publish the driver package (omacom/omarchy-pkgs#153); nothing here can be installed or tested without it. Then the author, for the software-volume rule and the guard. After that it needs a test at the full head SHA on a MacBook9,1 or 10,1. |
Summary
On the 12-inch MacBook (
MacBook9,1/ 2016 andMacBook10,1/ 2017), mainlinesnd_hda_codec_cs420xdetects the Cirrus Logic CS4208 and PipeWire plays to it, but the speaker amplifier is never enabled. The OS thinks audio is working; the speakers stay silent. Headphones can still work because they use a different path.This is the same gap as #2101. Grok diagnosed it on a
MacBook10,1running Omarchy 4, installed leifliddy/macbook12-audio-driver via DKMS, and speakers came up. This PR is that fix paid forward to the next installer.What it does
install/hardware/apple/fix-cs4208-audio.sh, same shape as the SPI keyboard fix: detectMacBook9,1/MacBook10,1, thenomarchy-pkg-add macbook12-audio-driver-dkms.MacBook8,1(2015) is left alone; that model is not supported by this driver.1786719479.shfor existing installs. No-ops if the package is already present or if the same DKMS module was installed by hand.install/omarchy-other.packagesso the ISO can ship it.manual/44-mac-support.md.Omarchy already applies software volume globally, so the extra WirePlumber soft-mixer step from the driver README is not needed here.
Package
This needs
macbook12-audio-driver-dkmsinpkgs.omarchy.org, built from https://github.com/leifliddy/macbook12-audio-driver — the same source that restored speakers on the machine this was written on.It is not in the repo yet. Land the package with this PR (or immediately before), the way
macbook12-spi-driver-dkmsalready is. The DKMSPRE_BUILDdownloads matching kernel HD-audio headers on the target, so the package only needs to ship the driver source anddkms.conf.Test plan
test/shell.d/cs4208-audio-test.sh— leaf and migration fire only onMacBook9,1/MacBook10,1, skip 2015 / Pro / non-Apple, skip when the package or a hand-installed DKMS module is already thereMacBook10,1): after the DKMS module, speakers play; jack switch still works