This repo contains the small boot/login-time script that fixed the internal speaker output on this machine.
On this MacBookPro14,1, Linux already had the Cirrus Logic CS8409/CS42L83 audio device exposed through a custom snd_hda_codec_cs8409 module, but the speakers were still unreliable after boot/login. The remaining problem was post-boot state:
- the saved ALSA mixer state was not always restored
- the hardware PCM level needed to be forced back to a known-good value
- PipeWire needed the built-in analog sink set as the default output and the speaker port selected
When that state was wrong, the machine would boot with a visible audio device but no usable speaker output.
fix-macbook-audio.sh does four things:
- waits for the PipeWire sink to appear
- restores
~/.config/asound.stateif it exists - sets the ALSA
PCMcontrol on card0to100% - sets the default sink to
alsa_output.pci-0000_00_1f.3.analog-stereoand switches the active port toanalog-output-speaker
macbook-audio-fix.service runs that script once per user session after PipeWire starts.
- Model: Apple
MacBookPro14,1 - Board:
Mac-B4831CEBD52A0C4C - OS:
Ubuntu 24.04.3 LTS - Kernel:
6.17.0-20-generic - CPU:
Intel Core i5-7360U @ 2.30GHz(2 cores / 4 threads) - Memory:
7.6 GiB - Storage:
113 GiB NVMe - Audio controller:
Intel Sunrise Point-LP HD Audio [8086:9d71] - Audio codec / mixer:
Cirrus Logic CS8409/CS42L83 - Loaded codec module:
/lib/modules/6.17.0-20-generic/updates/snd-hda-codec-cs8409.ko - PipeWire sink used by this fix:
alsa_output.pci-0000_00_1f.3.analog-stereo - PipeWire speaker port used by this fix:
analog-output-speaker
gh repo clone MichStew/MP2014_Sound
cd MP2014_Sound
chmod +x fix-macbook-audio.sh
./fix-macbook-audio.shIf you want it to run automatically on login:
mkdir -p ~/.local/bin ~/.config/systemd/user
cp fix-macbook-audio.sh ~/.local/bin/
cp macbook-audio-fix.service ~/.config/systemd/user/
chmod +x ~/.local/bin/fix-macbook-audio.sh
systemctl --user daemon-reload
systemctl --user enable --now macbook-audio-fix.serviceIf ~/.config/asound.state does not exist yet, save a known-good mixer state first:
alsactl --file ~/.config/asound.state store 0- This repo only covers the post-boot mixer/routing fix.
- It assumes the CS8409 driver is already working on the target system.
- If your sink or speaker port names differ, override
SINK_NAMEandPORT_NAMEwhen running the script.