How to Fix wifi adapter not working on Linux: Easy Step-by-Step Guide

Sharing is Caring...

If your wifi adapter is not working on Linux, you’re not alone. Many Realtek adapters don’t work out of the box, but this guide will help you fix the issue step by step using DKMS.

What’s the Real Problem?

Why Realtek Adapters Often Don’t Work on Linux

Realtek adapters are used in a wide range of devices, especially in budget and midrange laptops. Brands like HP, Lenovo, Dell, and Asus use them. The reason behind using Realtek Adapters is that they are compatible with Windows systems out of the box, and they are very cheap.

However, this is not the case for Linux systems, and here’s why:

  1. Not in the mainline kernel: The Linux kernel is the core of any Linux operating system. It establishes the connection between the hardware and software. Since the Realtek drivers are not included in the Linux kernel, this means the Linux system does not automatically know how to use the network adapters out of the box.
  2. Closed-source or undocumented: Realtek does not provide official Linux drivers for their Wi-Fi adapters. The drivers that exist are Windows-specific, closed-source, and undocumented, making it difficult for open-source contributors to develop reliable and stable unofficial drivers because they have no reference to the actual drivers.
  3. Manual installation required: As a result, you have to find unofficial third-party Linux drivers on GitHub, which need to be compiled manually and installed using tools like DKMS. This process can be tricky for new users.

What Happens When You Install Linux?

When you install a Linux distribution like Ubuntu, Mint, or Debian, during the boot process, the system looks for hardware and identifies Wi-Fi with a Realtek chipset. However, it does not load the correct drivers because there isn’t one present in the kernel out of the box.

As a result, your system doesn’t create a wireless interface (like wlan0 or wlp2s0), and no Wi-Fi networks appear.

Detailed Solution (with Explanation)

If you’re interested in a more detailed solution, let’s break down the fix step by step and understand each command.

1. Installing Build Tools & DKMS

sudo apt install build-essential dkms git
  • build-essential: This meta package includes essential compilers like gcc, g++, and make, which are necessary for compiling C/C++ programs. These tools are important for building kernel modules like the Realtek network drivers.
  • DKMS (Dynamic Kernel Module Support): This framework automatically rebuilds installed modules whenever the Linux kernel is updated. Without DKMS, you would need to manually reinstall the modules every time the kernel is updated, which can be frustrating.
  • git: Git is used for version control and is required to clone the Realtek driver repository from GitHub.

2. Cloning the Driver Repository from GitHub

git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce

Realtek does not officially maintain Linux drivers for its Wi-Fi chipsets, so you need to rely on community-managed drivers uploaded to GitHub.

3. Installing the Driver Using DKMS

sudo dkms add .
sudo dkms build 8821ce/5.6.4
sudo dkms install 8821ce/5.6.4
  • This script compiles the kernel module (the Realtek driver) for your current kernel.
  • It registers the module to DKMS, so with every kernel version, the modules get rebuilt automatically.

4. Reboot to Save Changes

sudo reboot

This command reboots your system to ensure that the newly installed modules are loaded into the kernel, allowing your system to detect the network hardware and connect to Wi-Fi.

5. Verifying Installation

iwconfig

Check if the system has recognized the wireless adapter by showing interfaces like wlan0 or wlp2s0.

Alternative Methods (if wifi adapter not working)

  1. Use a Different Driver Repository

If the Tomaspinho driver doesn’t work, you can try using a different repository.

git clone https://github.com/morrownr/8821ce
cd 8821ce
sudo ./install-driver.sh
  • This repository is an alternative with actively supported Realtek drivers for Linux and might fix any kernel compatibility issues that others lack.
  1. Use a USB Wi-Fi Adapter Temporarily

If your built-in Realtek chip still doesn’t work, you can use a Linux-compatible USB Wi-Fi dongle (e.g., TP-Link TL-WN722N (Version 1 only)) to temporarily connect to the internet and install the required drivers.

  1. Disable Secure Boot

Sometimes Secure Boot can prevent the drivers, especially unofficial ones, from loading properly. You can disable Secure Boot through the BIOS.

Steps:

  • Reboot your system and press the BIOS key (usually F2, DEL, Esc, or F10).
  • Disable Secure Boot under the “Boot” or “Security” tab.
  • Save and exit BIOS, then reinstall the driver.
  1. Use Ethernet Temporarily

If you have an Ethernet port on your device, you can use it to connect to the internet temporarily and install the Realtek drivers.

Conclusion of wifi adapter not working

Linux can feel a bit unfamiliar at first, but it’s a great operating system, and you are on an awesome journey. There will be challenges like Wi-Fi not working, but understanding the cause of the issue helps you find solutions.

Most Realtek chipsets don’t work out of the box because their drivers are not included in the Linux kernel. Thus, we have to manually install the driver using DKMS so it survives multiple kernel updates.

By following this guide step by step, you not only fix your Wi-Fi but also gain a deeper understanding of how Linux works to resolve Realtek Wi-Fi Adapter Issues on Linux.

you can also visit to solve any bugs by this website : – techonboom


Sharing is Caring...
Gurman Dhami

He writes about Linux and the open-source world with a hands-on, practical approach. Whether it's tweaking a distro, exploring terminal tools, or helping others get comfortable with Linux, he enjoys breaking things down in a way that's easy to follow. When not experimenting with new setups or diving into config files, he shares guides, tips, and personal takes to help others make the most of their Linux journey.

Leave a Comment