Learn Linux for Work · Free guide · AGPL-3.0-or-later

Linux-on-Mac

Guides and scripts for running Linux on Apple Mac hardware. Each guide covers one problem: how to diagnose it, the fix, how to check it worked, and how to undo it. Read them here, or download the files and use them.

⬇️ Downloads

Everything you need to use the guide. All files are licensed under the GNU AGPL v3.0 or later.

FileWhat it does
linux-on-mac.tar.gzAll of the files below in one archive
validate-mac-audio.shValidates the Mac against the Linux-on-Mac audio baseline (Apple hardware, supported model and chip, supported OS, driver active) with PASS/FAIL lines. Read-only.
install-cs8409-driver.shInstalls the reviewed driver on Ubuntu, pinned to commit 1931615, from a root-owned folder. Run with sudo.
uninstall-cs8409-driver.shRemoves the driver and restores the stock kernel module. Run with sudo.
imac-cs8409-audio.mdThis guide as Markdown
LICENSEGNU Affero General Public License v3

Quick start

curl -LO https://mac.learnlinuxforwork.com/downloads/linux-on-mac.tar.gz
tar -xzf linux-on-mac.tar.gz
cd linux-on-mac/scripts
./validate-mac-audio.sh
sudo ./install-cs8409-driver.sh
sudo reboot

Read a script before you run it with sudo. The install script installs a kernel module.

🔊 No sound from iMac / MacBook Pro speakers (Cirrus CS8409)

Symptom: Linux shows a "Built-in Audio Analog Stereo" output, nothing is muted, and apps seem to play audio, but nothing comes out of the built-in speakers.

Cause: these Macs use a Cirrus Logic CS8409 audio chip that drives separate speaker amplifiers. The CS8409 driver in the standard Linux kernel only supports the Dell versions of this chip, so it never sets up Apple's speaker amplifiers. Audio gets to the chip, but never reaches the speakers.

Fix: install the community driver davidjo/snd_hda_macbookpro. It rebuilds the kernel's snd-hda-codec-cs8409 module with Apple support and installs it with DKMS. The original module is kept and can be restored.

No first-party fix exists for the speakers. Without a third-party driver, your options are the headphone jack (may work on the stock driver), USB audio, or Bluetooth.

🔍 1. Confirm you have this problem

Run ./validate-mac-audio.sh, or check by hand:

cat /sys/class/dmi/id/product_name
grep -E 'Codec|Subsystem Id' /proc/asound/card*/codec#0

You should see Codec: Cirrus Logic CS8409 and one of these subsystem IDs:

Subsystem IDMac
0x106b0e00iMac 18,1
0x106b0f00iMac 18,2
0x106b1000iMac 18,3 / 19,1
0x106b3300MacBook Pro 13,1 / 14,1
0x106b3600MacBook Pro 14,2
0x106b3900MacBook Pro 14,3

Then make sure the sound software isn't the problem. If wpctl status lists a sink, it isn't [MUTED], and speaker-test -c2 -t sine -l1 runs without errors but you hear nothing, it's the driver.

🛡️ 2. Review the driver before you install it

The driver runs in the kernel, so read it before you install it. A review of commit 1931615 (2026-11-14) found:

The install script pins that reviewed commit, so a later push upstream can't change what you install.

🧰 3. Install

On Ubuntu, run sudo ./install-cs8409-driver.sh, then sudo reboot. Or run the same steps by hand:

sudo apt install -y build-essential git dkms
sudo apt install -y linux-source-$(uname -r | cut -d- -f1)
sudo git clone https://github.com/davidjo/snd_hda_macbookpro.git /opt/snd_hda_macbookpro
sudo git -C /opt/snd_hda_macbookpro checkout 1931615
cd /opt/snd_hda_macbookpro && sudo ./install.cirrus.driver.sh -i
sudo reboot

The first build step can take several minutes, because it searches the whole compressed kernel source archive. A good install ends by listing snd-hda-codec-cs8409.ko.zst under /lib/modules/<kernel>/updates/dkms.

✅ 4. Verify

After the reboot, run ./validate-mac-audio.sh again, or check by hand:

modinfo -n snd_hda_codec_cs8409          # path under updates/dkms/
journalctl -k -b | grep -i 'trying APPLE'
speaker-test -c2 -t sine -f 440 -l1

Expect Primary patch_cs8409 NOT FOUND trying APPLE. That means the driver found no Dell match and is using its Apple setup. You should hear the tone from the built-in speakers. The kernel log line module verification failed … tainting kernel is expected for a self-built module when Secure Boot is off.

🔄 5. After kernel updates

DKMS rebuilds the driver automatically for each new kernel, but the build needs the matching linux-source package. If sound stops after an update, run sudo ./install-cs8409-driver.sh again and reboot. Ubuntu HWE kernels have no linux-source package, so this method doesn't work on them.

↩️ 6. Uninstall

Run sudo ./uninstall-cs8409-driver.sh, then sudo reboot. This restores the original kernel module.

Known issues (upstream)

The driver author lists these as still being worked on: audio after suspend/resume, headset microphones, and the internal microphone being blocked when a headset is plugged in.

Tested on an iMac 18,2 (21.5-inch, 2017) running Ubuntu 26.04.1 LTS with kernel 7.0.0-44-generic.

📜 License and terms

🙏 Credits and trademarks

Linux-on-Mac is independent. It is not affiliated with, sponsored by or endorsed by Apple Inc., Cirrus Logic, Inc., or the authors of the driver named below.

The guide, the site and the scripts (validate-mac-audio.sh, install-cs8409-driver.sh, uninstall-cs8409-driver.sh) are original work of Shea's Tech, LLC, released under the GNU AGPL v3.0 or later. They contain no code from the projects below. The install script downloads the driver from its own repository and runs that project's own installer.

Product or markBelongs toUsed here for
snd_hda_macbookpro (Apple CS8409 speaker driver)davidjo and contributors, GPL-2.0The kernel driver that makes the built-in speakers work. Reviewed at commit 1931615 and fetched by the install script. github.com/davidjo/snd_hda_macbookpro
Apple, Mac, iMac, MacBook ProApple Inc.The hardware these guides cover. apple.com trademark list
Cirrus Logic, CS8409Cirrus Logic, Inc.The audio chip in these Macs. cirrus.com
Linux kernel, DKMSThe Linux kernel and DKMS projectsThe kernel source the driver is built from, and the tool that rebuilds it after kernel updates.
UbuntuCanonical Ltd.The Linux distribution the install script supports and was tested on.

💜 Support Learn Linux for Work

An open source project of Shea's Tech, LLC.

Why I Built This Project

A note from Shea Bennett, founder of Shea's Tech

Shea Bennett, founder of Shea's Tech

Shea Bennett started his career in Information Technology as a Helpdesk Analyst with no formal training or background in IT. He had no experience when he left the U.S. Navy, where he served as a Hospital Corpsman assigned to a Marine Corps battalion as a Fleet Marine Force (FMF) combat medic. His dream was to become a medical doctor, but the cost of medical education was simply too high — not something the Montgomery GI Bill alone could cover.

While working as a surgical technologist passing instruments at Naval Medical Center San Diego, he met engineers from a healthcare imaging company and asked one of them for help getting into IT. To his surprise, the man helped him land his first real IT job. Shea then spent the next few years training onsite at that company's headquarters in northern New Jersey, flying back and forth from San Diego. He struggled at first — he's a visual learner, and in 2007 the most common way to learn IT was in-person bootcamps or classroom training, neither of which he could afford.

Then he found video-based IT training, and never looked back. Shea is 100% self-taught. He went on to earn a Bachelor's and a Master's degree from National University in San Diego, and trained extensively alongside various government agencies and U.S. government IT contractors.

This was built for that fundi in Kenya, that hustler in Nigeria, the determined in Rwanda or Ethiopia. The hungry surviving in the UAE. The Indonesian or Filipino brother or sister — determined, but never given a chance or guidance.

If anything here is wrong, report it and we'll fix it.