You’ve just bought a powerful new USB Wi-Fi adapter to boost your signal, you plug it into your Linux machine, and… nothing happens. The light might blink, but your system doesn’t see it. It’s a classic, frustrating problem for many Linux users.
While Linux support for hardware is better than ever, some components, especially Wi-Fi chipsets, require proprietary drivers that aren’t included in the Linux kernel by default. The Realtek rtl8812AU is one of the most common and powerful chipsets found in “AC1200” class USB dongles, but it frequently needs a manual driver installation to work.
Don’t worry, you haven’t wasted your money. In this guide, we will walk you through the entire process of getting your adapter up and running. We’ll not only provide the commands but also explain what they do, so you can become more comfortable with managing drivers on your system.
Why is a manual installation necessary?
Most Wi-Fi adapters that work out-of-the-box use drivers that have been accepted into the official Linux kernel. However, some manufacturers don’t submit their drivers for inclusion, or the available drivers are maintained by the community. The rtl8812AU falls into this category. We need to get the source code for the driver and compile it for our specific system.
What You’ll Need
- A Linux system running an Ubuntu or Debian-based distribution.
- An internet connection (use a wired Ethernet connection or your phone’s USB tethering).
- A USB Wi-Fi adapter with the Realtek rtl8812AU chipset.
- A little patience and access to the terminal!
Installing the Realtek rtl8812AU Driver
We’ll use the terminal for this entire process. You can open a terminal window on most Linux distributions by pressing Ctrl+Alt+T.
Step 1: Install Dependencies and Essential Tools
Before we can build the driver, we need to make sure our system has the right tools. We’ll be installing git and dkms.
- git: A version control system used to download (or “clone”) source code from websites like GitHub.
- dkms: Stands for Dynamic Kernel Module Support. This is the most important tool here. It will automatically rebuild and reinstall your Wi-Fi driver whenever you update your Linux kernel. Without DKMS, your Wi-Fi adapter would stop working after every kernel update!
Open your terminal and run the following commands to update your package list and install these tools:Generated bash
sudo apt update
sudo apt install dkms git
Step 2: Download the Driver Source Code
Next, we will use git to download the driver files from a community-maintained repository on GitHub.Generated bash
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux
This will create a new folder named rtl8812AU_8821AU_linux in your home directory. We need to navigate into this folder to continue. Use the cd command:Generated bash
cd rtl8812AU_8821AU_linux
Step 3: Build and Install the Driver with DKMS
Now we are inside the driver’s source code directory. The next set of commands will copy the files to a system directory, then tell DKMS to build the module and install it into the kernel.
Execute these commands one by one, pressing Enter after each:Generated bash
# Copy the source files to the system source directory
sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
# Add the module to the DKMS tree
sudo dkms add -m rtl8812AU_8821AU_linux -v 1.0
# Build the module
sudo dkms build -m rtl8812AU_8821AU_linux -v 1.0
# Install the module
sudo dkms install -m rtl8812AU_8821AU_linux -v 1.0
The installation might take a minute or two as it compiles the driver for your specific kernel version.
Step 4: Verify and Activate the Driver
The driver should now be installed. To load it into the kernel and get your device working, a system reboot is the cleanest method.Generated bash
reboot
After your computer restarts, plug in your USB Wi-Fi adapter.
Click on the network icon in the top-right or bottom-right corner of your screen. You should now see a new Wi-Fi interface, often named something generic like “802.11ac NIC.”
Select this new adapter, find your Wi-Fi network’s name (SSID) in the list, and connect as you normally would. You should experience a significant boost in signal strength and speed!
Troubleshooting Common Issues
Sometimes things don’t go perfectly. Here are a couple of common problems and their solutions.
1. “Secure Boot” Prevents Driver from Loading
If the driver installs but the adapter still doesn’t work after a reboot, the most likely culprit is Secure Boot. Secure Boot is a security feature that prevents the loading of unsigned kernel modules. Since we just built this driver ourselves, it’s not signed.
Solution: You will need to reboot your computer and enter your system’s BIOS/UEFI settings. Look for an option called “Secure Boot” (usually under the “Security” or “Boot” tab) and disable it. Save the changes and exit. The driver should now load correctly.
2. Build Fails with a “Compilation Error”
If you get an error during the dkms build step, it likely means the driver source code is not compatible with your current Linux kernel version. This can happen on very new Linux distributions.
Solution: The driver we used is a popular one, but you may need a more up-to-date fork. Search GitHub for “rtl8812au dkms” and filter by “most recently updated” to find a newer version. Then, repeat the steps with the new repository URL.
3. How to check if my adapter is actually an rtl8812au?
If you’re unsure if you have the right chipset, plug in the adapter and run this command in the terminal:Generated bash
lsusb
Look for a line that mentions “Realtek” or your adapter’s brand name. It will have a vendor and product ID (e.g., 0bda:8812). A quick web search for that ID will usually confirm the chipset.
Wrapping Up
Manually installing drivers on Linux can seem intimidating, but by understanding the tools like dkms, you can manage almost any piece of hardware. You’ve not only enabled your Wi-Fi adapter but also made it resilient to future kernel updates.
I hope this detailed guide helped you get your Realtek Wi-Fi adapter working and made you a bit more comfortable with the Linux command line. If you encountered any issues or have any questions, please feel free to drop a comment below.