This is on Xubuntu 24.04 with Xfce desktop environment, it will likely work on Ubuntu and other similair distros as well, tough it has not been tested, you must be on PulseAudio, not PipeWire for this to work reliably.
This fix only fixes the speakers, not the microphone, I have not yet worked out how to fix the microphone, if you have a fix, please comment it below, beware that if you already have a fix for the mic, this will fix the speakers but may break your mic fix.
You may use this tutorial on PipeWire or another sound server at your own risk, it may work, it may not.
This has only been tested to work on a 2017 MacBook Pro(14,1), no touch bar, though it may well work with any Intel-based MBP with the Cirrus Logic CS8409 Codec
Now, open a terminal and run;
cat /proc/asound/card0/codec* | grep CodecYou should see: Codec: Cirrus Logic CS8409 or Codec: Cirrus Logic CS8409/CS42L83, you may also see another one under this, but as long as one of the above is present, proceed
Lets install the necessary packages, and, just to be sure we don't have any old configs, reinstall them if they are already present:
Paste this into a terminal and press enter:
Caution
Important: when prompted Y/n, do not press y/enter without hesitating, carefully review what is about to happen, for example it might say: "The following packages will be REMOVED: alsa-base* alsa-utils* pulseaudio* pulseaudio-module-bluetooth* wireplumber* xubuntu-desktop* xubuntu-desktop-minimal*,” you probably see the problem here, we don't want to remove Xubuntu desktop, no press n. The point is, you must know what you are doing, apt is powerful, and it might not end well if you always press y when prompted without second thought, this is important throughout the guide
rm -rf ~/.config/pulse
rm -rf ~/.config/alsa
sudo apt install pulseaudio pulseaudio-utils pulseaudio-module-bluetooth pavucontrol alsa-base alsa-utils alsa-ucm-conf
sudo apt install --reinstall pulseaudio pulseaudio-utils pulseaudio-module-bluetooth pavucontrol alsa-base alsa-utils alsa-ucm-confThen:
systemctl --user restart pulseaudioReboot
Here we are installing the necessary packages, in case some don't exist, then reinstalling them all, to delete and reinstall anything existing
Run:
git clone https://github.com/egorenar/snd-hda-codec-cs8409.git
cd snd-hda-codec-cs8409
make
sudo make installNow, let's load the driver:
sudo modprobe snd-hda-codec-cs8409Without changing directory, run:
git clone https://github.com/frogro/cs8409-alsa-install.git
cd cs8409-alsa-installRun the installer script:
sudo ./cs8409-alsa-install.shWarning
You may get:
sudo: ./cs8409-alsa-install.sh: command not found In this case, run
chmod +x cs8409-alsa-install.sh Then retry
Run:
systemctl --user restart pulseaudioGRUB was likely changed, so open a terminal and run:
sudo reboot nowInstead of using the logout menu
Warning
Upon boot, WiFi may or may not work, this is expected, simply use the logout menu to reboot again if this is the case
Open PulseAudio Volume Control from app menu, it might say, establishing connection to PulseAudio please wait, this may take some time, from 2-120 seconds, then, open the configuration tab, it should say Analog Stereo Duplex next to profile for Built-in Audio, see below screenshot:
If not, open the menu and select it.
Now click the padlock to ensure this stays working
Just to be completely sure, open https://www.onlinemictest.com/sound-test/ in a web browser and click to test both channels
Warning
Every time you boot and log in, PulseAudio will take some time to start, around 5-60 seconds,for this time, the speaker will appear as muted in the system tray, this is normal, you can check if it has started by hovering your mouse over the speaker icon inn system tray, if it's simply muted, it will say: Volume (percentage)% (muted) if it's not connected to PulseAudio it will say: Not connected to the PulseAudio server
If anyone has any suggestions or a fix for the microphone, please comment below