When a Linux system connects to one Wi-Fi network but fails on another despite obtaining an IP address, the root cause is often driver incompatibility with specific encryption standards or channel widths. Diagnosing this requires inspecting kernel logs for authentication failures and verifying driver support for the target network's security protocol, such as WPA3 or 802.11ax (Wi-Fi 6), which older drivers may not handle correctly.
Diagnosing the Connection Failure
The symptom of obtaining an IP address but lacking full connectivity suggests that the link layer handshake succeeded, but higher-layer protocols like DHCP or DNS failed, or the connection was dropped immediately after association. This behavior is frequently observed when the wireless driver struggles with specific modulation schemes or security handshakes unique to certain routers. Unlike general connectivity issues where no IP is assigned, this scenario implies the interface is active but functionally impaired by software limitations. To begin troubleshooting, you must identify the exact wireless driver in use. Many users mistakenly attempt to check driver versions using incorrect commands. Instead, usemodinfo to view details about the loaded kernel module. For example, if your device uses the Intel iwlwifi driver, running modinfo iwlwifi will display the version, supported firmware, and configuration parameters. This step is crucial because knowing the precise driver version allows you to cross-reference known bugs or missing features in the Linux kernel documentation.
Additionally, examine the system journal for errors occurring at the moment of connection attempt. Use journalctl -k | grep -i wifi or journalctl -u NetworkManager to filter relevant messages. Look for phrases indicating "authentication failure," "deauthenticating," or "unsupported cipher." These logs provide concrete evidence of where the handshake breaks down, distinguishing between a driver issue and a router configuration problem.
Driver Compatibility and Firmware Updates
A primary culprit in these selective connection failures is outdated firmware or an incompatible driver version. Wi-Fi standards evolve rapidly, and newer routers often default to WPA3 encryption or 802.11ax (Wi-Fi 6) modes. If your Linux machine runs an older kernel or driver stack, it may fail to negotiate these modern protocols, leading to intermittent drops or inability to maintain a session even after initial association. Check if your distribution provides backported drivers or firmware packages. On Debian-based systems, ensure thefirmware-linux-nonfree package is installed and up to date. For Arch Linux, verify that the linux-firmware package is current. Updating these components can resolve compatibility gaps without requiring a full kernel upgrade.
If updating firmware does not help, consider compiling a newer driver from source or using a mainline kernel if your distribution supports it. Some wireless chips, particularly those from Realtek and Broadcom, have proprietary or poorly maintained open-source drivers. In such cases, switching to a community-maintained driver or using a USB Wi-Fi adapter with better Linux support might be necessary. Always backup your current configuration before making significant changes to network interfaces.
Network Manager Configuration Tweaks
Sometimes the issue lies not in the driver itself but in how NetworkManager interacts with the specific access point. You can force NetworkManager to use specific settings that bypass problematic auto-negotiation features. Edit the connection profile for the problematic Wi-Fi network usingnmtui or by modifying files in /etc/NetworkManager/system-connections/.
One effective tweak is to disable WMM (Wi-Fi Multimedia) or set the channel width manually. If the router broadcasts on a 160MHz channel, older drivers may struggle. Force the connection to use 20MHz or 40MHz channels only. Additionally, try disabling 802.11r/k/q fast BSS transition features, which can cause roaming issues on some setups.
Another critical setting involves the key management type. If the router supports both WPA2 and WPA3, forcing the client to use WPA2-PSK can stabilize the connection. This is done by specifying key-mgmt=wpa-psk instead of allowing auto-selection. While this reduces security slightly, it confirms whether the driver’s WPA3 implementation is the bottleneck.
Router-Side Adjustments
Before concluding the issue is purely client-side, verify the router’s settings. Ensure that the problematic network is not broadcasting on a DFS (Dynamic Frequency Selection) channel, which Linux drivers sometimes handle poorly due to radar detection requirements. Switching the router to non-DFS channels (e.g., 36-48 in 5GHz) can eliminate these interruptions. Also, check if the router is using mixed-mode security. Disabling WPA3 and sticking to WPA2-AES often resolves compatibility issues with older hardware. If you need WPA3, ensure your router is configured for WPA3-Only mode rather than transitional mode, which can confuse some clients. For more insights on resolving IP-related Wi-Fi issues, see our guide on New Wi-Fi Multiband Router Fails to Provide Proper IP Addresses on Linux Devices.Frequently Asked Questions
How do I check my Wi-Fi driver version?
Use the command modinfo [driver_name], replacing [driver_name] with the actual module name like iwlwifi or rtw88. This displays detailed information including the version and supported firmware, unlike incorrect guesses such as wl -v.
Why does my Linux box connect to WiFi but have no internet?
This usually indicates a successful link-layer association but a failure in DHCP or DNS resolution. Check dmesg for DHCP timeouts and ensure your router is assigning valid DNS servers. It can also stem from MTU mismatches or firewall rules blocking traffic post-connection.
Can I force WPA2 on a WPA3-only network?
No, you cannot force WPA2 on a network strictly configured for WPA3. However, if the router is in transitional mode, you can configure NetworkManager to prefer WPA2 by editing the connection profile’s key-management settings to explicitly use wpa-psk.
What are DFS channels and why do they matter?
DFS (Dynamic Frequency Selection) channels require the Wi-Fi card to listen for radar signals before transmitting. Some Linux drivers struggle with this process, causing disconnections. Avoiding DFS channels (typically 52-144 in 5GHz) by selecting lower channels like 36-48 can improve stability.
Should I update my kernel to fix WiFi issues?
Updating the kernel can help if the issue is related to new Wi-Fi standards like Wi-Fi 6 or WPA3, as newer kernels include updated drivers and firmware support. However, always test updates carefully, as regressions can occur. Use uname -r to check your current version.