Wi-Fi Not Working on Ubuntu? Here’s How to Fix it

wifi-ubuntu

Ubuntu is a powerful, free open-source operating system that is good for beginners who want to explore Linux and seasoned professionals who want a solid, secure system for projects and the like. However, despite all its virtues, sometimes you might have issues connecting to Wi-Fi networks.

A Wi-Fi connection issue can be either a hardware or software issue. Here are some actionable solutions if users find themselves having an issue connecting to Wi-Fi networks.

Note: the biggest issue users will face is having a wireless card that is made by Broadcom. While the manufacturer is part of the Linux Foundation, this doesn’t mean that their driver support is good all the time. Aside from the drivers, another issue is the TKIP encryption that is in use.

Issue One: Device not detected

If the wireless device is not detected by Ubuntu (or any distro for that matter), then you will need to access the Terminal and type the following command:

if you use a plug in USB wireless card/dongle, and

if you have an internal wireless card.

If the response from these commands comes back with an output similar to the screenshot below, then you are in luck: Ubuntu can find the card. It is usually identified by “Network Controller” or “Ethernet Controller.”

ubuntu-lsusb

In the past, a lot of Linux distributions have had difficulty finding the wireless card. Thankfully, support has gotten a lot better, so this is now a rare instance.

Additional Commands

You can also use the following command to test if the machine can see the wireless device; users may need to install lshw on their machine first.

The output should resemble something similar to this:

If this is the case, and the system finds the wireless card, you can proceed to installing the driver/module as described below.

Issue Two: Driver module missing

Following on from the successful lsusb and lspci commands, providing Ubuntu can see the wireless card, you can assume that the firmware is working, just that the system has no idea what to do with the card. This is where drivers or modules are needed.

Go back to the terminal and type the following command:

ubuntu-lsmod

You see a list of modules that are used. In order to activate your module, type the following command where “modulename” is the name of your chipset.

For example, if your wireless chipset is “RT2870,” it would be as follows:

After this, run the lsmod command again to see if it has loaded correctly.

Load module automatically at boot

It is a rare occasion, but sometimes the module will not persist from boot. In this case you can force it to load permanently. Enter the command below into the Terminal:

The nano text editor will open up. Add your module name at the bottom and save the file. You will need to reboot and check to see if the wireless card can now see networks to enable you to connect as normal.

If you get stuck, then repeat the process. Thankfully, Ubuntu has some useful help pages in their online documentation that you can also read through. Additionally, you can use the built-in help within the terminal by entering:

Issue Three: DNS

It is rare that the DNS will be an issue; however, it is worth investigating should you still have connection issues. From the Terminal, type the following command to assess where the DNS is coming from:

This will show you the LAN address of the router. If it doesn’t work, you may have to change “wlan1” to whatever your wireless uses. The following command can also be used to grab the designation:

Once you have this information, your next method is to ping your router’s LAN address. If this works, try to ping Google’s DNS servers:

With these results you can establish where the DNS issue is. If all devices within your home or office are giving page load errors, then change the router DNS to Google or Open DNS servers. You’ll have to consult your router manufacturer for how to do this, but it is generally done within the admin pages, most commonly by logging onto 192.168.0.1 or similar.

If your DNS issue is Ubuntu only, then follow these steps by using the Network Manager GUI:

  • Right click on Network Manager.
  • Edit Connections.
  • Select the Wi-Fi connection in question.
  • Select IPv4 Settings.
  • Change Method to DHCP Addresses Only.
  • Add 8.8.8.8, 8.8.4.4 into the DNS server’s box. Remember the comma separating the IPs, and don’t leave spaces.
  • Save, then Close.

As a final step, either restart your machine or restart the Network Manager from the Terminal:

Issue Four: No Network Manager

Let’s say you have removed the Network Manager or uninstalled it by accident. This is a really troublesome situation: you have no Internet and no Network Manager, but there are things you can do.

Assuming the apt package is still within your cache, then you can go to the Terminal and enter:

If you have removed this cache, then you can use an Ethernet cable to connect by plugging this into your Ethernet port and running the above command again.

As a final step, if none of the above works, you will need to edit your configuration file. I selected gedit as the text editor, but you can use your preferred choice and amend the command.

Amend it to read as follows:

Then you can restart the interface by entering the below code:

Further reading of the Linux Wireless subsystem can be found on the kernel.org wiki.

9 comments

  1. There’s a big leap from “Issue 2” to the modprobe. What chipset? What module? There’s no information there to go from the output of lsmod to modprobe.

    1. Same question here.
      HELP !!!

  2. Hi Guy’s, great info, that is great if you have an port for the internet, the computer I’ve got does not have one. there is my problem.
    Just wondering if you load to an external drive take it to an older computer and down load the kernel straight to the hard drive? As I know to older computer allows a older version to work on it.
    The computer I have is a Lenovo S130-1N with windows 10 home, But I just can not not get Wifi and Bluetooth to work using Linux Distro. Any help or Ideas would be great.

    Cheers

  3. Unfortunately, you did not cover my issue, issue 5: Device does not automatically reconnect to wifi network when wifi network goes down then comes back up. Do you have any suggestions for that? I am using a Beelink Gemini N41 running lubuntu 18.10

  4. May I just say that your answers given in the article is precisely why I stick with microsoft.

  5. After this comand:
    sudo modprobe rt3090
    the sistem return this message in the terminal:

    sudo modprobe rt3090
    libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/iwlwifi.conf line 8: ignoring bad line starting with ‘“options’
    modprobe: FATAL: Module rt3090 not found in directory /lib/modules/4.18.0-17-generic

    What’s the meaning of this message? What can I do after that?

  6. I use an older MacBookAir and go into the app menu/Software & Updates and click additional drivers. What will activate the Broadcom WL drivers. Sucks that wifi works when you use the live image but doesn’t work when installed. I imagine it’s a Broadcom licensing issue more than a software issue.

    My only problem is that wifi takes 40 seconds to turn back on after sleep. I tried restarting network from a script in /etc/rc.local and in /etc/pm.utils/sleep.d but no luck still.

    One a side note, getting the FaceTime camera to work can be a PTA. If you Google you can find the directions. There is an additional step required for Ubuntu 18.04 and newer so be sure to Google for 18.04 Facetimehd fix.

  7. What should I so if `lshw -C network` doesn’t show – `description: Wireless interface` ? The following is there- Ethernet interface, Network controller.

  8. Can you update tutorial for 2019
    Without ifconfig.
    Like enp0s3
    Wlx003468
    etc……
    Thank you.

Comments are closed.