Debian on MacBook Air – fixing Wifi after system update

Fix: Broadcom Wi-Fi “Module wl Not Found” on Debian After Kernel Update

I’m running Debian on a MacBook Wi-Fi stopped working after a system update. Found out, that this happens because a new kernel was installed, but the Broadcom driver failed to “rebuild” itself for that new version.

When running sudo modprobe wl results in:
modprobe: FATAL: Module wl not found in directory /lib/modules/...

Yes, an LLM fixed it and it’s working again. Sue me, but getting my Linux running again and perhaps sharing the working solution here will help others.

The Solution: Sync Your Headers

The DKMS (Dynamic Kernel Module Support) system needs the specific “headers” for your new kernel to compile the driver. Without them, the driver won’t build.

  1. Install the missing headers:Bashsudo apt update sudo apt install linux-headers-$(uname -r)
  2. Trigger the rebuild:Once the headers are installed, tell DKMS to look for missing modules and build them:Bashsudo dkms autoinstall
  3. Load the driver:Now you can manually load the module without the error:Bashsudo modprobe wl

Pro Tip: To prevent this in the future, ensure you have the linux-headers-amd64 (or your specific architecture) meta-package installed. This ensures that every time your kernel updates, the matching headers are pulled in automatically.

The reason it matters is that linux-headers-$(uname -r) only installs headers for your current kernel. When the next update rolls around, you’ll be right back in the same spot. Installing the meta-package ensures the headers stay updated alongside the kernel.

Here is how you set that up so you never have to manual-fix this again:

The “Permanent” Fix

Run this command to install the meta-package:

sudo apt install linux-headers-amd64

Why this works:

  • The Meta-Package: linux-headers-amd64 isn’t a set of files itself; it’s a “pointer.”
  • Automatic Sync: Every time Debian updates your kernel (e.g., from version $6.1$ to $6.2$), this package automatically pulls the matching headers for that new version.
  • DKMS Trigger: Because the headers are present during the update, DKMS will automatically rebuild your Broadcom wl module in the background before you even reboot.

By adding this, your Wi-Fi should “just work” after every future update.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.