How-To: Debian 12 on a 2015, 5K 27-inch iMac

The Computer

This 5K, 27-inch, mid-2015 iMac was the subject of a previous post. Specs are:

  • 1 TB SSD (upgraded from the standard 1 TB, 7200 RPM HDD)
  • 4-Core Intel Core i5 “Haswell” @ 3.33 GHz
  • 12 GB DDR3 RAM @ 1600 MHz
  • AMD Radeon R9 M290 with 2 GB GDDR5 VRAM
  • 4xUSB 3 ports
  • SDXC card slot
  • Broadcom BCM57766 Gigabit Ethernet Controller
  • Broadcom BCM4360 802.11ac Wireless Network Adapter

Goal is pretty simple: get GNU/Linux Debian 12 “bookworm” to work on the iMac. And by that, I mean having working:

  • Sound
  • Video
  • Wireless Networking
  • USB

Getting Things to Work


Just like for the 2012 MacBook Air, or basically any computer that’s capable to USB booting, creating an installation media is just a

# dd if=/path/to/debian.iso of=/dev/rdiskX bs=4M


The installation process is familiar… except there’s no Wi-Fi! Be prepared to connect the computer via Ethernet since the netinst image only provides a handful of packages and expects Internet connectivity in order to remotely fetch what you’re willing to install.

More on Wi-Fi after the break.

For the sake of trying something else than my go-to, by-default ext4 and Xfce choices, I’ve decided to give Btrfs and KDE a shot.

Also, because this is a physical, desktop GNU/Linux computer, I install a few power-management related packages (tip: tlp is also a nice package for laptop computers):

# apt install thermald apci-support linux-cpupower
the break


Unlike the older Broadcom BCM43XX chipsets found in pre-2013 Mac computers, which required the reverse-engineered b43 driver and a firmware to properly function, the newer ones do not and are not compatible with this driver.

For these newer chipsets, like the Broadcom BCM4360 one in the iMac, Broadcom published a license-restricted, Linux-compatible driver: the Linux STA driver (also called by its module name, wl).

Because of its restrictive license, this driver isn’t available in the main repository, but it can be found in the non-free one. And because it isn’t in non-free-firmware, it isn’t included in the Bookworm install images.

The wl driver provided in non-free uses the Dynamic Kernel Module Support framework (shortened to DKMS) to automatically rebuild the module every time a kernel is installed on the system, allowing it to function on different kernels, be it by variant or version.

The first step is to add the non-free repository to APT alongside main and non-free-firmware by modifying /etc/apt/sources.list like so:

deb bookworm main non-free non-free-firmware
deb bookworm-security main non-free non-free-firmware
deb bookworm-updates main non-free non-free-firmware

and then install the broadcom-sta-dkms package which has dependencies on DKMS and the Linux headers required to automagically build the kernel module:

# apt install broadcom-sta-dkms

After a reboot, you can quicky check with dmesg if the wl driver has been loaded and got a chipset attached to it:

# dmesg | grep wl
[   12.075820] wl: loading out-of-tree module taints kernel.
[   12.075826] wl: module license 'MIXED/Proprietary' taints kernel.
[   12.078493] wl: module verification failed: signature and/or required key missing - tainting kernel
[   12.128397] wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller (r587334)
[   12.129905] wl 0000:03:00.0 wlp3s0: renamed from wlan0


Even though the sound chipset gets detected by the right kernel module, it needs an extra, very simple configuration option for sound to properly work on the iMac.

For that, we’ll create a new configuration file that tells modprobe to pass the model option with value imac27 when it loads the snd-hda-intel kernel module:

echo "options snd-hda-intel model=imac27" > /etc/modprobe.d/snd-hda-intel.conf

Reboot the iMac, and that’s it! Sound works.


Contrary to the 2012 MacBook Air, getting GNU/Linux Debian 12 “bookworm” to properly work on my 5K, 27-inch, mid-2015 iMac required a couple more steps.

Considering that:

  • having Wi-Fi needs a DKMS module that’s automagically rebuilt every time I update the system so it continues to function;
  • having sound needs a new configuration file with a simple key-value parameter

it doesn’t sound like a big burden at all, especially since everything else seems to work pretty nicely!

USB and Ethernet works (thanks Captain Obvious), Bluetooth as well, and the AMD GPU is really getting along with KDE, even at 5K resolution and a 175% scale.

By Pierre Blazquez

I mess with computers, drink too much coffee and listen to music at max volume.

Leave a comment

Your email address will not be published. Required fields are marked *