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

[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.

21
Leave a Reply

avatar
15 Comment threads
6 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
14 Comment authors
MarttiKarlmikecyrixxgambolio 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!