Wifi RTL8812AU downgrade kernel?

Hi guys, and happy new year!

Did actually anyone managed to setup Wifi RTL8812AU with kernel 5.3.7-301 ? i am struggling with cables and really need to use wifi and make it work, can someone advise me to which kernel version i should downgrade so i can make wifi work please?

$ nmcli radio wifi

enabled


$ lsusb

Bus 002 Device 003: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter


$ uname -a

Linux localhost.localdomain 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Requirements

sudo dnf install dkms kernel-devel kernel-headers git make

2019-07-11: Updated to compile against kernel 5.2 check GIT for updates

Download

Realtek’s 8812AU driver files are on the internet, hosted via GitHub.

git clone https://github.com/gnab/rtl8812au.git /usr/src/8812au-4.2.2/
cd /usr/src/8812au-4.2.2/
make
cp 8812au.ko /lib/modules/5.3.7-301.fc31.x86_64/kernel/drivers/net/wireless
sudo insmod 8812au.ko
sudo depmod -a
sudo modprobe 8812au

note: change the kernel with the output of this command uname -r 5.3.7-301.fc31.x86_64

NOTE: you have to do this on every kernel update…


or VIA


DKMS setup

DKMS (Dynamic Kernel Module Support) is a framework for the Linux kernel that allows third-party Linux kernel modules (like this WiFi driver) to be automatically re-installed every time the Linux kernel receives a new update.

git clone https://github.com/gnab/rtl8812au.git /usr/src/8812au-4.2.2/
cd /usr/src/8812au-4.2.2/
make
dkms add -m 8812au -v 4.2.2
dkms build -m 8812au -v 4.2.2
sudo dkms install -m 8812au -v 4.2.2

With all of the DMKS stuff out of the way, use the echo command below to ensure that the driver automatically loads up at boot.

echo 8812au | sudo tee -a /etc/modules

your Realtek 8812AU WiFI card should work using both cases…

Eventually remove from DKMS with:

sudo dkms remove -m 8812au -v 4.2.2 --all

Regards.,

thank you but i am getting that a file is missing :frowning:

[aris@localhost ~]$ sudo git clone https://github.com/gnab/rtl8812au.git /usr/src/8812au-4.2.2/
Cloning into '/usr/src/8812au-4.2.2'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 774 (delta 24), reused 31 (delta 11), pack-reused 713
Receiving objects: 100% (774/774), 1.98 MiB | 2.33 MiB/s, done.
Resolving deltas: 100% (330/330), done.
[aris@localhost ~]$ 
[aris@localhost ~]$ 
[aris@localhost ~]$ cd /usr/src/8812au-4.2.2/
[aris@localhost 8812au-4.2.2]$ 
[aris@localhost 8812au-4.2.2]$ 
[aris@localhost 8812au-4.2.2]$ cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/
**cp: cannot stat '8812au.ko': No such file or directory** <----------------------------------

file “8812au.ko” doesnt seem to be there indeed:

[aris@localhost 8812au-4.2.2]$ pwd
/usr/src/8812au-4.2.2
[aris@localhost 8812au-4.2.2]$ ls -l
total 92
-rw-r--r--. 1 root root    64 Jan  1 14:55 clean
drwxr-xr-x. 3 root root  4096 Jan  1 14:55 core
-rw-r--r--. 1 root root   192 Jan  1 14:55 dkms.conf
drwxr-xr-x. 5 root root  4096 Jan  1 14:55 hal
-rw-r--r--. 1 root root    54 Jan  1 14:55 ifcfg-wlan0
drwxr-xr-x. 4 root root 12288 Jan  1 14:55 include
-rwxr-xr-x. 1 root root   556 Jan  1 14:55 install.sh
-rw-r--r--. 1 root root   109 Jan  1 14:55 Kconfig
-rw-r--r--. 1 root root 31627 Jan  1 14:55 Makefile
drwxr-xr-x. 3 root root  4096 Jan  1 14:55 os_dep
drwxr-xr-x. 2 root root  4096 Jan  1 14:55 project
-rw-r--r--. 1 root root  2478 Jan  1 14:55 README.md
-rw-r--r--. 1 root root     0 Jan  1 14:55 repoTest1.js
-rw-r--r--. 1 root root     0 Jan  1 14:55 repoTest2.htm
-rw-r--r--. 1 root root   432 Jan  1 14:55 runwpa
-rw-r--r--. 1 root root   294 Jan  1 14:55 wlan0dhcp

All the necessary packages have been installed:

[aris@localhost 8812au-4.2.2]$ sudo dnf install -y dkms
Last metadata expiration check: 0:05:25 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package dkms-2.7.1-2.fc31.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[aris@localhost 8812au-4.2.2]$ sudo dnf install -y kernel-devel
Last metadata expiration check: 0:05:37 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package kernel-devel-5.3.16-300.fc31.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[aris@localhost 8812au-4.2.2]$ sudo dnf install -y kernel-headers
Last metadata expiration check: 0:05:47 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package kernel-headers-5.3.6-300.fc31.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[aris@localhost 8812au-4.2.2]$ sudo dnf install -y git
Last metadata expiration check: 0:05:56 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package git-2.23.0-1.fc31.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

The driver is built by running make , and can be tested by loading the built module using insmod :

cd /usr/src/8812au-4.2.2/
make
sudo insmod 8812au.ko

or copy

cd /usr/src/8812au-4.2.2/
make
sudo cp 8812au.ko /lib/modules/5.3.7-301.fc31.x86_64/kernel/drivers/net/wireless
sudo depmod

note: change the kernel with the output of this command uname -r 5.3.7-301.fc31.x86_64

but it better running a script provided by the git, it does all the works by you:

cd /usr/src/8812au-4.2.2/
sudo ./install.sh

Regards.,

unfortunately it gives this error:
[aris@localhost 8812au-4.2.2]$ sudo ./install.sh
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.3.7-301.fc31.x86_64/build M=/usr/src/8812au-4.2.2 modules
make[1]: *** /lib/modules/5.3.7-301.fc31.x86_64/build: No such file or directory. Stop.
make: *** [Makefile:1068: modules] Error 2

important step is: you have to do all this step in one kernel:

you’re using the script in kernel 5.3.7-301 but you’ve installed the dependencies for kernel 5.3.16-300

make[1]: *** /lib/modules/5.3.7-301.fc31.x86_64/build: No such file or directory. Stop.

[aris@localhost 8812au-4.2.2]$ sudo dnf install -y kernel-devel
Last metadata expiration check: 0:05:37 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package kernel-devel-5.3.16-300.fc31.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[aris@localhost 8812au-4.2.2]$ sudo dnf install -y kernel-headers
Last metadata expiration check: 0:05:47 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package kernel-headers-5.3.6-300.fc31.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

However let me check this…

Regards.,

first command works, but second fails

[aris@localhost 8812au-4.2.2]$ sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
Last metadata expiration check: 0:30:07 ago on Wed 01 Jan 2020 02:54:20 PM CET.
Package kernel-devel-5.3.7-301.fc31.x86_64 is already installed.
No match for argument: kernel-headers-5.3.7-301.fc31.x86_64
**Error: Unable to find a match: kernel-headers-5.3.7-301.fc31.x86_64**
[aris@localhost 8812au-4.2.2]$

but make comand was succesfull:

  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/8812au-4.2.2/8812au.mod.o
  LD [M]  /usr/src/8812au-4.2.2/8812au.ko
make[1]: Leaving directory '/usr/src/kernels/5.3.7-301.fc31.x86_64'
[aris@localhost 8812au-4.2.2]$ 
[aris@localhost 8812au-4.2.2]$ 
[aris@localhost 8812au-4.2.2]$ sudo insmod 8812au.ko

thank you, now it works, however i need to input the command “” sudo insmod 8812au.ko" after every reboot, can you help me to make it persistent ?

you made persistent for this kernel _ 5.3.7-301.fc31.x86_64_

but if a new kernel update come you have to do the step on every kernel, so you have to option:

  1. execute the step in every kernel you have or in every update kernel come
  2. use the DKMS option for all kernel updates…

a bit explanation of this command:

The insmod command inserts a into the kernel.

depmod — Generate a list of kernel module dependencies and associated map files.
lsmod — Show the status of Linux kernel modules.

to make persistent for every kernel update, use the DKMS option…

Regards.,

unfortunately after the reboot, wifi is still disabled on the connections list :frowning:

[aris@localhost 8812au-4.2.2]$ nmcli radio wifi
enabled
[aris@localhost 8812au-4.2.2]$ uname -a
Linux localhost.localdomain 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[aris@localhost 8812au-4.2.2]$ echo 8812au | sudo tee -a /etc/modules
8812au

Try this:

git clone https://github.com/gnab/rtl8812au.git /usr/src/8812au-4.2.2/
cd /usr/src/8812au-4.2.2/
make
cp 8812au.ko /lib/modules/5.3.7-301.fc31.x86_64/kernel/drivers/net/wireless
sudo insmod 8812au.ko
sudo depmod -a
sudo modprobe 8812au

note: change the kernel with the output of this command uname -r 5.3.7-301.fc31.x86_64

after insmode → After loading the module, a wireless network interface named Realtek 802.11n WLAN Adapter should be available.

after depmod → The driver module should now be loaded automatically.

you can use lsmod to check if the drivers is loaded well…

the following command is used if you select the DKMS method:

echo 8812au | sudo tee -a /etc/modules

Regards.,

still nothing unfortunately :frowning:

aris@localhost ~]$ echo 8812au | sudo tee -a /etc/modules
8812au
[aris@localhost ~]$ sudo insmod 8812au.ko
insmod: ERROR: could not load module 8812au.ko: No such file or directory
  
  [aris@localhost ~]$ cd /usr/src/8812au-4.2.2/
[aris@localhost 8812au-4.2.2]$ sudo insmod 8812au.ko
[aris@localhost 8812au-4.2.2]$ sudo depmod -a
[aris@localhost 8812au-4.2.2]$ sudo modprobe 8812au
[aris@localhost 8812au-4.2.2]$ echo 8812au | sudo tee -a /etc/modules
8812au


[aris@localhost 8812au-4.2.2]$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 0a5c:21ec Broadcom Corp. BCM20702A0
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[

[aris@localhost 8812au-4.2.2]$ lsmod
Module                  Size  Used by
8812au               1056768  0
rfcomm                 90112  16
nf_conntrack_netbios_ns    16384  1
nf_conntrack_broadcast    16384  1 nf_conntrack_netbios_ns
xt_CT                  16384  1
ip6t_REJECT            16384  11
nf_reject_ipv6         20480  1 ip6t_REJECT
ip6t_rpfilter          16384  1

Thank you very much and happy new year !!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.