Ubuntu – Rtl8812au driver errors


This is the dongle I am using.

UPDATE (JAN 5) Nothing seems to work with this card, I personally will say to anyone who is looking for a wifi adapter (dongle or plugin adapter) that works with Linux should just get one that states it explicitly does work with it.

UPDATE (December 26): no matter how hard I try it does not work, I have the drivers installed from the old youtube tutorial I linked since they are more reliable than anything else I tried or were given, yet connection time for unprotected wifi still takes long and secure wifi does not even connect. I do not know what to do since before this actually worked, all I know is all I get is "activation of network connection failed."

When I boot up Ubuntu and check the logs I see that it has failed to initialize connection with my network. When I try to connect manually my adapter restarts sometimes and fails to connect. If it does connect it can randomly drop connection. I know it's not a fault with the device issue since I have two of the same wifi dongles for two different PCs and when I switched them the one that was supposedly messing up was performing fine on the other PC.

Now this these issues have occurred with my Windows partition as well so I thought it might be a mobo compatibility issue (I use the x470 chip for AMD RYZEN) but I have since fixed this problem by updating the drivers manually myself and not allowing the power plan to restart/disconnect my dongle.

I think this issue might be a driver issue primarily, I have tried to reinstall the driver around 3 times but have not uninstalled the previous versions and do not know how to do that (I am still new to Linux). I hope someone can help me solve my problem.

EDIT: Actually that was the third method I tried but it did not help, also it is not the same problem, the pc recognizes the adapter but it takes to long, restarts, or does not connect to wifi at all, and when it does it randomly drops. Also, as aforementioned it will not be connected on boot whatsoever.

I was suggested to use the answer to this question to solve my problem:
RTL8812AU Usb adapter driver issues

EDIT 2: Other methods used that did not work


8812au, 4.2.2, 4.15.0-43-generic, x86_64: installed
nvidia, 390.77, 4.15.0-29-generic, x86_64: installed
nvidia, 390.77, 4.15.0-43-generic, x86_64: installed
rtl8812au, 4.2.2, 4.15.0-43-generic, x86_64: built
rtl8812au,, 4.15.0-43-generic, x86_64: installed (WARNING! Diff between built and installed module!)</pre>
 modinfo rtl8812au
modinfo: ERROR: Module rtl8812au not found.
 egrep -i 'file

So far no results whatsoever

On another note when it fails to connect or randomly disconnects and restarts it says this: activation of network connection failed


dkms status
8812au, 4.2.2, 4.15.0-43-generic, x86_64: installed
nvidia, 390.77, 4.15.0-29-generic, x86_64: installed
nvidia, 390.77, 4.15.0-43-generic, x86_64: installed
rtl8812au, 4.2.2, 4.15.0-43-generic, x86_64: built
rtl8812au,, 4.15.0-43-generic, x86_64: installed (WARNING! Diff between built and installed module!)

modinfo 8812au
filename:       /lib/modules/4.15.0-43-generic/updates/dkms/8812au.ko
version:        v4.2.2_7502.20130517
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     36763F235027909099BE43F
alias:          usb:v2001p3318d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDApA811d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v04BBp0953d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v056Ep4007d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0411p0242d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2019pAB32d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0846p9052d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3314d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pA813d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pA812d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pA811d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8822d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp0821d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp0811d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2604p0012d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8812d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0411p025Dd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p010Ed*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p010Dd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p0103d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p0101d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v20F4p805Bd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3316d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3315d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v07B8p8812d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2019pAB30d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v1740p0100d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v13B1p003Fd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v1058p0632d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3313d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0586p3426d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0E66p0022d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B05p17D2d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0409p0408d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0789p016Ed*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v04BBp0952d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0DF6p0074d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pA822d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p330Ed*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v050Dp1109d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v050Dp1106d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp881Cd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp881Bd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp881Ad*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8812d*dc*dsc*dp*ic*isc*ip*in*
retpoline:      Y
name:           8812au
vermagic:       4.15.0-43-generic SMP mod_unload 
signat:         PKCS#7
sig_hashalgo:   md4
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_regulatory_id:int
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_initmac:charp
parm:           rtw_channel_plan:int
parm:           rtw_chip_version:int
parm:           rtw_rfintfs:int
parm:           rtw_lbkmode:int
parm:           rtw_network_mode:int
parm:           rtw_channel:int
parm:           rtw_mp_mode:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_busy_thresh:int
parm:           rtw_ht_enable:int
parm:           rtw_bw_mode:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_ampdu_amsdu:int
parm:           rtw_vht_enable:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_rf_config:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_enusbss:int
parm:           rtw_hwpdn_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_mc2u_disable:int
parm:           rtw_80211d:Enable 802.11d mechanism (int)
parm:           rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)
parm:           rtw_led_enable:Enable status LED (int)
egrep -i 'file|vermagic' 

It still gives me no result.


$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 258a:0001  
Bus 005 Device 002: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0bda:a811 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


When I run dkms status I get nothing because I have nothing installed anymore

$ ls -al 
total 168
drwxr-xr-x 20 
drwxr-xr-x  3  ..
-rw-------  1  .bash_history
-rw-r--r--  1 .bash_logout
-rw-r--r--  1  .bashrc
drwx------ 18  .cache
drwxr-xr-x  3 .cert
drwx------ 17  .config
drwxr-xr-x  2  Desktop
drwxr-xr-x  2 Documents
drwxr-xr-x  4 Downloads
drwx------  3  .gnupg
-rw-------  1  .ICEauthority
drwx------  3 .local
drwx------  5  .mozilla
drwxr-xr-x  2 Music
drwxr-xr-x  2 Pictures
drwx------  3  .pki
-rw-r--r--  1 .profile
dr--------  3  .protonvpn-cli
-rwxr-xr-x  1  protonvpn-cli.sh
drwxr-xr-x  2  Public
drwxr-xr-x  3  snap
drwx------  2  .ssh
-rw-r--r--  1  .sudo_as_admin_successful
drwxr-xr-x  2   9 Templates
drwxr-xr-x  2   Videos
-rw-r--r--  1 root       root    .wget-hsts

$ ls -al /var/lib/dkms
total 12
drwxr-xr-x  2 root root 4096 Dec 25 21:17 .
drwxr-xr-x 69 root root 4096 Dec 25 21:18 ..
-rw-r--r--  1 root root    6 Aug 31  2016 dkms_dbversion

$ ls -al /boot
total 134957
drwxr-xr-x  4 root root     .
drwxr-xr-x 24 root root      ..
-rw-r--r--  1 root root  abi-4.15.0-29-generic
-rw-r--r--  1 root root    config-4.15.0-29-generic
-rw-r--r--  1 root root   config-4.15.0-43-generic
drwx------  3 root root     efi
drwxr-xr-x  5 root root     grub
-rw-r--r--  1 root root  initrd.img-4.15.0-29-generic
-rw-r--r--  1 root root  initrd.img-4.15.0-43-generic
-rw-r--r--  1 root root   memtest86+.bin
-rw-r--r--  1 root root   memtest86+.elf
-rw-r--r--  1 root root    memtest86+_multiboot.bin
-rw-r--r--  1 root root        retpoline-4.15.0-29-generic
-rw-------  1 root root  System.map-4.15.0-29-generic
-rw-------  1 root root   System.map-4.15.0-43-generic
-rw-r--r--  1 root root   vmlinuz-4.15.0-29-generic
-rw-------  1 root root   vmlinuz-4.15.0-43-generic

(omitted some info in the last ones)

EDIT 7: I installed the drivers from the alternative method given to me and they did finally seem like they were working, but sadly they are showing the same errors as the drivers from before such as the inability or the difficulty to connect and sudden drop of said connection. Not to mention the constant asking for the wifi's passcode after entering it over 5 times and the error: network failed to start popping up all the time. With the way things are going it might be time to get a new wifi adapter, maybe a pci card instead of dealing with this headache, I still hold some hope that I will find a working driver.

Best Answer

  • Remove the three existing 8812 dkms drivers that are installed now.

    sudo dkms remove 8812au/4.2.2 --all
    sudo dkms remove rtl8812au/4.2.2 --all
    sudo dkms remove rtl8812au/ --all

    See the new driver at rtl8812au https://github.com/zebulon2/rtl8812au-driver-5.2.20

    sudo apt update
    sudo apt install git # if you don't already have git
    git clone https://github.com/zebulon2/rtl8812au-driver-5.2.20.git

    Follow the README instructions in the source code. It should look something like:

    (as root, or sudo) copy source folder contents to /usr/src/rtl8812au-5.2.20...

    sudo cp -a ~/Desktop/rtl8812au-driver-5.2.20 /usr/src/rtl8812au-5.2.20
    sudo dkms add -m rtl8812au -v 5.2.20
    sudo dkms build -m rtl8812au -v 5.2.20
    sudo dkms install -m rtl8812au -v 5.2.20
    dkms status # to show currently installed drivers

    Note: see man dkms for more info about these commands.

    Update #1:

    It turns out that the v5.2.20 8812 driver doesn't support your USB network device. Here are some brief instructions for another driver that does support your dongle...

    Source: https://github.com/abperiasamy/rtl8812AU_8821AU_linux

    sudo dkms remove rtl8812au/5.2.20 --all # remove dkms driver
    sudo rm -r /usr/src/rtl8812au-5.2.20 # remove source code
    git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
    cd rtl8812AU_8821AU_linux-master # change directory to source code folder
    sudo make -f Makefile.dkms install # do a dkms install
    dkms status # show current dkms drivers installed

    Alternate install, if the above doesn't work:

    sudo dkms remove rtl8812au/5.2.20 --all # remove dkms driver
    sudm rm -r /usr/src/rtl8812au-5.2.20 # remove source code
    git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
    cd rtl8812AU_8821AU_linux
    sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
    sudo dkms add -m rtl8812AU_8821AU_linux -v 1.0
    sudo dkms build -m rtl8812AU_8821AU_linux -v 1.0
    sudo dkms install -m rtl8812AU_8821AU_linux -v 1.0
    dkms status
  • Related Question