A Linux operating system refusing to connect to a wireless network is one of the most common issues when migrating from proprietary systems. Users may encounter a complete absence of the adapter from the device list or an endless loop of password prompts, interrupted by a connection error. Often, the root cause is the lack of proprietary drivers for a specific network card model, which are not included in the distribution's default kernel.
Unlike commercial operating systems, where vendors often provide ready-made installers, in the open source world, the solution requires an understanding of the network manager architecture. You'll have to interact with the terminal, check kernel logs, and possibly manually compile modules. However, by mastering basic diagnostic principles, you'll not only be able to restore your internet connection but also gain a deeper understanding of your system's operation.
The first thing to realize is that the problem is almost always solvable if the hardware is physically in good working order. Modern distributions, such as Ubuntu, Fedora or Linux Mint, have an excellent driver base, but specific chipsets from Broadcom or Realtek may require additional action. Don't panic if you see a black terminal screen—it's your most powerful tool in this situation.
Hardware diagnostics and adapter availability
Before digging into configuration files, you need to make sure the operating system even "sees" your wireless device. It's often the case that the adapter is disabled at the hardware level or blocked software-wide via rfkill. For an initial check, use the utility lspci for internal cards or lsusb for external USB whistles.
Run the command in the terminal to get a list of all connected PCI devices. If the output contains a line mentioning "Wireless," "WiFi," "802.11," or manufacturer names like Intel, Qualcomm Atheros, which means the system has detected the physical presence of the card. The absence of such a record may indicate a hardware malfunction or a BIOS/UEFI disablement.
lspci | grep -i net
Next, you should check the status of the locks. Utility rfkill Shows the status of all wireless interfaces. If you see the "Hard blocked" status, it means the adapter is disabled by a physical switch on the laptop case or a key combination (e.g., Fn+F2). The "Soft blocked" status indicates a software block that can be removed with a command.
⚠️ Important: If the adapter is hard blocked, software methods won't help. Be sure to check the physical switches on the device or access the BIOS to ensure the wireless module isn't disabled there.
To remove the software lock, use the following command, which will unblock all wireless interfaces. This is a common solution when WiFi stops working after a reboot or sleep.
sudo rfkill unblock all
Checking and installing WiFi drivers
The most difficult part of the process is working with drivers. The Linux kernel (kernel) contains many open-source drivers, but some manufacturers don't provide specifications, so drivers have to be written by enthusiasts. You can check which driver is used (or not used) for your device using the command lspci -k, which will show the device binding to the kernel module.
The line "Kernel driver in use" must contain the module name, for example, iwlwifi for Intel or ath9k for Atheros. If you see the message "Kernel modules available," but the driver isn't loaded, or the line is empty, then the driver is missing. In Debian/Ubuntu-based distributions, there is often a package linux-firmware, containing firmware for many cards.
| Manufacturer | A typical kernel module | Firmware package (Debian/Ubuntu) | Support status |
|---|---|---|---|
| Intel | iwlwifi | linux-firmware | Excellent |
| Realtek (RTL88xx) | rtl88xxau / rtl8723 | firmware-realtek | Needs attention |
| Broadcom | b43 / wl | firmware-b43-installer | Proprietary |
| Atheros | ath9k / ath10k | linux-firmware | Excellent |
If the driver is missing, you'll need to find its source code or a pre-built package for your distribution. For popular but problematic chips Realtek Often you have to clone a GitHub repository and compile the module manually. This requires installing packages. build-essential And linux-headers, corresponding to your kernel version.
⚠️ Warning: When installing drivers from third-party repositories (PPA) or compiling from GitHub, always check the date of the last code update. A driver that hasn't been updated in three years may not work on a modern Linux 6.x kernel.
Where can I find drivers if they are not in the repository?
First, visit the hardware manufacturer's official website. If you can't find anything there, search GitHub for "card_model linux driver." Forums like forum.ubuntu.ru or archlinux.org, where users share up-to-date instructions, are also helpful.
Working with NetworkManager and nmcli
Modern distributions use NetworkManager for connection management. This is a daemon that processes connections and saves network profiles. You can interact with it through a graphical interface, but for diagnostics and troubleshooting, a command-line utility is much more effective. nmcliIt allows you to see detailed information about the status of devices and the causes of failures.
Team nmcli device status will show a list of all network interfaces. We are interested in the device type wifiIf its status is "disconnected," try initiating a network scan. If the status is "unavailable," this almost always indicates a driver issue or an rfkill block, as discussed earlier.
nmcli device wifi list
If the network appears in the list but you can't connect, try deleting the old connection profile and creating a new one. Sometimes the profile configuration becomes corrupted, especially after changing the router password or security settings. Deleting the profile forces the system to re-request data, ignoring old cached errors.
☑️ NetworkManager verification checklist
IP address conflicts and DNS settings
Even if you successfully connect to the access point, the internet may not work due to problems at the IP protocol level. It often happens that the router does not issue an address via DHCP, or the assigned address conflicts with another device on the network. In Linux, you can force a renewal of the IP address lease or assign a static address.
To force an update via DHCP, use the utility dhclientFirst, you need to release the current address and then request a new one. This often helps if the router is frozen and doesn't see requests from the client, or if the Lease Time has expired and the client hasn't renewed it correctly.
sudo dhclient -r && sudo dhclient
Another common reason for the Internet not working when WiFi is working is problems with DNSYou're connected, you can ping IP addresses (e.g., 8.8.8.8), but you can't access websites using their domain names. In this case, you need to check the file. /etc/resolv.confIt may be overwritten with invalid data or be empty.
⚠️ Note: The resolv.conf file on modern systems is often a symbolic link to a file managed by NetworkManager or systemd-resolved. Direct editing may be overwritten by the system. Use nmcli or configure static DNS in the router interface.
For a quick DNS check, try manually entering Google or Cloudflare public servers in the connection settings via nmcliThis will rule out issues with your provider's DNS server. It's also worth checking whether IPv6 is enabled if your provider doesn't support it—IPv6 connection attempts sometimes cause timeouts.
Problems with energy saving and operating mode
One of the hidden and annoying causes of unstable WiFi performance in Linux is an aggressive power-saving policy. The wireless card driver may attempt to conserve power by going into sleep mode, leading to connection drops or failure to reconnect after waking from sleep. This is especially true for laptops.
Parameter power_save in the driver configuration iwlwifi (for Intel) or similar settings from other manufacturers are often set to 1 (enabled) by default. Disabling this mode can significantly improve connection stability, although it will slightly increase power consumption.
To disable power saving temporarily, you can use the command iwconfig, by setting the parameter power to off. However, to apply this change permanently, you need to create a configuration file in the directory /etc/modprobe.d/This will require superuser rights and a system reboot.
sudo iwconfig wlan0 power off
It's also worth paying attention to the router's operating mode. Some older adapters in Linux don't work well with modern encryption standards. WPA3 or a channel width of 80+80 MHz. Try switching your router to compatibility mode (WPA2/WPA Mixed) or changing the channel width to 20/40 MHz to eliminate compatibility issues.
Log analysis for deep diagnostics
When standard methods fail, the only source of truth is system logs. In Linux, all hardware and driver information is recorded in the kernel log. The utility dmesg Allows you to view messages generated by the WiFi driver during boot and connection attempts.
Look for lines containing the words "firmware," "error," "fail," or the name of your chipset. These often contain a message stating that the firmware file was not found or the microcode version is incompatible. This indicates the need to install a specific firmware package.
dmesg | grep -i firmware
In addition, the logs of NetworkManager itself are stored in the system log. journalctl With a filter by service name, you can trace the connection sequence. You'll see exactly at what stage the failure occurs: scanning, authentication, or obtaining an IP address.
Log analysis requires careful attention, but it allows you to find a unique error specific to your hardware-kernel-driver combination. If you find a specific error in the logs, searching for it online will almost always lead to a ready-made solution on the developer forums.
How to read dmesg in real time?
Use the command dmesg -w or dmesg --followIt won't close after displaying the history, but will continue to display new messages as they arrive. Launch it, then try connecting to WiFi—you'll see the progress dynamically.
What should I do if WiFi disappears after a kernel update?
During a kernel update, manually installed driver modules (DKMS) might not be rebuilt automatically. Try booting to the previous kernel version via the GRUB menu. If WiFi works there, the issue is related to the compatibility of the new kernel with the driver.
Does resetting network settings help?
Yes, as a last resort, you can delete all NetworkManager configuration files (located in /etc/NetworkManager/system-connections/), but this will require you to re-enter passwords for all known networks. This is a "core" method, which should be used only when all else fails.
Can antivirus software block WiFi in Linux?
In Linux, traditional antivirus programs rarely interfere with network drivers. However, if you have a firewall installed (such as ufw or firewalld), check its rules. Blocking DHCP ports (67, 68) or DNS (53) can simulate a lost connection.