How to resolve WiFi Issues on Ubuntu 24.04

Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems can be incredibly disruptive, especially when you rely on a solid connection for work or leisure. This guide provides clear, step-by-step solutions to get your WiFi working smoothly again.

Before we dive into Ubuntu-specific fixes, let’s quickly rule out some common issues:

  • Restart your router and modem: Often, a simple restart of your networking hardware can resolve connection problems.
  • Check your computer’s WiFi switch: Some laptops have a physical WiFi switch. Make sure it’s turned on.
  • Test with other devices: See if your phone, tablet, or another computer can connect to the WiFi. This will help determine whether the problem is with your network or your Ubuntu machine.
  • Enable automatic connection: Ensure NetworkManager is configured to automatically connect to your preferred WiFi network on startup to avoid future connection headaches.

This comprehensive guide covers various WiFi troubleshooting steps for Ubuntu 24.04, from DNS issues and driver problems to checking your WiFi radio and NetworkManager. We’ll walk you through each solution clearly and concisely.

How to resolve WiFi Issues on Ubuntu 24

Read: How to fix Bluetooth connection issues on Ubuntu 22.04

1. DNS Settings

Although DNS problems aren’t the most common cause of WiFi issues, they’re worth checking. We’ll use the nmcli command (part of NetworkManager) to investigate. nmcli is a powerful tool for managing network connections.

DNS Settings

1 – Identify your WiFi interface: Open your terminal and run:

nmcli d

Look for a device with “TYPE” as “wifi”. The “DEVICE” column shows the interface name (e.g., wlan0, wlp2s0).

2 – Check DNS configuration: In your terminal, replace <interface name> with the name you found and run:

nmcli device show <interface name> | grep IP4.DNS

Or, use this shorter command:

nmcli dev show | grep DNS

Read: Securing Ubuntu: Best Practices for Keeping Your System Safe

3 – Ping your router: Find your router’s IP address (often listed as the “GATEWAY” in the nmcli device show <interface name> output). Then, ping it:

ping <router_ip_address>

Ping Google’s DNS: If pinging your router works, try pinging Google’s public DNS server:

ping 127.0.0.53

If these tests reveal DNS problems, and if other devices are also experiencing issues, try changing your router’s DNS settings to Google’s public DNS (8.8.8.8 and 8.8.4.4).

If the DNS problem is isolated to your Ubuntu machine, follow these steps using NetworkManager’s graphical interface:

1. Open System Settings -> Network. Alternatively, run this in the terminal:

gnome-control-center network

2. Click the gear icon next to your connected WiFi network.

3. Go to the IPv4 tab.

4. Set the Method to Automatic (DHCP).

5. In the DNS servers field, enter 8.8.8.8, 8.8.4.4.

Click Apply.

Finally, restart your computer or the NetworkManager service:

sudo systemctl restart NetworkManager

Read: How to Configure Network Settings in Ubuntu 22.04

2. WiFi Radio Status

Sometimes, your WiFi radio might be inadvertently turned off. Check this by running:

nmcli d

If the “wifi” state is “off,” turn it on:

nmcli r wifi on

Now, check for available networks:

nmcli d wifi list

Read: How to keep Ubuntu clean

To connect to a network (e.g., “wifi0”), use:

nmcli d wifi connect wifi0 password <your_wifi_password>

Your WiFi password must be between 8 and 63 characters long, or you can use a 64-character hexadecimal string for a 256-bit key.

You can also monitor NetworkManager activity using:

nmcli monitor

Read: Can’t connect to WiFi on Windows 10, here is what to do.

3. Network Manager

If NetworkManager is missing (perhaps accidentally uninstalled), you won’t be able to manage network connections. Reinstall it with:

sudo apt update # Update package lists first

sudo apt install network-manager

Read: How to set up a firewall on Ubuntu 18.04

4. Missing Driver Modules

If your wireless adapter isn’t recognized (“No Wi-Fi Adapter Found”), you might be missing the required firmware. Firmware is essential software that allows your hardware to communicate with the operating system. You’ll need to install the correct firmware for your adapter. You might need a new one if your adapter is incompatible with Ubuntu 24.04.

Missing Driver Modules

Here’s how to troubleshoot driver issues:

A. Check Supported Adapters:

Most Linux distributions provide a list of supported wireless adapters. Check this list to see if yours is supported and to identify the correct drivers.

Read: 15 Proven Ways to Fix Wi-Fi Problems on Your Mac

B. Restricted Drivers:

Some manufacturers provide proprietary drivers (not open-source) for their wireless adapters. Check the manufacturer’s website for Linux drivers. If unavailable, consider switching to a Linux-supported adapter.

C. Using Windows Drivers (NDISwrapper):

NDISwrapper is a tool that allows Linux to use Windows wireless drivers. This might be an option if Linux drivers are unavailable, but it doesn’t always work reliably. Search for “NDISwrapper Ubuntu” for more information.

Manual Driver Management:

To list currently loaded modules:

sudo lsmod

To load a module (replace “your-module-name” with the actual module name):

sudo modprobe your-module-name

Read: How to reinstall audio drivers in Windows 10

Check again with sudo lsmod to verify it loaded.

Auto-loading Drivers at Boot:

To automatically load the module at startup, edit /etc/modules:

sudo nano /etc/modules

Add your module name to a new line and save.

Read: Setting up Bluetooth on Ubuntu 22.04

D. Installing Drivers from an ISO Image:

If you have the Ubuntu 24.04 ISO image, you can use it to install additional drivers:

Download the ISO: If you don’t have it, download the Ubuntu 24.04 ISO file. A bootable USB drive can help transfer the file.

Open the terminal.

Run these commands:

sudo mkdir /media/cdrom

cd ~

sudo mount -o loop ubuntu-*.iso /media/cdrom # Replace ubuntu-*.iso with your ISO file name

Then, use the “Software & Updates” application (go to the “Additional Drivers” tab) to install the necessary drivers.

Read: How to troubleshoot sound issues in Ubuntu 22.04

5. Device Detection

Let’s confirm Ubuntu can detect your wireless adapter. Even if it’s physically connected, it might not be recognized as a network device.

Device Detection

1 – Check for USB adapters:

sudo lsusb

2 – Check for internal cards:

sudo lspci

Look for “Network Controller” or “Ethernet Controller” to indicate detection.

a – Detailed hardware information: For more information, run:

sudo apt update #If needed

sudo apt install lshw

lshw -C network

The -C network filters for network devices. Look for a “Wireless interface” section. The “configuration” line shows the driver in use.

Read: How to display Graphics card information on Ubuntu 22.04

b – Identify wireless PCI controllers:

lspci -nnk | grep 0280 # 0280 is the identifier for wireless PCI controllers

Read: Ubuntu 24.04 Printer Troubleshooting Guide: Fix USB, Network, and Driver Issues

Running `lspci` provides detailed information about all connected PCI cards on your system. By adding the `-nnk` option, you can access additional details, such as the driver associated with each card. The output from `lspci` can be further refined by piping it into the `grep` command. For example, using `grep 0280` filters the results to display only lines containing “0280,” which in Ubuntu corresponds to wireless PCI controllers.

Here’s how it may look like:

09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723AV PCIe Wireless Network Adapter [10ec:8743]

Subsystem: Realtek Semiconductor Co., Ltd. Device [10ec:0725]

Kernel driver in use: rtl8723av

1 – Get driver details: Once you know the driver’s name, use:

modinfo <driver_name>

2 – List installed wireless drivers:

find /lib/modules/$(uname -r)/kernel/drivers/net/wireless -name ‘*.ko’

Read: How to Fix the Ubuntu “No Wi-Fi Adapter Found” Error

Conclusion

This guide provides a thorough overview of WiFi troubleshooting on Ubuntu 24.04. We’ve covered various potential problems, from DNS and driver issues to NetworkManager problems and device detection. By following these steps, you should be able to diagnose and resolve most WiFi connectivity issues, getting you back online and connected reliably.

Frequently Asked Questions (FAQ)

General WiFi Troubleshooting:

  • Q: What are the first things I should check if my WiFi isn’t working?
    • A: Before diving into Ubuntu-specific fixes, try these:
      1. Restart your router and modem.
      2. Make sure your computer’s physical WiFi switch (if it has one) is turned on.
      3. Check if other devices can connect to the same WiFi network.
      4. Ensure your preferred network is set to connect automatically.
  • Q: How can I tell if the problem is with my Ubuntu computer or my network?
    • A: Test the WiFi connection with other devices (phone, tablet, etc.). If other devices connect successfully, the problem is likely with your Ubuntu machine. If other devices also fail to connect, the issue is probably with your router, modem, or internet service provider.

DNS Related Issues:

  • Q: What is DNS, and how can it affect my WiFi connection?
    • A: DNS (Domain Name System) translates domain names (like google.com) into IP addresses that computers use to communicate. Incorrect DNS settings can prevent your computer from accessing websites, even if the WiFi connection itself is active.
  • Q: How do I check my current DNS settings in Ubuntu 24.04?
    • A: Use the nmcli command:
      nmcli dev show | grep DNS
      

      This will display the DNS servers your system is currently using.

  • Q: How do I change my DNS settings in Ubuntu 24.04 to use Google’s Public DNS?
    • A: You can change DNS settings through the NetworkManager GUI:
      1. Open System Settings -> Network.
      2. Click the gear icon next to your WiFi connection.
      3. Go to the IPv4 tab.
      4. Set the Method to Automatic (DHCP).
      5. Enter 8.8.8.8, 8.8.4.4 in the DNS servers field.
      6. Click Apply.
      7. Restart NetworkManager: sudo systemctl restart NetworkManager
  • Q: How to ping my router?
    • A: Use the command : ping <router_ip_address>
  • Q: What is Google’s DNS?
    • A: Use the command :ping 127.0.0.53

WiFi Radio and Network Manager Issues:

  • Q: How can I check if my WiFi radio is turned on in Ubuntu?
    • A: Use the command nmcli d. If the “wifi” state is “off,” turn it on with nmcli r wifi on.
  • Q: How do I list available WiFi networks in Ubuntu?
    • A: Use the command nmcli d wifi list.
  • Q: How do I connect to a specific WiFi network from the command line?
    • A: Use: nmcli d wifi connect <network_name> password <your_wifi_password> (replace <network_name> and <your_wifi_password> with the correct values).
  • Q: What should I do if NetworkManager is missing or not working?
    • A: Reinstall it:
      sudo apt update
      sudo apt install network-manager
      
  • Q: How can I monitor NetworkManager activity?
    • A: Use the command nmcli monitor.

Driver Related Issues:

  • Q: What is a driver, and why is it important for WiFi?
    • A: A driver is software that allows your operating system (Ubuntu) to communicate with your hardware (WiFi adapter). Without the correct driver, your WiFi adapter won’t function.
  • Q: How can I check if my WiFi adapter is recognized by Ubuntu?
    • A: For USB adapters: sudo lsusb For internal cards: sudo lspci (Look for “Network Controller” or “Ethernet Controller”). For detailed information: sudo lshw -C network
  • Q: How do I find out which driver my wireless adapter is using?
    • A: Use lspci -nnk | grep 0280 to identify wireless PCI controllers and the associated driver. Or use: lshw -C network (look at the “configuration” line).
  • Q: How do I get more information about a specific driver?
    • A: Use modinfo <driver_name> (replace <driver_name> with the actual driver name).
  • Q: How do I list installed wireless drivers?
    • A: Use find /lib/modules/$(uname -r)/kernel/drivers/net/wireless -name '*.ko'
  • Q: What if my WiFi adapter isn’t supported by Ubuntu?
    • A:
      1. Check if the manufacturer provides proprietary Linux drivers on their website.
      2. As a last resort, you might try using NDISwrapper (a tool to use Windows drivers in Linux), but this isn’t always reliable.
      3. Consider purchasing a USB WiFi adapter that is known to be compatible with Linux.
  • Q: How do I manually load a kernel module (driver)?
    • A: Use sudo modprobe <module_name> (replace <module_name> with the actual module name). Use lsmod to verify it loaded.
  • Q: How do I make a driver load automatically at boot?
    • A: Edit the /etc/modules file:
      sudo nano /etc/modules
      

      Add the module name on a new line, save, and exit.

  • Q: How can I install drivers from the Ubuntu installation ISO?
    • A:
      1.  Mount the ISO:
      ```bash
      sudo mkdir /media/cdrom
      cd ~
      sudo mount -o loop ubuntu-*.iso /media/cdrom  # Replace with your ISO filename
      ```
      2.  Use the "Software & Updates" application (Additional Drivers tab) to install the drivers.
      

Advanced Troubleshooting:

  • Q: what is lspci -nnk | grep 0280
    • A Running lspci provides detailed information about all connected PCI cards on your system. By adding the -nnk option, you can access additional details, such as the driver associated with each card. The output from lspci can be further refined by piping it into the grep command. For example, using grep 0280 filters the results to display only lines containing “0280,” which in Ubuntu corresponds to wireless PCI controllers.

 


If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.

 

Nikolaus Oosterhof

Nikolaus holds a degree in software development and has a strong passion for all things tech-related, especially gadgets with screens. Though he is nostalgic for older phone models, he's a retired gamer and continues to enjoy programming in open-source environments. Additionally, Nikolaus enjoys writing about Linux, macOS and Windows and has experience designing web pages.

Leave a Reply