Ubuntu – Install rtl8814AU driver on ubuntu 16.04

driverswireless

I tried installing the rtl8814AU driver for my TP Link T9UH wifi adapter on Ubuntu 16.04.01 (kernel version: 4.13.0.37).
I used https://github.com/mathew19/rtl8814AU and used the answer of George Udosen on this (I'm Trying to install rtl8814au drivers fairly new to linux) topic.
At first it worked, even though I wasn't able to sudo modprobe -v rtl8814au. The response when I entered this was: 'modprobe: FATAL: Module rtl8814au not found in directory /lib/modules/4.13.0-37-generic'.
I was able to go on the internet and install updates and everything, but after rebooting, nothing worked anymore.
I don't really have a lot of experience on Linux, and I really don't know what to do now.
Can anyone help me?

The results of modinfo 8814au:
https://i.stack.imgur.com/OAp6H.jpg

When I enter dkms status, it gives me:
rtl8192eu, 4.4: added
rtl8814au, 4.3.21, 4.13.0-32-generic, x86_64: installed (WARNING! Diff between built and installed module!)
rtl8814au, 4.3.21, 4.13.0-37-generic, x86_64: installed

Best Answer

For some reason dkms built on the old kernel rather than the new one, in terminal do

sudo dkms remove 8814au/4.3.21 -k 4.13.0-37-generic
sudo dkms install 8814au/4.3.21
Reboot and it should work

To fix this for newer kernels

sudo apt-get install gksudo
gksudo gedit /usr/src/8814au-4.3.21/dkms.conf

Change the first line from MAKE="'make'" to MAKE="'make' all KVER=${kernelver}" Save and exit gedit and it should work correctly in future kernel updates