Hitting a wall with WiFi on your Ubuntu 22.04 system? You’re definitely not the only one facing this. Wireless network glitches can seriously disrupt your workflow or downtime, especially when a stable connection is crucial. This guide offers step-by-step instructions based on real-world experience to help you get your Ubuntu WiFi running smoothly again.
Before we jump into the Ubuntu-specific troubleshooting, let’s quickly cover some first checks:
- Power cycle your router and modem: It sounds simple, but restarting your network hardware often resolves temporary connection hiccups.
- Check the physical WiFi switch: Some laptops have a dedicated hardware switch or function key combination to toggle WiFi. Make sure it’s switched on.
- Test connection with other devices: Connect your smartphone, tablet, or computer to the same WiFi network. This helps figure out if the issue lies with your network itself or specifically with your Ubuntu machine.
- Enable automatic connection: To prevent future connection delays, double-check that NetworkManager is set to automatically connect to your preferred WiFi network when your system starts up.
This comprehensive troubleshooter will walk you through various steps for resolving WiFi problems on Ubuntu 22.04. We’ll explore potential issues ranging from DNS settings and driver complications to checking your WiFi radio’s status and the NetworkManager service. Each solution is presented clearly to make the process as painless as possible.
This article was produced in collaboration with net2.com.
1. Investigating DNS Settings
While Domain Name System (DNS) issues aren’t the most frequent culprit for WiFi problems, they’re definitely worth investigating if you can connect to the network but can’t browse websites. We’ll use the nmcli
command-line tool, which is part of NetworkManager, to look into this. Think of nmcli
as your handy command-line interface for managing network connections in Ubuntu.
Read: How to fix Bluetooth connection problems on Ubuntu 22.04
Step 1: Identify your WiFi network interface
Open your terminal (Ctrl+Alt+T) and run the following command:
nmcli device status
Or the shorter version:
nmcli d
Look for the entry where the “TYPE” is “wifi”. Note down the name listed in the “DEVICE” column (it often looks like wlan0
or wlpXsY
).
Step 2: Check the current DNS configuration
In the terminal, replace with the actual device name you found in the previous step and execute:
nmcli device show | grep IP4.DNS
Alternatively, to see DNS settings for all connections:
nmcli dev show | grep DNS
Step 3: Test connectivity to your router
First, find your router’s IP address. It’s usually listed as the “GATEWAY” in the output of the nmcli device show
command. Once you have it, try pinging it:
ping
Press Ctrl+C to stop the ping. Successful replies mean you can reach your router.
Step 4: Test connectivity to an external DNS server
If pinging your router worked, try pinging a reliable external DNS server, like Google’s (or the local DNS resolver often at 127.0.0.53 if systemd-resolved is active):
ping 8.8.8.8
Or, try pinging the local resolver if configured:
ping 127.0.0.53
If pinging the router succeeds but pinging an external address fails, or if the DNS servers shown in Step 2 seem incorrect, you might have a DNS issue. If other devices on your network have the same problem, consider changing the DNS settings on your router (e.g., to Google’s Public DNS: 8.8.8.8
and 8.8.4.4
).
If the DNS problem seems isolated to your Ubuntu 22.04 machine, you can manually set the DNS servers using the graphical interface:
- Open Settings > Network. (Or run
gnome-control-center network
in the terminal). - Find your active WiFi connection and click the gear icon (⚙️) next to it.
- Navigate to the IPv4 tab.
- Ensure the Method is set to Automatic (DHCP).
- Turn off the “Automatic” toggle next to DNS.
- In the DNS Servers field, enter
8.8.8.8, 8.8.4.4
(separated by a comma). - Click Apply.
After applying the changes, it’s a good idea to restart the NetworkManager service or simply reboot your computer:
sudo systemctl restart NetworkManager
Read: How to Set Up Bluetooth on Ubuntu 22.04
2. Checking the WiFi Radio Status
Sometimes, the WiFi radio itself might be disabled in software (distinct from a physical hardware switch). Let’s check its status using nmcli
:
nmcli radio
Or use the device status command again:
nmcli d
Look at the state for “wifi”. If it says “disabled” or “unavailable”, try enabling it:
nmcli radio wifi on
Once enabled, scan for available networks:
nmcli device wifi list
To connect to a specific network (e.g., one named “MyHomeWiFi”), use this command, replacing the name and password accordingly:
nmcli device wifi connect "MyHomeWiFi" password ""
Remember, WPA passwords typically need to be between 8 and 63 characters.
You can also watch NetworkManager’s activity in real-time, which can be helpful for diagnosing connection attempts:
nmcli monitor
Press Ctrl+C to stop monitoring.
3. Checking the Network Manager Service
If NetworkManager itself isn’t running or has somehow been uninstalled, you won’t be able to manage your network connections easily. First, check its status:
systemctl status NetworkManager
If it’s inactive or missing, try starting it:
sudo systemctl start NetworkManager
And enable it to start on boot:
sudo systemctl enable NetworkManager
If the service is missing entirely, you might need to reinstall it. It’s always good practice to update your package lists first:
sudo apt update
sudo apt install network-manager
4. Dealing with Missing Driver Modules (Firmware)
Seeing a message like “No Wi-Fi Adapter Found” often indicates that your system is missing the necessary driver (kernel module) or firmware for your specific wireless adapter. Firmware is a small piece of software that allows the operating system (Ubuntu) to communicate correctly with the hardware (your WiFi card).
Without the right driver or firmware, Ubuntu simply won’t know how to use the adapter. You’ll need to identify and install the correct software for your hardware. In some cases, older or very new adapters might lack compatible drivers for Ubuntu 22.04, potentially requiring a hardware change.
Read: How to display your sound card details on the terminal on Ubuntu 22.04
Here’s how you can approach troubleshooting driver issues:
A. Check Hardware Compatibility and Available Drivers:
Ubuntu and the Linux kernel support a vast range of hardware out-of-the-box. You can often find community-maintained lists of supported wireless adapters online. First, identify your adapter model (see Section 5 below) and then search for its compatibility with Ubuntu 22.04 and the required driver name.
Ubuntu’s “Software & Updates” application also has an “Additional Drivers” tab that can automatically detect and offer to install proprietary drivers if needed (requires an internet connection, possibly via Ethernet or USB tethering).
B. Handling Proprietary or Restricted Drivers:
Some WiFi adapter manufacturers (like Broadcom or certain Realtek models) provide drivers that aren’t open-source. These are often referred to as “proprietary” or “restricted” drivers. As mentioned above, the “Additional Drivers” tool is the easiest way to install these if detected.
Alternatively, you might need to check the manufacturer’s website for specific Linux driver packages, though this is less common. If official Linux drivers aren’t available and the open-source ones don’t work, switching to a well-supported adapter (often Intel or Atheros-based) might be the most reliable long-term solution.
C. Using Windows Drivers via NDISwrapper (Use with Caution):
NDISwrapper is a compatibility layer that attempts to allow the use of Windows wireless network drivers on Linux systems. This should be considered a last resort if native Linux drivers (open-source or proprietary) are unavailable or non-functional. NDISwrapper can be complex to set up and doesn’t always provide stable performance.
You would typically need to locate the `.inf` and `.sys` files from the Windows driver package for your adapter. Search for specific guides on “NDISwrapper Ubuntu 22.04” if you need to explore this path, but be prepared for potential difficulties.
Manually Managing Kernel Modules (Drivers):
If you know the name of the required kernel module (driver) for your adapter, you can manage it manually.
To see which modules are currently loaded:
sudo lsmod
To attempt loading a specific module (replace `your_module_name` with the actual name, e.g., `rtl8723ae`):
sudo modprobe your_module_name
You can run `sudo lsmod | grep your_module_name` afterwards to verify if it loaded successfully.
Ensuring Drivers Load Automatically at Boot:
If manually loading the module with `modprobe` works, but it doesn’t load automatically on reboot, you can add it to the `/etc/modules` file. Edit the file using a text editor like `nano`:
sudo nano /etc/modules
Add the name of your module (e.g., `rtl8723ae`) on a new line at the end of the file. Save the file (Ctrl+O in nano, then Enter) and exit (Ctrl+X). The module should now load automatically the next time you boot.
D. Installing Additional Drivers from the Ubuntu ISO Image:
If you don’t have an active internet connection (e.g., via Ethernet) to use the “Additional Drivers” tool, but you still have the Ubuntu 22.04 installation ISO file (on a USB drive or downloaded), you can sometimes use it as a source for drivers:
- Locate the ISO: Ensure you have the Ubuntu 22.04 ISO file accessible on your system. If not, you might need another computer to download it and transfer it via USB.
- Mount the ISO: Open a terminal and run these commands:
sudo mkdir -p /media/cdrom cd ~ # Navigate to your home directory or where the ISO is located sudo mount -o loop ubuntu-22.04.*-desktop-amd64.iso /media/cdrom # Adjust the ISO filename if necessary
- Use Software & Updates: Now, open the “Software & Updates” application. Go to the first tab (“Ubuntu Software”) and check the box for “Installable from CD-ROM/DVD”. Then, switch to the “Additional Drivers” tab. It should now be able to scan the mounted ISO for any relevant proprietary drivers for your hardware. Select the desired driver and click “Apply Changes”.
- Unmount the ISO (Optional): Once done, you can unmount the ISO:
sudo umount /media/cdrom
5. Confirming Device Detection by the System
Before troubleshooting drivers, let’s first confirm that Ubuntu can actually *see* your wireless hardware. Even if it’s physically installed or plugged in, the system needs to recognize it at a basic level.
Step 1: Check for USB Wireless Adapters
If your adapter connects via USB, run:
lsusb
Look for a line that mentions your wireless adapter manufacturer or model.
Step 2: Check for Internal (PCI/PCIe) Wireless Cards
For internal cards connected via PCI or PCIe slots, use:
lspci
Scan the output for entries like “Network controller” or “Ethernet controller” that correspond to your wireless card (it might mention brand names like Intel, Realtek, Broadcom, Atheros). Seeing your device listed here confirms basic hardware detection.
Step 3: Get Detailed Network Hardware Information
For a more focused view of network devices and the drivers they are attempting to use, the `lshw` command is very useful. If it’s not installed, you can install it:
sudo apt update # Run if needed
sudo apt install lshw
Then, run this command to list only network hardware:
sudo lshw -C network
Look for a section starting with `*-network` or `*-wireless`. Key information includes:
- description: Type of interface (e.g., Wireless interface).
- product: The specific model of your adapter.
- vendor: The manufacturer.
- logical name: The interface name (e.g.,
wlan0
). - configuration: This line is crucial! It often shows the `driver=` being used (if any) and parameters like `firmware=`. If it says `driver=… latency=0`, a driver is loaded. If the driver is missing or failed to load, this might be indicated here, or the device might be marked as `UNCLAIMED`.
Step 4: Specifically Identify Wireless PCI Controllers and Drivers
This command combines `lspci` with filtering (`grep`) to quickly show wireless PCI/PCIe controllers and the kernel driver currently associated with them:
lspci -nnk | grep -iA3 net
Or, targeting the device class code `0280` for wireless controllers:
lspci -nnk | grep 0280 -A3
Let’s break down the `lspci -nnk | grep 0280 -A3` command:
lspci
: Lists PCI devices.-nnk
: Shows numeric IDs for vendor/device (`nn`) and displays the kernel driver (`k`) handling the device.|
: Pipes the output of `lspci` to the next command.grep 0280
: Filters the output, showing only lines containing “0280”, which is the standard class code for Wireless Network Controllers.-A3
: Shows the matching line plus the next 3 lines (often includes Subsystem and Kernel driver information).
The output might look something like this (example):
03:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)
Subsystem: Intel Corporation AX200NGW [8086:0084]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
Here, “iwlwifi” is the kernel driver being used.
Step 5: Get Driver Details
Once you’ve identified the driver name (like `iwlwifi` or `rtl8723ae`) from `lshw` or `lspci`, you can get more information about it:
modinfo
This shows details like the filename, dependencies, and parameters the module accepts.
Step 6: List Available Wireless Drivers
To see all compiled wireless driver modules available in your current kernel build:
find /lib/modules/$(uname -r)/kernel/drivers/net/wireless -name '*.ko' -type f
Conclusion
Navigating WiFi issues on Ubuntu 22.04 can certainly be frustrating, but hopefully, this guide has provided a clear roadmap to diagnose and resolve the problem.
We’ve explored potential causes step-by-step, covering initial checks, DNS configurations, WiFi radio status, NetworkManager service health, driver and firmware complications, and hardware detection.