Connection Wi-Fi adapter In Linux, driver installation often becomes a headache for users, especially when it comes to non-standard hardware or newer distributions. Unlike Windows, where drivers are usually installed automatically, in Linux the process can require manual steps—from checking adapter compatibility to compiling kernel modules. This article will help you figure out why your TP-Link, Realtek or Broadcom The adapter is not detected by the system, and what should I do to make it work?
We will cover all the stages: from equipment diagnostics to network setup through NetworkManager or wpa_supplicantWe will pay special attention to typical errors, such as missing drivers. rtl8821ce for popular adapters or problems with secure boot in UEFI systems. If you're a beginner, don't worry: the instructions include screenshots of commands and explanations. For experienced users, advanced methods are provided, including manually compiling drivers from source code.
Before you begin, make sure your adapter is physically connected to the USB port (for external devices) or that the antennas are undamaged (for PCIe modules). In 90% of cases, the problem isn't a "broken" Linux system, but rather a missing driver or a security system blocking its loading.
1. Checking the compatibility of the Wi-Fi adapter with Linux
The first step is to find out if your adapter even supports Linux. Even if the box says "Plug & Play," that doesn't guarantee kernel compatibility. LinuxThe most problematic chips are Realtek RTL8188, RTL8812 and some models Broadcom, which require proprietary drivers.
To find out the device ID, run the following in the terminal:
lsusb
or for PCIe adapters:
lspci -knn | grep -iA3 net
Look for lines mentioning Network controller or WirelessFor example, the output might look like this:
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
Key identifiers - This 10ec:c821 (vendor:device). They need to be checked on the website. Linux Wireless Wiki Or in the USB-ID database. If the adapter is listed there, it means support is implemented at the kernel level. If not, you'll have to search for drivers manually.
- 🔍 Popular supported chips: Intel AX200, Atheros AR9485, Mediatek MT7921
- ⚠️ Problematic models: Realtek RTL8192EU, RTL8811CU, Broadcom BCM4313 (require manual installation)
- 🛠️ Solution for unsupported: purchasing a chip adapter Intel or Atheros, or compiling the driver from source
⚠️ Attention: Some adapters (eg. TP-Link Archer T4U on a chip RTL8812AU) have several versions with different identifiers. Check the device's sticker for the exact model—this will save you hours of debugging.
2. Installing drivers for the Wi-Fi adapter
If your adapter isn't automatically detected, the system likely lacks the required driver. There are three ways to install it:
- Through distribution repositories (the simplest method)
- Via DKMS (for kernel modules that need to be rebuilt when updating the kernel)
- Manual compilation (for the freshest or most exotic chips)
First, try installing the driver from the standard repositories. For example, for Realtek RTL8821CE V Ubuntu/Debian:
sudo apt update
sudo apt install rtl8821ce-dkms
For Arch Linux:
sudo pacman -S rtl8821ce-dkms-git
If there is no package, try searching by chip name:
apt search rtl8821
- 📦 DKMS packages: automatically recompiled when the kernel is updated. Ideal for Realtek And Broadcom.
- 🔧 Manual compilation: relevant for RTL8852AE or MT7921, where there are no ready-made packages.
- 🚫 Blacklist: some drivers (eg
b43For Broadcom) conflict withssbThey need to be excluded throughblacklist.
If the driver is installed but the adapter does not work, check if the kernel module is loaded:
lsmod | grep rtl
Or for Intel:
lsmod | grep iwlwifi
⚠️ Attention: In systems with Secure Boot Self-signed kernel modules (such as those compiled manually) will not load. You will need to either disable Secure Boot in the BIOS or sign the module with your own key. Instructions for Ubuntu: sudo mokutil --disable-validation.
3. Configuring the network via NetworkManager
When the driver is installed and the adapter is detected (check through ip a or iwconfig), all that remains is to configure the network connection. In most distributions, this is handled by NetworkManager — a graphical tool with CLI support.
To connect to Wi-Fi:
- Click on the network icon in the tray (usually in the upper right corner).
- Select your network from the list.
- Enter the password and confirm the connection.
If the GUI is not available (for example on a server), use nmtui:
sudo nmtui
For advanced users, a console utility is available. nmcli:
nmcli dev wifi list # Show available networks
nmcli dev wifi connect "SSID" password "PASSWORD"
- 🔄 Auto-connection:
nmcli connection modify "SSID" connection.autoconnect yes - 🔒 Hidden networks:
nmcli dev wifi connect "SSID" password "PASSWORD" hidden yes - 📡 Network Priority: Networks with higher priority are connected first.
The adapter is detected in `ip a`|Driver loaded (`lsmod`)|Network visible in `nmcli dev wifi list`|Password entered correctly|No IP address? Check `dhclient wlan0`-->
If the connection is not established, check the logs:
journalctl -u NetworkManager --no-pager | grep -i wifi
4. Manual connection via wpa_supplicant
In minimalist distributions (for example, Arch Linux without a graphical shell) or on servers NetworkManager may not be installed. In this case, use wpa_supplicant — a standard tool for managing Wi-Fi in Linux.
First, create a configuration file:
wpa_passphrase "SSID" "PASSWORD" | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
Then connect to the network:
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
sudo dhclient wlan0
To make the connection automatically at boot, add to /etc/rc.local (or create a service systemd):
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
dhclient wlan0
| Team | Description |
|---|---|
iwconfig |
Shows a list of wireless interfaces and their status. |
iwlist wlan0 scan |
Scans available networks and displays their parameters (channel, encryption) |
ip link set wlan0 up |
Activates the wireless interface (if it is disabled) |
dhclient -r wlan0 |
Releases the current IP address before reconnecting. |
⚠️ Attention: If you usewpa_supplicantin the system with systemd-networkd, a conflict may occur. Disable it.systemd-networkdor configure it to work with Wi-Fi viawpa_supplicant.
5. Solving common problems
Even after installing the drivers, Wi-Fi may still be unstable. Here are some common issues and their solutions:
- 🔌 The adapter switches off periodically:
- Check it out
dmesg | grep firmware- the firmware file may be missing (firmware). - For Realtek install the package
linux-firmware. - Disable power saving:
iwconfig wlan0 power off.
- Check it out
- 🚫 The network is not visible in the list:
- Check region:
sudo iw reg set RU(replaceRUto your country). - Make sure your router is not hiding the SSID.
- Update the list of networks:
sudo iwlist wlan0 scan.
- Check region:
- 🐢 Slow speed:
- Check the network standard (802.11n/ac/ax) via
iwconfig. - Turn it off
802.11n, if the adapter does not support:sudo iwconfig wlan0 11n off. - Change the channel on your router (avoid congested channels 1, 6, 11).
- Check the network standard (802.11n/ac/ax) via
Critical error for Realtek RTL88x2bu adapters: If the speed drops to 1 Mbps after connecting to a 5 GHz network, update the driver to version 5.13.1 or later. The issue is related to an error in processing WPA3 encrypted packets.
6. Advanced settings: monitoring and optimization
To diagnose problems or optimize your connection, it's helpful to know a few advanced commands:
- 📊 Signal monitoring:
watch -n 1 "cat /proc/net/wireless"- shows the signal and noise level in real time. - 🔍 Traffic analysis:
sudo tcpdump -i wlan0 -n -c 100— captures 100 packets for analysis. - 📶 Antenna selection: If the adapter has several antennas, you can choose the best one:
iwconfig wlan0 txpower 20(set transmit power).
For continuous optimization, add in /etc/rc.local:
iwconfig wlan0 power off # Disable power savingiw reg set RU # Set the correct region
echo "options iwlwifi 11n_disable=8" > /etc/modprobe.d/iwlwifi.conf # For Intel adapters
If you are using the adapter in mode monitor (for example, for Kali Linux), put it into this mode:
sudo airmon-ng check killsudo airmon-ng start wlan0
sudo airodump-ng wlan0mon
⚠️ Attention: In some countries (such as Germany), using monitor mode to intercept other people's networks is prohibited by law. Ensure you comply with the law.
7. Alternative methods: USB tethering and external adapters
If your built-in Wi-Fi adapter still doesn't work, there are two workarounds:
- USB tetring from a smartphone — a temporary solution for internet access.
- External USB adapter — a permanent solution with guaranteed Linux support.
To use USB tethering, connect your phone via USB, enable modem mode in your phone's settings, and do the following:
sudo ifconfig usb0 up
sudo dhclient usb0
Among the external adapters with the best Linux support:
- 🏆 TP-Link TL-WN722N (chip AR9271, supported out of the box)
- 🥈 Alfa AWUS036ACH (chip RTL8812AU, requires a driver
rtl8812au-dkms) - 🥉 Intel AX200 (PCIe, better 802.11ax support in Linux)
FAQ: Frequently Asked Questions about Wi-Fi Connections in Linux
My adapter is detected but won't connect to the network. What should I do?
Please check the following points:
- Make sure you enter the correct password (case sensitive!).
- Check if your firewall is blocking the connection:
sudo ufw disable(temporary shutdown). - Update the list of networks:
sudo nmcli dev wifi rescan. - If used
wpa_supplicant, check the config for errors:wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 -d(debug mode).
How do I know which chip my adapter uses?
Run the command lsusb or lspci -v and find the line with Network controller. Identifier in the format [vendor:device] (For example, 10ec:c821) will point to a specific chip. Then search for it on the website. Linux Wireless.
Is it possible to use a Windows driver for a Wi-Fi adapter in Linux?
Technically yes, with the help of the project NDISWrapper, but this is not recommended. Firstly, performance will be lower. Secondly, NDISWrapper does not support modern standards (such as 802.11ac). It's better to find a native driver or purchase a compatible adapter.
Why did Wi-Fi stop working after updating the kernel?
This is a common issue with drivers installed via DKMS. When updating the kernel, the modules are not automatically rebuilt. Solution:
sudo dkms autoinstall
sudo modprobe -a <module_name> # For example, rtl8821ce
If the module doesn't rebuild, it may be incompatible with the new kernel version. Check the log: sudo dkms status.
How to connect to a hidden Wi-Fi network?
For NetworkManager:
nmcli dev wifi connect "SSID" password "PASSWORD" hidden yes
For wpa_supplicant add the following line to the config:
scan_ssid=1
After that, run wpa_cli reconfigure.