Repository navigation
Conversation
MacBook9,1 / MacBook10,1 use a Cirrus Logic CS4208 codec whose speaker amplifier the in-tree driver never powers (generic PCI SSID 8086:7270, so no Apple fixup applies and speaker_outs=0). Sound additionally requires the EFI startup chime un-muted, since the firmware energises the speaker amp only when playing the chime, and the codec must be kept out of D3cold or audio dies after suspend. - install/hardware/apple/fix-macbook12-audio.sh: gate on the two models, clone and DKMS-build leifliddy/macbook12-audio-driver, install the WirePlumber soft-mixer rule, clear the chime mute bit in NVRAM, and pin the audio codec out of D3cold via a systemd service (mirroring fix-suspend-nvme.sh). - install/hardware/all.sh: run the fix during hardware setup. - migrations/<ts>.sh: apply the same fix to existing installs (idempotent). - test/shell.d/macbook12-audio-test.sh: detection/DKMS/softvol/chime/suspend. - manual/44-mac-support.md: document the fix, the expected chime, and software volume.
Empirical testing on MacBook10,1 showed pinning the audio controller out of D3cold does NOT prevent speaker loss after s2idle resume: with d3cold_allowed=0 confirmed active, the codec still comes back silent (stream attached, GPIO amp up, D0, yet no output). Writing "freeze" to /sys/power/state preserves audio across suspend on this hardware. These machines have no S3 (the kernel rejects "freeze" for /sys/power/mem_sleep), so the drop-in sets SuspendState=freeze with an empty MemorySleepMode= to force systemd onto the plain-freeze path. The migration also removes the earlier d3cold systemd service if present.
Automated AI review
Verified: the fix is gated to MacBook9,1 / MacBook10,1 and does nothing on other hardware. The root cause is consistent with mainline Linux 7.2 ( Outcome: the main issues are in how and where the out-of-tree driver is built. On a fresh ISO install the new step fails and stops the installation on the two target models, and the "already installed" check can accept a failed or wrong-kernel build, leaving speakers silent with the migration recorded as done. The suspend explanation also does not match kernel semantics. Details and suggested changes follow. Fresh ISO installs on the target models stop at hardware setupHardware setup runs inside the installer's arch-chroot, where Impact: before this PR these machines install with silent speakers; with it, a fresh install on MacBook9,1 / MacBook10,1 fails. This follows from the installer and DKMS sources and was reproduced with stubbed commands in a sandbox, not with a real ISO install. Suggested change: do not build the driver in the installer chroot. Defer it to the installed system (for example first boot or a migration), or build only with explicit The DKMS "already installed" check accepts failed and wrong-kernel buildsBoth scripts skip the driver when (Sandboxed run with a stubbed DKMS failing after "add".) The same guard hides a kernel upgrade in the same Impact: speakers can stay silent while the migration is recorded as complete, with no retry. Suggested change: build for each installed kernel with The clone in
|
|
Reviewed at Competing fix. #6921 installs the same leifliddy driver as a packaged Confirmed against source, as the community review above also found:
Suspend. Writing Tested: Second opinion: Codex Medium reviewed this head. It also flagged the EFI attribute overwrite and the suspend reasoning. In a separate run, without being told our view, it was asked which of this PR and #6921 should go forward. It recommended #6921's packaged approach with this PR's soft-volume and chime handling added. Its independence isn't guaranteed, since it can read this session's working notes. Waiting on: the maintainer, to choose between this PR and #6921, and to land omacom/omarchy-pkgs#153 if #6921 goes ahead. |
|
Thank you for this, @teomurgi. #6921 fixes the same problem in a way the review judged better, so this is closed in favour of it. If it does not cover your case, please say so there. Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent. |
Problem
On the 12-inch MacBook (MacBook9,1 / MacBook10,1) the internal speakers are completely silent out of the box. Headphones work; every mixer looks fine; PipeWire shows an active sink — and nothing comes out.
manual/44-mac-support.mdcurrently lists "Sound is not functioning" as a known Mac limitation.Additionally, once speakers do work, audio dies after every suspend/resume and only a reboot brings it back.
Root cause
The Cirrus Logic CS4208 codec's speaker amplifier is never powered by the in-tree driver: the HDA controller reports a generic PCI subsystem ID (
8086:7270), sosnd_hda_codec_cs420xmatches no Apple fixup and probes withspeaker_outs=0(only the headphone jack0x10is wired through the analog DAC). Mainline has no working speaker config for this codec.Four independent things are required for sound to actually come out — and stay out:
Fix
Detect the two models and install all four pieces:
install/hardware/apple/fix-macbook12-audio.shMacBook9,1|MacBook10,1; clones + DKMS-builds the driver; installs the WirePlumber soft-mixer rule; clears the chime mute bit; installs asleep.conf.ddrop-in pinning suspend to freezeinstall/hardware/all.shmigrations/<ts>.shreboot-required)test/shell.d/macbook12-audio-test.shmanual/44-mac-support.mdSuspend: what actually works (tested)
The obvious fix — pinning the codec out of D3cold, mirroring
fix-suspend-nvme.sh— was implemented first and disproven on real hardware:d3cold_allowed=0confirmed active at runtime, suspend/resume still killed the speakers. Post-resume codec state looked fully alive (stream attached, GPIO amp lines up, D0 power) yet no output.echo 1 > /sys/class/sound/hwC0D0/reconfig) was refused — PipeWire holds the device.What works: writing
freezeto/sys/power/statekeeps the amp alive across suspend — audio verified working after resume. These machines have no S3 (the kernel rejectsfreezefor/sys/power/mem_sleep), so the drop-in sets:The empty
MemorySleepMode=forces systemd (≥254) onto the plain-freeze path instead of probingmem_sleep. Verified end-to-end:systemctl suspend→ wake → speakers work.Notes
write()on anO_WRONLYfd — piping throughteefails withInvalid argument(teeusesO_TRUNCand the firmware attribute word is rejected). The migration and install script both use that form.macbook12-audio-driver-dkmspackage in the omarchy repo, the script collapses to a singleomarchy-pkg-add— happy to switch.Tested
Verified end-to-end on a MacBook10,1 running Omarchy 4.0.4 / kernel 7.2.5-3-omarchy: before the fix the sink ran at 91% with
speaker_outs=0and silence; after it the DKMSsnd_hda_codec_cs420xloads fromupdates/dkms/, the chime is audible at boot, the internal speakers produce sound with working software volume, and audio survives suspend with the freeze drop-in../test/shellpasses (6 unrelated pre-existing environment failures, unchanged with this commit stashed).Refs #11619 (MacBook audio, CS8409) and #12217 (CS4208 woofers on MacBookPro12,1) — same class of model-gated hardware fix.