Note:

This is an attempt to create a canonical question that covers all instances of "not-working Wifi" issues.

If you are experiencing a not-working Wifi, but none of the following answers work for you, please do ask a new question and then update the answers for this canonical question when your new question gets answered.

What’s the best way to troubleshoot a non-functional Wifi?

I ask this because almost every day someone asks about a Wifi adapter that isn't working ... I think it would really help if Ask Ubuntu had a systematic generic strategy for how to troubleshoot not-working Wifis.

Ideally, the answer will cover simple things to try first (e.g., Wifi drivers , settings menu) and go on to increasingly advanced methods – ending with what information to post on this site to help people trying to answer if it's unsuccessful.

I am giving the answer myself too , but I want you to answer too.Because more the answers more good results.


Solution 1:

What if your wireless isn’t working at all because it hasn’t any working driver?

First, identify your device. From the terminal, if it’s a PCI (internal) device:

lspci -nnk | grep 0280 -A3

You may see something like this:

    03:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b2] (rev 83)
Subsystem: Intel Corporation Dual Band Wireless-AC 7260 [8086:c270]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi

In this case, we see that there is a kernel driver in use, iwlwifi and a missing driver is not the issue.

Or you may see something like:

03:00.0 Network controller [0280]: MEDIATEK Corp. Device [14c3:7961]
    Subsystem: AzureWave Device [1a3b:4680]

In this case, no kernel driver is in use, so we must look for and install a driver. The key to finding a driver is the pci.id; in this case, 14c3:7961. Search Ask Ubuntu, Ubuntu Forums and Google for that pci.id.

You will find one of four results. First, and this is very rarely the case, there is no Linux driver at all for this device. My suggestion is to buy a different device with Linux support. An excellent resource is here: https://github.com/morrownr/USB-WiFi

Second, there is a Linux driver and it appears in the newest kernel versions. The device above is an example. The Mediatek 7921 is recognized in kernel versions 5.12 and newer. If your kernel version is less, either upgrade to the newest Ubuntu version or install a 5.12 mainline kernel.

The third possibility is that an driver exists and must be installed manually. As search of the forums will probably show the method; after all, you probably aren’t the first person in the world with this new device. Be sure to select a solution that is as close as possible to or exactly matches your Ubuntu version; that is, a procedure for Ubuntu 16.04 LTS is unlikely to work in Ubuntu 21.10. Find your version from the terminal:

lsb_release -d

Finally, a driver exists but isn’t in use. There is a problem with the driver that prevents it from loading, activating your hardware and connecting. Once you know what the expected driver is; this, for example:

3:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter Subsystem: Lite-On Communications Inc 
RTL8822CE 802.11ac PCIe Wireless Network Adapter  
Kernel modules: rtw88_8822ce

Then check the message log for the driver (Kernel module) you found:

sudo dmesg | grep rtw88_8822ce

Is there missing firmware? Is there some other issue? Again, check the forums as you are not likely the first user with the same problem.

If your wireless adapter is external; that is, USB, the same process applies. Find out the details of your device:

lsusb

You will find something like:

Bus 001 Device 005: ID 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU]
<snip>

Here again, the usb.id is the key to finding a driver. In this case, it is 2357:0120. Search and you will find several accepted answers here. Again, pick the answer that is closest to or matches your Ubuntu version.

CAUTION: Do not add random driver parameters sudo as “options iwlwifi ant_sel=1” or any other unless you know you are using that driver and you know that is an available parameter for your driver:

modinfo iwlwifi | grep parm

Moreover, do not install random drivers for any old device unless you are certain by searching for your pci.id or usb.id as above. It only wastes time and harddrive space to install a Broadcom driver for an Atheros device or a Ralink driver for an Intel device. Measure twice, cut once.

If you have researched your device and followed the procedures suggested by a search of Ask Ubuntu, Ubuntu Forums and Google; and if you’ve found no clues in the dmesg log and your wireless still won’t work, please start a new question. I love a mystery.