sodcalculator

10 Tech How-To

Fix Missing Wi-Fi After Linux Kernel Upgrade

Guide 10-50470 · Updated · Step by step

If your Wi-Fi stops working right after a Linux kernel upgrade, the cause is almost always a driver that was built for the old kernel and is now incompatible or missing. The fix is to reinstall or rebuild the wireless driver for the new kernel, usually by reinstalling the driver package or using the kernel’s built-in driver module.

Why Kernel Upgrades Break Wi-Fi

Linux kernels and drivers are tightly coupled. When you upgrade the kernel, any out-of-tree drivers (those not included in the kernel source) that were compiled separately must be recompiled against the new kernel headers. If they aren’t, the driver module fails to load, and your Wi-Fi adapter disappears. Even in-tree drivers can occasionally break if the kernel changes an internal API, but that’s rarer.

Another common scenario: the upgrade replaces the kernel but leaves the old one in the boot loader. If the new kernel lacks a firmware file or the driver isn’t built, you may have no wireless until you boot the old kernel or fix the driver.

First, Check If the Hardware Is Detected

Before reinstalling anything, confirm that the system sees the wireless card at all. Open a terminal and run:

  1. lspci -k (for PCIe cards) or lsusb (for USB adapters) to see if the device is present.
  2. ip link to list network interfaces. If you see wlan0 or wlp2s0, the driver loaded; if not, it’s missing.
  3. dmesg | grep -i firmware to check for firmware loading errors.

If the device shows up but the interface doesn’t, the driver is probably not loading. If the device doesn’t show up at all, the hardware may be disabled in BIOS or the driver is entirely absent.

Reinstall the Driver Package (Most Common Fix)

For most distributions, wireless drivers are either in the kernel itself or in a separate package. Here’s what to try, in order:

  • Ubuntu/Debian: sudo apt update && sudo apt install --reinstall linux-modules-extra-$(uname -r) – this reinstalls the extra kernel modules, which often include Wi-Fi drivers.
  • Fedora: sudo dnf reinstall kernel-modules-extra
  • Arch: sudo pacman -S linux-headers and then rebuild any AUR driver packages you have.

If you installed a proprietary driver (like Broadcom’s wl or Realtek’s rtl8821ce), you need to rebuild it. On Ubuntu, sudo apt install --reinstall broadcom-sta-dkms does that automatically via DKMS. For DKMS-based drivers, the command sudo dkms autoinstall will rebuild all DKMS modules for the current kernel.

Rebuild Out-of-Tree Drivers Manually

If you compiled a driver from source (common for Realtek chips), you must recompile it after each kernel update. The general steps:

  1. Install the kernel headers: sudo apt install linux-headers-$(uname -r) (or the equivalent for your distro).
  2. Navigate to the driver source directory (e.g., ~/rtl8821ce).
  3. Run make clean, then make, then sudo make install.
  4. Load the module with sudo modprobe (e.g., modprobe 8821ce).

To avoid doing this manually every time, some drivers support DKMS. If the source has a dkms.conf file, you can run sudo dkms add ., then sudo dkms install -m -v to register it.

Boot the Previous Kernel (Temporary Workaround)

If you need Wi-Fi immediately, you can boot the older kernel from the GRUB menu. At boot, hold Shift (or press Esc on some systems) to show GRUB, select “Advanced options for Ubuntu” (or your distro’s equivalent), and choose the previous kernel. This gives you a working system while you fix the driver for the new one.

To make a kernel permanent, you can remove the new one with your package manager, but that’s not recommended long-term because you lose security updates.

Check for Firmware Issues

Some Wi-Fi chips need proprietary firmware that isn’t installed by default. If dmesg shows errors like “firmware: failed to load iwlwifi-8000C-36.ucode”, install the firmware package:

  • Ubuntu/Debian: sudo apt install linux-firmware
  • Fedora: sudo dnf install linux-firmware
  • Arch: sudo pacman -S linux-firmware

After installing, reboot. Firmware files are loaded by the kernel at boot time, so a reboot is required.

What If Nothing Works?

If you’ve tried all the above and Wi-Fi is still dead, consider these steps:

  • Check if the wireless adapter is hard-blocked: rfkill list – if it shows “hard blocked: yes”, use the physical switch or Fn key to enable it.
  • Try a live USB of a different distribution. If Wi-Fi works there, the problem is your installed system’s configuration, not the hardware.
  • Search for your specific chipset model (from lspci) plus “linux driver” to see if there’s a known issue with the latest kernel. Sometimes a kernel regression is fixed in a point release.
  • As a last resort, you can downgrade to the previous kernel entirely, but that’s a temporary solution.

Frequently Asked Questions

Why did the kernel upgrade break my Wi-Fi when it worked before?

Because the driver was compiled for the old kernel’s internal structures. When the kernel changes, the driver must be recompiled. If the driver is out-of-tree (not in the kernel source), it won’t automatically update unless you use DKMS or manually rebuild it.

Will this happen again after every kernel update?

It can, especially if you use proprietary or out-of-tree drivers. To minimize the issue, install drivers via DKMS when possible – DKMS automatically rebuilds them for each new kernel. For in-tree drivers, updates are usually seamless.

How do I know if my Wi-Fi driver is in-tree or out-of-tree?

Run lspci -k and look at the “Kernel driver in use” line. If it says something like iwlwifi or ath10k_pci, it’s in-tree. If it’s blank or shows a driver you installed manually, it’s out-of-tree. You can also check if the driver package is installed via your package manager.

Can I prevent this by not upgrading the kernel?

You can, but it’s not recommended because kernel updates often contain security fixes. Instead, learn to rebuild drivers quickly, or use a distribution that provides long-term support (LTS) kernels, which change less frequently.

Is it safe to remove the old kernel to save space?

Yes, but only after you’ve confirmed the new kernel works with your Wi-Fi for a few days. Use sudo apt autoremove on Ubuntu/Debian to remove old kernels, or sudo dnf remove --oldkernels on Fedora. Keeping one older kernel as a fallback is wise.

Why does my Wi-Fi work on a live USB but not on my installed system?

Because the live USB uses a different kernel and driver set. It might have a newer or older kernel that includes the driver, or it might load the driver from a package that isn’t installed on your system. Compare the kernel versions and driver packages between the live environment and your installed system.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →