[Solved] How to install Realtek rtl8812au WiFi Driver in Linux

[UPDATE 04/23/2019] The original GitHub repo “gnab” is not working with kernel 4.19 and higher (https://github.com/gnab/rtl8812au/issues/154), if you have trouble compiling the driver, then try this repo: https://github.com/gordboy/rtl8812au. I see there are two pull requests that address this issue, but they have not been merged into the master branch. I will keep an eye on it and will update this post if the master branch is updated to fix this issue.

[UPDATE August 15, 2018] The Github repo in the original post has been fixed, now you can follow the steps in the original post to install the Linux driver.

[UPDATE June 7, 2018]: If you are using Ubuntu 18.04 LTS or any distro with kernel 4.15 (or above), then the following steps will not work. The build will fail with kernel 4.15. Hopefully, someone will update the source code to be compatible with the latest kernel. If you know any Github project that works with the latest kernel, please let me know and I will update this post to include it.

UPDATE: It seems that the dkms package rtl8812au-dkms in Ubuntu repo is out of date, and if you update your kernel to the latest, then you will notice that the driver will stop working. If it is the case, please follow the steps below to install a driver from Github.

1. If you already installed Ubuntu rtl8812au-dkms driver and it stopped working after the latest kernel update, then you will need to remove the driver first:

sudo apt remove rtl8812au-dkms

2. If you installed other dkms packages related to rtl8812au, then remove them as well

sudo dkms status

sudo dkms remove rtl8812au/x.x.x –all

Replace x.x.x with the version number of the package

3. Clone and install the driver from Gibhub

sudo apt update
sudo apt install git
git clone https://github.com/gnab/rtl8812au.git
sudo dkms add ./rtl8812au
sudo dkms build rtl8812au/4.2.2
(if you get an error saying ‘rtl8812au’ folder does not exist, then change rtl8812au to ‘8812au’)
sudo dkms install rtl8812au/4.2.2 (if you get an error saying ‘rtl8812au’ folder does not exist, then change rtl8812au to ‘8812au’)

4. Load the driver

sudo modprobe rtl8812au (or 8812au if you get an error message saying rtl8812au does not exist)

Now your Wifi dongle should work and you can use it to connect to your 5G network in Network Manager.

Reference: https://ubuntuforums.org/showthread.php?t=2386168

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Recently I did some upgrades on my home network:

1. Upgraded my Internet connection from 100Mbps to 400Mbps

2. Upgraded my router to Netgear R6700 Nighthawk AC1750 Smart Dual Band WiFi Router so I can take advantage of the upgraded Internet connection

However, I noticed the network card in my laptop is too old and does not support 5G wireless connection, so it means I need a new network card. We all know it is not that hard to replace a network card in laptop nowadays thanks to the better design of current laptops, but I was too lazy to do it. So I decided to buy a USB network adapter with 5G connection capability for my laptop and I found a really nice one on Amazon: Zoweetek 600Mbps Dual Band WiFi Dongle

It’s very compact and the connection speed according to the product description is just right for me, and the price is reasonable. The installation in Windows is no brainer, just double-click the installation file on the installation CD (included in the package) and follow the instructions to install the driver and the management tool.

Once installed, this little device runs well in Windows 10 and my laptop’s connection speed increased greatly. While I am satisfied with the device in Windows, I would like to als use it in Linux Ubuntu before my laptop is a dual-boot: Windows 10 + Ubuntu 17.10, and the production description says it supports Linux, and it is a major reason that I chose this product in the first place.

Well, it turned out it is much harder than I expected when installing Linux driver for this dongle.

First of all, the driver on the installation CD (or downloaded from the company’s website) does not work in my Ubuntu because it only supports the Linux kernel up to 3.16, while Ubuntu 17.10 runs on kernel 4.13

Secondly, there is a Linux driver installation video on the company’s website, but it does not work for me either. And the reason is the same as above.

So I started to Google around to see how other people got it work in Ubuntu. Here is what I found out and how I got it work in Ubuntu 17.10.

1). Confirm your USB wireless adapter is using Realtek chipset

Open a terminal in Ubuntu, then type in this command

lsusb

If you see “Realtek Semiconductor Corp.” in the list, then move to the next step

2). The Linux driver for this particular dongle is “rtl8812au”, and that’s why the installation video on the company’s website is called “Install the Realtek rtl8812au Wifi Driver in Linux”. If you Google it, you will find a couple of tutorials showing you how to install the Linux driver via git. And I have tried all of them, but they didn’t work for me. Finally I found out that Ubuntu already included rtl8812au driver in its repository, so if you are using Ubuntu 17.10 and having trouble installing rtl8812au driver from git, just type in the following commands in a terminal:


sudo apt update
sudo apt install dkms
sudo apt install rtl8812au-dkms

After the installation, reboot your computer, then you will see Ubuntu Network Manager can recognize the USB WiFi adapter and you can use it to connect to your network.

29
Leave a Reply

avatar
21 Comment threads
8 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
19 Comment authors
David_NTOTL_Philippe CochyKrisRandy C Brown Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Wan
Guest
Wan

Hi, I run the exact commands you gave up there but after reboot it still didn’t recognise the usb wife adapter. Im running Xubuntu 17.10 and trying to install the RTL8811au wifi adapter. Appreciate if you could help..

Abhishek Singh
Guest
Abhishek Singh

i have done almost everything but syill, i am not able to connect wifi in my hp laptop after installing ununtu 17.10

Jay
Guest
Jay

Tested on Linux Mint 18.3 and Ubuntu 17.10. Both worked without any issue.

Ance
Guest
Ance

Thanks the Github method worked for me. Thank you for pointing out the alternative file name, or that would have foxed me.

It's just me
Guest
It's just me

I can build all Github and Ubuntu (universe repo) drivers on 4.15 kernel (Ubuntu 18.04 LTS) unsing dkms without any error. They work on 4.15.0-20 kernel but on 4.15.0-22 kernel scanning return no result and they are unable to connect, even to a hidden network. I have to check if it is the same behaviour with a 5GHz network.

Phoenix87
Guest
Roman González
Guest
Roman González

There are here a version the driver(rtl8812au 5.2.20.2) compatible with the kernel 4.18-rc2.
https://github.com/gordboy/rtl8812au

gambolio
Guest
gambolio

My linux distro is parrot armh7l. The linux driver for my usb dongle is rtl8821au. It is detected in lsusb. So how do I install this driver from the cd?

cyrixx
Guest
cyrixx

excellent it works thanks!

mike
Guest
mike

Does NOT work on cinnamon mint 18.3 with kernels ABOVE 4.1 this is what an successful install looks like: rtl8812au-dkms Preparing to unpack rtl8812au-dkms_4.3.8.12175.20140902+dfsg-0ubuntu7_all.deb … —————————— Deleting module version: 4.3.8.12175.20140902+dfsg completely from the DKMS tree. —————————— Done. Unpacking rtl8812au-dkms (4.3.8.12175.20140902+dfsg-0ubuntu7) over (4.3.8.12175.20140902+dfsg-0ubuntu7) … Setting up rtl8812au-dkms (4.3.8.12175.20140902+dfsg-0ubuntu7) … Loading new rtl8812au-4.3.8.12175.20140902+dfsg DKMS files… Building for 4.10.0-38-generic and 4.15.0-38-generic Building initial module for 4.10.0-38-generic Done. 8812au: Running module version sanity check. – Original module – No original module exists within this kernel – Installation – Installing to /lib/modules/4.10.0-38-generic/updates/dkms/ depmod…… DKMS: install completed. Building initial module for 4.15.0-38-generic Done. 8812au: Running module… Read more »

mike
Guest
mike

Worked like a champ kernel 4.10 mint 18.3 cinnamon 64-bit. Method:
If not dual-booting press [space] to bring up GRUB boot loader menu. Select the older kernel to boot from RAM drive … then try the driver install. Success? Reboot from the kernel you installed into from GRUB.
Good luck 🙂

Karl
Guest
Karl

Thank you for this + the info for if/when (like I did) you get the errors. Really straight forward

Martti
Guest
Martti

Wow! This worked! Thanks!

Jay
Guest
Jay

Thumb up!

Juan Balceda
Guest

Thanks for this tutorial! Works on Ubuntu 18.04

Randy C Brown
Guest
Randy C Brown

Bought an Edup EP-AC1607 wifi adapter for my Linux laptop (LinuxMint 9.1) and various single board computers. Surprised that my Rock64 recognized and installed the adapter. No Problem. However, trying to get it installed on my laptop was frustrating. The manufacture’s instructions were useless.I have another AC adapter from another manufacturer that was also a no-go. While I consider myself at an intermediate level when it comes to my experience with Linux, installing drivers has proved to be quite a challenge. To my advantage, I’m tenacious and try to do my research. Your site (you) not only got me up… Read more »

Kris
Guest
Kris

Thanks !!!!!

Philippe Cochy
Guest

Hello, I got an error at the build using Debian 10: sudo dkms build 8812au/4.2.2 Kernel preparation unnecessary for this kernel. Skipping… Building module: cleaning build area… ‘make’ all KVER=4.19.0-4-amd64……..(bad exit status: 2) Error! Bad return status for module build on kernel: 4.19.0-4-amd64 (x86_64) Consult /var/lib/dkms/8812au/4.2.2/build/make.log for more information. DKMS make.log for 8812au-4.2.2 for kernel 4.19.0-4-amd64 (x86_64) mardi 23 avril 2019, 08:43:04 (UTC+0200) make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.19.0-4-amd64/build M=/var/lib/dkms/8812au/4.2.2/build modules make[1] : on entre dans le répertoire « /usr/src/linux-headers-4.19.0-4-amd64 » CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_cmd.o CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_security.o CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_debug.o CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_io.o CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_ioctl_query.o CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_ioctl_set.o CC [M] /var/lib/dkms/8812au/4.2.2/build/core/rtw_ieee80211.o CC [M]… Read more »

David
Guest
David

One additional note: I found that I had to reinstall the package rtl8812au-dkms after an update to the kernel (I’m running Linux Mint) since the package, a kernel module, is source that needs to be recompiled to properly connect with the new kernel. The reinstall doesn’t need to re-download the package, fortunately, since the wifi wasn’t working on the new kernel ;-). I used synaptic to reinstall the package, and I hadn’t cleaned out the cache of downloaded packages.