Software & AppsOperating SystemLinux

How To Fix USB WiFi Adapter Not Working on Ubuntu 20.04

Ubuntu 7

In this article, we will guide you through the process of troubleshooting and fixing a USB WiFi adapter that is not working on Ubuntu 20.04.

Quick Answer

To fix a USB WiFi adapter not working on Ubuntu 20.04, start by checking if the adapter is recognized by running the "lsusb" command in the terminal. If it’s not recognized, try connecting it to a different USB port or another computer to rule out a hardware issue. If the adapter is recognized but still not working, it could be a driver issue. You can manually install the driver by following the steps outlined in the post. If none of the solutions work, it is possible that the adapter is broken and may need to be replaced.

Introduction

Ubuntu 20.04, also known as Focal Fossa, is a robust and versatile operating system. However, like any other software, it can sometimes encounter issues with hardware compatibility. One such common issue is with USB WiFi adapters.

Checking if the Adapter is Recognized

Before we dive into the troubleshooting process, it’s essential to check if Ubuntu recognizes your USB WiFi adapter. Open your terminal and type the following command:

lsusb

This command lists all the USB devices connected to your system. If your adapter is listed, it means Ubuntu recognizes it. If it’s not, try connecting it to a different USB port or check it on another computer to rule out a hardware fault.

Troubleshooting Driver Issues

If your adapter is recognized but still not working, it could be a driver issue. Drivers are software that allows your operating system to communicate with hardware devices. Some WiFi adapters may not work out of the box on Ubuntu due to missing drivers.

Installing the Driver Manually

One solution is to manually install the driver for your adapter. Here’s how you can do it:

Step 1: Update your system and install necessary packages. Open a terminal and run the following commands:

sudo apt update
sudo apt install git dkms build-essential

The sudo apt update command updates the package list for upgrades for packages that need upgrading, as well as new packages that have just come to the repositories. The sudo apt install git dkms build-essential command installs the necessary packages for building our driver.

Step 2: Clone the driver repository using the command:

git clone https://github.com/cilynx/rtl88x2bu.git

This command clones the repository containing the driver for the RTL88x2BU chipset, which is commonly used in many USB WiFi adapters.

Step 3: Navigate to the cloned repository:

cd rtl88x2bu

Step 4: Retrieve the version number from the dkms.conf file:

VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)

This command uses the sed command-line tool to extract the version number from the dkms.conf file and stores it in the VER variable.

Step 5: Copy the driver files to the appropriate directory:

sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}

The rsync command is used to copy files. The -rvhP option stands for recursive, verbose, human-readable, and progress. It copies the files recursively with a progress bar in a human-readable format.

Step 6: Add the driver to the DKMS framework:

sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}

These commands add, build, and install the driver using the Dynamic Kernel Module Support (DKMS) framework. DKMS is a system utility that facilitates the installation of Linux drivers.

Step 7: Load the driver module:

sudo modprobe 88x2bu

The modprobe command adds the module to the Linux Kernel.

Note: You may need to disable Secure Boot in your system’s BIOS settings for this solution to work.

Further Troubleshooting

If the above solution does not work, you can try other troubleshooting steps. For instance, running the dmesg -w command in the terminal, then inserting your wifi adapter, can provide more information about any errors or issues.

Conclusion

We hope this guide helps you fix your USB WiFi adapter issues on Ubuntu 20.04. If none of the solutions work, it is possible that the adapter is broken and may need to be replaced. Remember, the Linux community is always ready to help. Feel free to ask for help on forums like Ask Ubuntu or Ubuntu Forums.

Leave a Comment

Your email address will not be published. Required fields are marked *