Wi-Fi adapters can disappear or stop working after a Linux kernel upgrade due to driver incompatibilities, missing kernel headers, or DKMS module build failures. This issue may leave your system unable to detect wireless hardware, blocking network access and interrupting daily tasks. Addressing this problem involves identifying the root cause, reinstalling or updating drivers, and ensuring all necessary kernel dependencies are present.
Install or Reinstall the Correct Wi-Fi Driver
Step 1: Determine your Wi-Fi chipset and current driver by running the following commands in your terminal. This helps identify which driver needs attention.
lspci -k | grep -A 3 -i network
sudo lshw -C network
Review the output to find your adapter model and the driver in use. For example, Intel adapters often use iwlwifi
, while many Realtek adapters use rtl8821ce
or similar modules. Broadcom adapters may require broadcom-wl
or bcma
.
Step 2: Update your package lists and install the required driver package. For Intel Wi-Fi on Ubuntu and derivatives, installing the backport driver often solves missing adapter issues after a kernel update:
sudo apt update && sudo apt install backport-iwlwifi-dkms
This command downloads and builds the latest Intel wireless driver compatible with your kernel. Reboot after installation and check if Wi-Fi is restored. If you see an error about BUILD_EXCLUSIVE
or DKMS not building the module, your kernel may not be supported by the backport package. In that case, try the next method.
Install Kernel Headers and Rebuild DKMS Modules
Wi-Fi modules that rely on DKMS (Dynamic Kernel Module Support) must be rebuilt each time the kernel updates. Missing kernel headers or failed DKMS builds often cause the Wi-Fi adapter to disappear.
Step 1: Install the kernel headers for your running kernel. This is essential for DKMS to compile driver modules:
sudo apt install linux-headers-$(uname -r)
On Arch Linux, use:
sudo pacman -S linux-headers
Step 2: Reinstall the relevant DKMS driver package. For example, to rebuild the Realtek RTL8821CE driver on Ubuntu or Mint:
sudo apt reinstall rtl8821ce-dkms
For Broadcom adapters on Arch Linux, ensure broadcom-wl-dkms
is up-to-date and rebuilt:
sudo pacman -S broadcom-wl-dkms
sudo dkms autoinstall
Monitor the output for errors. If the DKMS build fails, review the error messages and check if patches are required for your kernel version. On Arch, you may need to manually patch and rebuild the DKMS package when major kernel changes occur. Consult your distribution’s forums or bug tracker for updated instructions if the package does not support your kernel yet.
Manually Compile and Install Drivers from Source
When official packages or backports are unavailable or incompatible, manually compiling the driver from source can restore Wi-Fi functionality. This is common for Realtek chipsets on new kernels.
Step 1: Clone the driver source repository. For the Realtek rtw88 driver:
git clone https://github.com/lwfinger/rtw88.git
cd rtw88
Step 2: Build and install the driver. Ensure you have build-essential
and kernel headers installed:
make
sudo make install
sudo modprobe rtw_8821ce
If git clone
fails due to network issues, try connecting via Ethernet, USB, or Bluetooth tethering to download the source. After installation, reboot and verify Wi-Fi is operational.
Switch or Patch Drivers for New Kernel Versions
Major kernel upgrades can break compatibility with proprietary or out-of-tree drivers. For Broadcom adapters on Arch Linux, updating or patching the broadcom-wl-dkms
package is sometimes necessary.
Step 1: Check for updated PKGBUILD files and patches in your distribution’s repositories or forums. Download the latest patches and apply them as needed:
git clone https://github.com/archlinux/svntogit-community.git --single-branch --branch 'packages/broadcom-wl-dkms' broadcom-wl-dkms
cd broadcom-wl-dkms/trunk/
curl -O
git apply
makepkg -rsi
This method ensures the DKMS module builds correctly for your kernel. If you are not comfortable with manual patching, wait for the package maintainer to release an updated version or report the issue to your distribution’s bug tracker.
Troubleshoot Persistent Wi-Fi Adapter Disappearance
Occasionally, the Wi-Fi adapter is not detected at all after a kernel update, especially on systems like Debian or Linux Surface. This may be due to conflicts between custom kernel modules and distribution updates.
Step 1: Confirm that the hardware is not being recognized by running:
lspci | grep -i network
lsusb
rfkill list all
If the adapter is missing from all outputs, try booting into an older kernel from your boot menu (GRUB) to verify if the issue is kernel-specific. If Wi-Fi returns on the older kernel, the problem is related to driver compatibility with the new kernel.
Step 2: If using custom kernels or third-party repositories (such as for Surface devices), check upstream projects for compatibility notes. Sometimes reverting to a previous kernel or waiting for a project update is the best course. For persistent hardware detection failures, reflashing the OS may temporarily restore functionality, but the problem will likely recur after updates unless a compatible driver is installed.
Additional Tips and Maintenance
- After fixing Wi-Fi, monitor future kernel updates. Some drivers require recompilation or reinstallation after every kernel upgrade.
- Automate driver rebuilds with a custom script or consider holding the kernel at a working version to avoid repeated disruptions.
- For Realtek and Broadcom chipsets, check community forums and official documentation for the latest driver instructions and patches.
- Always verify that Secure Boot is disabled if using unsigned third-party modules, as Secure Boot can block driver loading.
Restoring Wi-Fi after a Linux kernel upgrade involves careful driver management and attention to kernel dependencies. Keeping your drivers and kernel headers in sync will minimize downtime and keep your wireless connection reliable.
Member discussion