Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project: Add 8812au rtw88 in-kernel driver. Need testers... #27

Open
morrownr opened this issue Jun 23, 2024 · 129 comments
Open

Project: Add 8812au rtw88 in-kernel driver. Need testers... #27

morrownr opened this issue Jun 23, 2024 · 129 comments

Comments

@morrownr
Copy link
Owner

morrownr commented Jun 23, 2024

Greetings to anyone that reads this message.

This Issue is where we coordinate and take bug reports for the new 8812au in-kernel driver.

An effort is underway to add support for the rtl8812au chipset to the rtw88 in-kernel driver series. The driver is available for testing at the following repo:

https://github.com/lwfinger/rtw88

Remember to first remove the out-of-kernel driver in this repo or whatever repo you may have installed. You can run the following to remove it if using this repo:

$ sudo sh remove-driver.sh

It is important to follow the instructions in the README at the repo with the new test driver. You may not be familiar with rtw88 in the kernel but even if you are, there are some necessary mods that you need to know about. The rtw88 that has this new driver is more advanced than the rtw88 in stable kernels as it follows wireless-next and is used to work on and develop new drivers.

We welcome you to test and report on this new driver. Your testing will help us get this new driver in the Linux kernel sooner and in better shape. If you are aware of anyone who is familiar with mac80211 drivers, please invite them as more eyes on the code is a good thing. Your ideas are most welcome. We can do this.

@morrownr

Status report:

  • USB 3 support. Please test with USB 3 ports and USB 2 ports. Even USB 1.x if you have them.

Reports go in this issue.

@tcoard
Copy link

tcoard commented Jun 23, 2024

Updating to kernel 6.9.3 broke my wifi (I was on aircrack-ng/rtl8812au before), so I tried the repo you linked and it works!

System: Pop_OS!
Device: Linksys WUSB6300
USB Ports tried: 3.2 gen2, 3.2 gen1, 2.0
Notes: All ports work, I had to enter the credentials for my wifi network again when trying the 2.0 port.

Let me know if there is any more info you would like. (I don't know much about drivers, so I don't know what information is pertinent to send).

@morrownr
Copy link
Owner Author

@dubhater

Adding you to this message to make sure you are on this new issue for the 8812au. Note that this Issue is in the 8812au repo. See first report above.

@tcoard

I tried the repo you linked and it works!

That is great.

All ports work, I had to enter the credentials for my wifi network again when trying the 2.0 port.

Entering credentials again when you switch ports seems to be normal operations. Now to make sure that the driver is switching to be in the correct mode, can I get you to run the following command while in a usb2 port and then again in a usb3 port:

$ lsusb -t

Please post both sets of results. On the line for your driver, you should see 5000 if in usb3 mode and 480 if in usb2 mode. We need to make sure that is happening properly.

Let me know if there is any more info you would like. (I don't know much about drivers, so I don't know what information is pertinent to send).

Well figure out what info we need as we go. You just keep using it and if something does not work like you think it should, let us know what is wrong and we will tell you what info we need.

Your help is greatly appreciated. It will be cool when this driver is in mainline. Our 8812au adapters will finally have a proper in-kernel driver and will be plug and play.

@tcoard
Copy link

tcoard commented Jun 24, 2024

@morrownr

Yup, I see 5000 if in usb3 mode and 480 if in usb2 mode.

usb3:

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
    |__ Port 4: Dev 6, If 0, Class=Vendor Specific Class, Driver=rtw_8812au, 5000M
    |__ Port 6: Dev 2, If 0, Class=Audio, Driver=snd-usb-audio, 5000M
    |__ Port 6: Dev 2, If 1, Class=Audio, Driver=snd-usb-audio, 5000M
    |__ Port 6: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
    |__ Port 6: Dev 2, If 3, Class=Human Interface Device, Driver=usbhid, 5000M
    |__ Port 6: Dev 2, If 4, Class=Vendor Specific Class, Driver=, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 12, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 12, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 12, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 9, If 2, Class=Audio, Driver=snd-usb-audio, 12M
            |__ Port 1: Dev 9, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            |__ Port 1: Dev 9, If 3, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 9, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 11: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 10, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 12: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

usb2:

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
    |__ Port 6: Dev 2, If 0, Class=Audio, Driver=snd-usb-audio, 5000M
    |__ Port 6: Dev 2, If 1, Class=Audio, Driver=snd-usb-audio, 5000M
    |__ Port 6: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
    |__ Port 6: Dev 2, If 3, Class=Human Interface Device, Driver=usbhid, 5000M
    |__ Port 6: Dev 2, If 4, Class=Vendor Specific Class, Driver=, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 12, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 12, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 12, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 9, If 2, Class=Audio, Driver=snd-usb-audio, 12M
            |__ Port 1: Dev 9, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            |__ Port 1: Dev 9, If 3, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 9, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 10: Dev 20, If 0, Class=Vendor Specific Class, Driver=rtw_8812au, 480M
    |__ Port 11: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 10, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 12: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M

@Jake-Grafton
Copy link

The rtw8812au driver works flawlessly with my (previously useless) ALFA AWUS036ACH!

Monitor mode works! (see screenshot)
working-driver

The driver also works with USB 3 and USB 2.
USB 3 Port:

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtw_8812au, 5000M

USB 2 Port:

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 7, If 0, Class=Vendor Specific Class, Driver=rtw_8812au, 480M

@kikitte
Copy link

kikitte commented Jun 24, 2024

Finally we get the kernel driver! Thank you!

Model: ALFA AWUS036ACH

  • USB3 & USB2 works good.
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    |__ Port 001: Dev 002, If 0, Class=Vendor Specific Class, Driver=rtw_8812au, 5000M
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 480M
    |__ Port 006: Dev 002, If 0, Class=Vendor Specific Class, Driver=[none], 12M
    |__ Port 006: Dev 002, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 007: Dev 003, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 002: Dev 004, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 002: Dev 004, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 009: Dev 006, If 0, Class=Vendor Specific Class, Driver=rtw_8812au, 480M
  • Monitor mode works with aircrack-ng but not working with hcxdumptool
    UPDATE: Monitor mode works with aircrack-ng but not working with hcxdumptool, I am using the wrong command to test hcxdumptool.
- **A lot of WARNING shows in dmeg**
A full log can be checked in [dmesg.txt](https://github.com/user-attachments/files/15957007/dmesg.txt).
![Screenshot_20240624_220216](https://github.com/morrownr/8812au-20210820/assets/23274684/2522a50a-44f1-404b-8c17-288e40c4ba16)


@dubhater
Copy link

@kikitte Someone sent a fix for those warnings: https://lore.kernel.org/linux-wireless/[email protected]/

@Jake-Grafton What is the application in your screenshot?

@Redditor247
Copy link

Redditor247 commented Jun 24, 2024

Currently working with this driver. Installed correctly, but can't get this to go into monitor mode for whatever reason. Card being used is an Alfa AWUS036ACH, realtek 8812au driver.

sudo ip link set wlan1 down
sudo iw wlan1 set monitor none

command failed: Operation not supported (-95)

This will connect to Wi-Fi and hold a connection fine, but monitor mode will error out.

UPDATE: tried a clean install of the experimental driver and nothing. Going to keep trying and update as able.

@kikitte
Copy link

kikitte commented Jun 24, 2024

@kikitte Someone sent a fix for those warnings: https://lore.kernel.org/linux-wireless/[email protected]/

@Jake-Grafton What is the application in your screenshot?

About monitor mode, may be something went wrong in my system, it is not related to this driver, Intel AX200 also not working with hcxdumptool but I can conform it works a few days ago

UPDATE: Monitor mode works with aircrack-ng but not working with hcxdumptool. I am using the wrong command to test hcxdumptool.

@Jake-Grafton
Copy link

@Jake-Grafton What is the application in your screenshot?

hcxdumptool, as it is vastly superior to the aircrack-ng suite.

@morrownr
Copy link
Owner Author

@dubhater

The author of hcxdumptool is @ZerBea . He was helping with the testing of 8821/11au. He can likely answer questions about hcxdumptool if you have any. We may need to see if anyone has an extra 8812au based adapter that we can get into his hands. Unfortunately I only have one 8812au based adapter or I would get one in the mail to him today.

@ZerBea
Copy link

ZerBea commented Jun 24, 2024

@morrownr
No need to send a device, according to this screen shots, hcxdumptool is working as expected:
ZerBea/hcxdumptool#458 (comment)
BTW:
Don't worry about the 160 packets dropped by kernel.
Running monitor mode and interacting with the targets (APs andCLIENTs) places very high demands on the hardware. As a result, some packets are dropped by the kernel.

I'll order this adapter:
https://www.reichelt.de/de/en/usb-3-0-dual-band-wlan-mini-stick-867-mbps-delock-12502-p208115.html?GROUPID=5839&START=0&OFFSET=16&SID=929bb67fe740d35447714c48cdad3a0042274c665a29e76c30d98&LANGUAGE=EN&&r=1

According to Delock, it should be a RTL8812AU based one:
https://www.delock.de/produkt/12502/merkmale.html?setLanguage=en

There is no need to run hcxdumptool on high TX power devices.
ZerBea/hcxdumptool#419

@castillofrancodamian
Copy link

@morrownr The sudo sh remove-driver.sh command to uninstall the driver is not working. I restart the PC and still see networks in network manager.

@alkisg
Copy link
Collaborator

alkisg commented Jun 25, 2024

How about this?

sudo rm /lib/modules/6.9.6-arch1-1/updates/dkms/8812au.ko.zst
sudo depmod -a
reboot

@sisi399
Copy link

sisi399 commented Jun 25, 2024

I've noticed there's ongoing development of a mac80211 driver for the RTL8812AU chip. As someone who's been following this topic casually, I'm hoping for some insights:

  1. Can someone explain the recent developments in layman's terms? What significant changes have occurred?

  2. Historical context: In the past, many issues with RTL8812AU-based devices were attributed to Realtek not releasing mac80211-compatible source code. Has this situation changed?

  3. What prompted this development? Did Realtek change their policy and release source code, or is this an independent effort?

  4. I've seen mentions of a developer named "lwfinger" in relation to this project. Are they affiliated with Realtek, or are they an independent contributor?

  5. Was developing a mac80211 driver always technically feasible, and the delay was due to a lack of developer expertise or interest? Or were there genuine technical or legal barriers that have only recently been overcome?

I've attempted to research these questions independently but haven't found comprehensive answers. As a novice in this field, I'd greatly appreciate any insights from those more knowledgeable about the situation.

Thank you for any information or clarification you can provide!

@morrownr
Copy link
Owner Author

morrownr commented Jun 25, 2024

Hi @sisi399

I've noticed there's ongoing development of a mac80211 driver for the RTL8812AU chip.

You are at the right place. Read message one in this thread for instructions on how to test.

I've seen mentions of a developer named "lwfinger" in relation to this project. Are they affiliated with Realtek, or are they an independent contributor?

Larry Finger passed away last Friday. RIP Larry. He will be greatly missed but we are trying to carry on without him. We are still using his rtw88 repo to do the work. @dubhater and I have the appropriate rights to use the site.

I am really busy right now so maybe we can get to more of your questions later. Right now, we need testers so please read the first message in thread and consider helping us by testing.

Regards,

@morrownr

Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
Repository owner deleted a comment from dubhater Jun 25, 2024
Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
Repository owner deleted a comment from dubhater Jun 25, 2024
Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
Repository owner deleted a comment from castillofrancodamian Jun 25, 2024
@dubhater
Copy link

AP mode should work now.

I also enabled power saving. @castillofrancodamian You will be disappointed:

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=125 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=147 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=170 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=295 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=113 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=32.2 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=158 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=76.6 ms
64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=201 ms
64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=18.3 ms

As far as I can tell, it's because of the way rtw88 decides when to enter power saving and for how long. The official driver makes those decisions differently. Something to ask Ping-Ke about...

@ZerBea
Copy link

ZerBea commented Jun 27, 2024

@dubhater
Does this mean that the nl80211 message "NL80211_PS_DISABLED" addressed to "NL80211_ATTR_PS_STATE" will be ignored in monitor mode too?

@dubhater
Copy link

Is that the same as running iw wlp3s0f3u2 set power_save off ? I don't think rtw88 is ignoring it.

@morrownr
Copy link
Owner Author

@dubhater

$ $ ls /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtw88/

rtw_8703b.ko.xz   rtw_8821au.ko.xz  rtw_8822ce.ko.xz    rtw88_8821cs.ko.xz  rtw88_8822cu.ko.xz
rtw_8723cs.ko.xz  rtw_8821ce.ko.xz  rtw_8822c.ko.xz     rtw88_8821cu.ko.xz  rtw88_core.ko.xz
rtw_8723de.ko.xz  rtw_8821c.ko.xz   rtw_8822cs.ko.xz    rtw88_8822be.ko.xz  rtw88_pci.ko.xz
rtw_8723d.ko.xz   rtw_8821cs.ko.xz  rtw_8822cu.ko.xz    rtw88_8822b.ko.xz   rtw88_sdio.ko.xz
rtw_8723ds.ko.xz  rtw_8821cu.ko.xz  rtw88_8723de.ko.xz  rtw88_8822bs.ko.xz  rtw88_usb.ko.xz
rtw_8723du.ko.xz  rtw_8822be.ko.xz  rtw88_8723d.ko.xz   rtw88_8822bu.ko.xz  rtw_core.ko.xz
rtw_8723x.ko.xz   rtw_8822b.ko.xz   rtw88_8723du.ko.xz  rtw88_8822ce.ko.xz  rtw_pci.ko.xz
rtw_8812au.ko.xz  rtw_8822bs.ko.xz  rtw88_8821ce.ko.xz  rtw88_8822c.ko.xz   rtw_sdio.ko.xz
rtw_8821a.ko.xz   rtw_8822bu.ko.xz  rtw88_8821c.ko.xz   rtw88_8822cs.ko.xz  rtw_usb.ko.xz

That is what I am seeing. Gotta be careful changing those names. I know you are working on patches to upstream but you are breaking this repo.

@a5a5aa555oo
Copy link

I have also noticed that the rtl8812au driver is still being compiled when updating the kernel. Is there any log to show what I see when doing that process? Maybe that's the reason for all the problems.

Maybe your rtl8812au driver was installed via dkms, you can check it with this command.
sudo dkms status

@a5a5aa555oo
Copy link

@dubhater I have a question:

I checked uninstall step in Makefile, won't the system crash
if a driver for PCI-E wireless adapter is unloaded on a running system?

uninstall:
	modprobe -r rtw_8723cs
ifeq ($(CONFIG_PCI), y)
	modprobe -r rtw_8723de
endif
	modprobe -r rtw_8723ds
	modprobe -r rtw_8723du
	modprobe -r rtw_8812au
	modprobe -r rtw_8821au
ifeq ($(CONFIG_PCI), y)
	modprobe -r rtw_8821ce
endif
	modprobe -r rtw_8821cs
	modprobe -r rtw_8821cu
ifeq ($(CONFIG_PCI), y)
	modprobe -r rtw_8822be
endif
	modprobe -r rtw_8822bs
	modprobe -r rtw_8822bu
ifeq ($(CONFIG_PCI), y)
	modprobe -r rtw_8822ce
endif
	modprobe -r rtw_8822cs
	modprobe -r rtw_8822cu

@Samt43
Copy link

Samt43 commented Jul 24, 2024

@dubhater @morrownr : I tried 4a1ee64475672a9186e10d87ac5e251448f86914 (beacon fix) with a 8822bu device. In my case, unfortunatly i still can't see my hotspot on 5GHz band using an intel wifi card (windows 10) and also my lenovo duet device (chromeos). Using realtek driver, i have no issue. My phone (realtek) and my android box (mediatek) can both see it (for these two devices hotspot seems to work). Not sure your fix fix beacon issue for 8822bu device unfortunatly :'(

@dubhater
Copy link

dubhater commented Jul 24, 2024

I think you did this.

@morrownr I thought one of the pull requests I merged recently broke it, but no, that part of the Makefile hasn't changed. It actually looks like a bug in modprobe. From its manual:

Normally, modprobe will succeed (and do nothing) if told to insert a module which is already present or to remove a module which isn't present.

@a5a5aa555oo I'm unloading rtw_8822ce all the time and nothing bad happens.

@castillofrancodamian You don't need to uninstall rtw88, or to install 8812au. It's enough to manually unload rtw_8812au (the others don't matter for this case), then you can load 8812au. Works until you reboot.

rmmod rtw_8812au
insmod /path/to/8812au.ko rtw_switch_usb_mode=1

@dubhater
Copy link

Or maybe one of those changes did break it. The SDIO drivers should be uninstalled only if they were compiled.

@a5a5aa555oo
Copy link

a5a5aa555oo commented Jul 24, 2024

Or maybe one of those changes did break it. The SDIO drivers should be uninstalled only if they were compiled.

I made a patch to fix it, I'll open a pull request later.

diff --git a/Makefile b/Makefile
index c97133b..bbec8ec 100644
--- a/Makefile
+++ b/Makefile
@@ -184,35 +184,12 @@ endif
        @echo "The driver rtw88 and its firmware installed successfully!"
 
 uninstall:
-       modprobe -r rtw_8723cs
-ifeq ($(CONFIG_PCI), y)
-       modprobe -r rtw_8723de
-endif
-       modprobe -r rtw_8723ds
-       modprobe -r rtw_8723du
-       modprobe -r rtw_8812au
-       modprobe -r rtw_8821au
-ifeq ($(CONFIG_PCI), y)
-       modprobe -r rtw_8821ce
-endif
-       modprobe -r rtw_8821cs
-       modprobe -r rtw_8821cu
-ifeq ($(CONFIG_PCI), y)
-       modprobe -r rtw_8822be
-endif
-       modprobe -r rtw_8822bs
-       modprobe -r rtw_8822bu
-ifeq ($(CONFIG_PCI), y)
-       modprobe -r rtw_8822ce
-endif
-       modprobe -r rtw_8822cs
-       modprobe -r rtw_8822cu
-       
-       rm -f $(MODDESTDIR)/rtw_*.ko*
-       
+       @-modprobe -raq rtw_8723{cs,de,ds,du}
+       @-modprobe -raq rtw_8822{be,bs,bu,ce,cs,cu}
+       @-modprobe -raq rtw_8821{au,ce,cs,cu} rtw_8812au
+       @rm -vf $(MODDESTDIR)/rtw_*.ko*
        depmod $(DEPMOD_ARGS)
-       
-       @echo "Uninstall rtw88 SUCCESS"
+       @echo "The driver rtw88 was uninstalled successfully."

@castillofrancodamian
Copy link

castillofrancodamian commented Jul 24, 2024

I have also noticed that the rtl8812au driver is still being compiled when updating the kernel. Is there any log to show what I see when doing that process? Maybe that's the reason for all the problems.

Maybe your rtl8812au driver was installed via dkms, you can check it with this command. sudo dkms status

That's how it is. When I tested the rtl8812au driver I did it using dkms.

[franco@pc ~]$ sudo dkms status
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/rtl8812au-5.13.6/23/source/dkms.conf does not exist.
rtl8812au/5.13.6: added

I think you did this.

@morrownr I thought one of the pull requests I merged recently broke it, but no, that part of the Makefile hasn't changed. It actually looks like a bug in modprobe. From its manual:

Normally, modprobe will succeed (and do nothing) if told to insert a module which is already present or to remove a module which isn't present.

@a5a5aa555oo I'm unloading rtw_8822ce all the time and nothing bad happens.

@castillofrancodamian You don't need to uninstall rtw88, or to install 8812au. It's enough to manually unload rtw_8812au (the others don't matter for this case), then you can load 8812au. Works until you reboot.

rmmod rtw_8812au
insmod /path/to/8812au.ko rtw_switch_usb_mode=1

I get:

[franco@pc ~]$ sudo rmmod rtw_8812au
rmmod: ERROR: Module rtw_8812au is not currently loaded
[franco@pc ~]$ sudo insmod /path/to/8812au.ko rtw_switch_usb_mode=1
insmod: ERROR: could not load module /path/to/8812au.ko: No such file or directory

@a5a5aa555oo
Copy link

@castillofrancodamian

If you don't want rtl8812au driver be built/installed during a kernel update, you can remove it.
sudo dkms remove rtl8812au/5.13.6 --all

@castillofrancodamian
Copy link

castillofrancodamian commented Jul 24, 2024

@castillofrancodamian

If you don't want rtl8812au driver be built/installed during a kernel update, you can remove it. sudo dkms remove rtl8812au/5.13.6 --all

The rest of the driver remains unremoved.

[franco@pc ~]$ sudo dkms remove rtl8812au/5.13.6 --all
[sudo] contraseña para franco:
Deleting module rtl8812au-5.13.6 completely from the DKMS tree.

After reboot.

[franco@pc ~]$ sudo dkms status
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/rtl8812au-5.13.6/23/source/dkms.conf does not exist.
[franco@pc ~]$ sudo dkms remove rtl8812au/5.13.6 --all
Error! The module/version combo: rtl8812au-5.13.6 is not located in the DKMS tree.

I think I'm going to have to use the old reliable: reinstall the operating system.

@a5a5aa555oo
Copy link

a5a5aa555oo commented Jul 24, 2024

Before reinstalling your OS, try just removing /var/lib/dkms/rtl8812au-5.13.6

sudo rm -rf /var/lib/dkms/rtl8812au-5.13.6

@castillofrancodamian
Copy link

Before reinstalling your OS, try just removing /var/lib/dkms/rtl8812au-5.13.6

sudo rm -rf /var/lib/dkms/rtl8812au-5.13.6

It appears to have been removed.

[franco@pc rtw88]$ sudo dkms status
[sudo] contraseña para franco: 
v4l2loopback/0.13.2, 6.10.0-arch1-2, x86_64: installed
v4l2loopback/0.13.2, 6.9.6-arch1-1, x86_64: installed (WARNING! Missing some built modules!)

@morrownr
Copy link
Owner Author

Another way to correct that problem:

sudo apt purge dkms

That is for Debian but the idea is to uninstall it. You can always reinstall it if you actually need it.

@castillofrancodamian
Copy link

Another way to correct that problem:

sudo apt purge dkms

That is for Debian but the idea is to uninstall it. You can always reinstall it if you actually need it.

I reinstalled rtl8812au (after removing rtw_8812au) using dkms as asked by dubhater in this comment, so I don't want to remove dkms at the moment.

@morrownr
Copy link
Owner Author

@castillofrancodamian

I reinstalled rtl8812au (after removing rtw_8812au) using dkms as asked by dubhater...

I understand but the 8812au driver in this repo can be installed without dkms:

$ make
$ sudo make install

Just trying to give you an option to clean up that specific dkms issue.

@castillofrancodamian
Copy link

@morrownr I already installed rtl8812au manually and I see the same symptoms as with rtw_8812au. Disconnections when plugged into USB port 3 and no disconnections in USB port 2, although it is still having problems. I am once again having the very high pings and unpredictable interruptions that I have previously reported on the rtl8812au controller. Dmesg does not report as much as when the rtw_8812au driver is installed.

Installation

[franco@pc 8812au-20210820]$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.10.0-arch1-2/build M=/home/franco/8812au-20210820  modules
make[1]: se entra en el directorio '/usr/lib/modules/6.10.0-arch1-2/build'
  CC [M]  /home/franco/8812au-20210820/core/rtw_cmd.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_security.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_debug.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_io.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_ioctl_query.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_ioctl_set.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_ieee80211.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_mlme.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_mlme_ext.o
/home/franco/8812au-20210820/core/rtw_mlme_ext.c: En la función ‘OnAuth’:
/home/franco/8812au-20210820/core/rtw_mlme_ext.c:2616:41: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
 2616 |                                         ;/* TODO: STA re_auth within expire_to */
      |                                         ^
/home/franco/8812au-20210820/core/rtw_mlme_ext.c:2621:33: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
 2621 |                                 ; /* TODO: STA re_auth and auth timeout */
      |                                 ^
  CC [M]  /home/franco/8812au-20210820/core/rtw_mi.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_wlan_util.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_vht.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_pwrctrl.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_rf.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_chplan.o
  CC [M]  /home/franco/8812au-20210820/core/monitor/rtw_radiotap.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_recv.o
/home/franco/8812au-20210820/core/rtw_recv.c: En la función ‘validate_recv_frame’:
/home/franco/8812au-20210820/core/rtw_recv.c:2498:79: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘else’ [-Wempty-body]
 2498 |                         DBG_COUNTER(adapter->rx_logs.core_rx_pre_data_handled);
      |                                                                               ^
  CC [M]  /home/franco/8812au-20210820/core/rtw_sta_mgt.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_ap.o
  CC [M]  /home/franco/8812au-20210820/core/wds/rtw_wds.o
  CC [M]  /home/franco/8812au-20210820/core/mesh/rtw_mesh.o
  CC [M]  /home/franco/8812au-20210820/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /home/franco/8812au-20210820/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_xmit.o
/home/franco/8812au-20210820/core/rtw_xmit.c: En la función ‘update_attrib’:
/home/franco/8812au-20210820/core/rtw_xmit.c:1701:74: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘else’ [-Wempty-body]
 1701 |                 DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
      |                                                                          ^
  CC [M]  /home/franco/8812au-20210820/core/rtw_p2p.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_rson.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_tdls.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_br_ext.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_iol.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_sreset.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_btcoex_wifionly.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_btcoex.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_beamforming.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_odm.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_rm.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_rm_fsm.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_ft.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_wnm.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_mbo.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_rm_util.o
  CC [M]  /home/franco/8812au-20210820/core/efuse/rtw_efuse.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_roch.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-internal.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-internal-enc.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-gcm.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-ccm.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-omac1.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/ccmp.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/gcmp.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-siv.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/aes-ctr.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/sha256-internal.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/sha256.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/sha256-prf.o
  CC [M]  /home/franco/8812au-20210820/core/crypto/rtw_crypto_wrap.o
  CC [M]  /home/franco/8812au-20210820/core/rtw_swcrypto.o
  CC [M]  /home/franco/8812au-20210820/os_dep/osdep_service.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/os_intfs.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/usb_intf.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/ioctl_linux.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/xmit_linux.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/mlme_linux.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/recv_linux.o
/home/franco/8812au-20210820/os_dep/linux/recv_linux.c: En la función ‘rtw_os_recv_indicate_pkt’:
/home/franco/8812au-20210820/os_dep/linux/recv_linux.c:550:68: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘else’ [-Wempty-body]
  550 |                         DBG_COUNTER(padapter->rx_logs.os_netif_err);
      |                                                                    ^
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/wifi_regd.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/rtw_android.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/rtw_proc.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/nlrtw.o
  CC [M]  /home/franco/8812au-20210820/os_dep/linux/rtw_rhashtable.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_intf.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_com.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_com_phycfg.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_phy.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_dm.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_dm_acs.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_btcoex_wifionly.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_btcoex.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_mp.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_mcc.o
  CC [M]  /home/franco/8812au-20210820/hal/hal_hci/hal_usb.o
  CC [M]  /home/franco/8812au-20210820/hal/led/hal_led.o
  CC [M]  /home/franco/8812au-20210820/hal/led/hal_usb_led.o
  CC [M]  /home/franco/8812au-20210820/hal/HalPwrSeqCmd.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/Hal8812PwrSeq.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/Hal8821APwrSeq.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_xmit.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_sreset.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_hal_init.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_phycfg.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_rf6052.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_dm.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_rxdesc.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/rtl8812a_cmd.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/usb/usb_halinit.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/usb/rtl8812au_led.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/usb/rtl8812au_xmit.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/usb/rtl8812au_recv.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/usb/usb_ops_linux.o
  CC [M]  /home/franco/8812au-20210820/hal/efuse/rtl8812a/HalEfuseMask8812A_USB.o
  CC [M]  /home/franco/8812au-20210820/hal/rtl8812a/hal8812a_fw.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_debug.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_antdiv.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_soml.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_smt_ant.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_antdect.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_interface.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_phystatus.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_hwconfig.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_dig.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_pathdiv.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_rainfo.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_adaptivity.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_cfotracking.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_noisemonitor.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_beamforming.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_direct_bf.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_dfs.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.o
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_config_gtab’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:47:47: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
   47 |                 hal_txbf_8822b_config_gtab(dm);
      |                                               ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_enter_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:194:46: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  194 |                 hal_txbf_8822b_enter(dm, idx);
      |                                              ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_leave_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:224:46: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  224 |                 hal_txbf_8822b_leave(dm, idx);
      |                                              ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_fw_ndpa_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:253:48: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  253 |                 hal_txbf_8822b_fw_txbf(dm, idx);
      |                                                ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_rate_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:302:59: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  302 |                 hal_txbf_8814a_set_ndpa_rate(dm, BW, rate);
      |                                                           ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_status_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:351:47: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  351 |                 hal_txbf_8822b_status(dm, idx);
      |                                               ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_reset_tx_path_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:373:54: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  373 |                 hal_txbf_8814a_reset_tx_path(dm, idx);
      |                                                      ^
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c: En la función ‘hal_com_txbf_get_tx_rate_work_item_callback’:
/home/franco/8812au-20210820/hal/phydm/txbf/halcomtxbf.c:392:47: aviso: se sugieren llaves alrededor del cuerpo vacío en una declaración ‘if’ [-Wempty-body]
  392 |                 hal_txbf_8814a_get_tx_rate(dm);
      |                                               ^
  CC [M]  /home/franco/8812au-20210820/hal/phydm/txbf/haltxbfinterface.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/txbf/phydm_hal_txbf_api.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_adc_sampling.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_ccx.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_psd.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_primary_cca.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_cck_pd.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_rssi_monitor.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_auto_dbg.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_math_lib.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_api.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_pow_train.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_lna_sat.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_pmac_tx_setting.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_mp.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/phydm_cck_rx_pathdiv.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halrf.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halrf_debug.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halphyrf_ce.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halrf_powertracking_ce.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halrf_powertracking.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halrf_kfree.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/halrf_psd.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/rtl8812a/halhwimg8812a_mac.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/rtl8812a/halhwimg8812a_bb.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/rtl8812a/halhwimg8812a_rf.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/rtl8812a/phydm_regconfig8812a.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/rtl8812a/phydm_rtl8812a.o
  CC [M]  /home/franco/8812au-20210820/hal/phydm/txbf/haltxbfjaguar.o
  CC [M]  /home/franco/8812au-20210820/platform/platform_ops.o
  LD [M]  /home/franco/8812au-20210820/8812au.o
  MODPOST /home/franco/8812au-20210820/Module.symvers
  CC [M]  /home/franco/8812au-20210820/8812au.mod.o
  LD [M]  /home/franco/8812au-20210820/8812au.ko
  BTF [M] /home/franco/8812au-20210820/8812au.ko
make[1]: se sale del directorio '/usr/lib/modules/6.10.0-arch1-2/build'
[franco@pc 8812au-20210820]$ sudo make install
[sudo] contraseña para franco:
install -p -m 644 8812au.ko  /lib/modules/6.10.0-arch1-2/kernel/drivers/net/wireless/
/sbin/depmod -a 6.10.0-arch1-2
[franco@pc 8812au-20210820]$

[franco@pc ~]$ sudo dmesg | grep 8812
[    3.656134] usbcore: registered new interface driver rtl8812au

@dubhater
Copy link

@castillofrancodamian That's a relief. :)

Are you using tlp ?

@castillofrancodamian
Copy link

Are you using tlp ?

What's that? A tool?

@dubhater
Copy link

Something that causes problems: https://wiki.archlinux.org/title/TLP

@morrownr
Copy link
Owner Author

I've been sick for 3 days but will test AP mode on rtw_8812au as a priority as able.

@Samt43
Copy link

Samt43 commented Jul 25, 2024

Hi @dubhater , i could test again rtw88 driver on : lwfinger/rtw88@4a1ee64
Here is a airdump with realtek driver vs rtw88 driver :
capture_wsl1_channel36_r.zip
With rtw88, we can clearly see that the driver is now sending some beacons at the begining (network is hacksterwifi2) (this is new, i think your commit solved this !). But after some seconds, beacons stop (this seems to be as soon as my device has tried to connect)

@Samt43
Copy link

Samt43 commented Jul 25, 2024

On some devices (ex : my phone) connexion continue to work even when beacons stop.
Here is logs :
[ 1192.471094] usbcore: deregistering interface driver rtl88x2bu
[ 1192.626030] rtl88x2bu 1-1.4.4.1:1.0: Runtime PM usage count underflow!
[ 1208.418609] rtw_8822bu 1-1.4.4.1:1.0: Firmware version 27.2.0, H2C version 13
[ 1209.047809] rtw_8822bu 1-1.4.4.1:1.0: write register 0xc4 failed with -71
[ 1209.048021] rtw_8822bu 1-1.4.4.1:1.0: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71
[ 1209.048565] usbcore: registered new interface driver rtw_8822bu
[ 1209.295399] usb 1-1.4.4.1: USB disconnect, device number 10
[ 1209.691036] usb 1-1.4.4.1: new high-speed USB device number 16 using dwc_otg
[ 1209.822318] usb 1-1.4.4.1: New USB device found, idVendor=0bda, idProduct=b812, bcdDevice= 2.10
[ 1209.822352] usb 1-1.4.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1209.822366] usb 1-1.4.4.1: Product: 802.11ac NIC
[ 1209.822377] usb 1-1.4.4.1: Manufacturer: Realtek
[ 1209.822388] usb 1-1.4.4.1: SerialNumber: 123456
[ 1209.824022] rtw_8822bu 1-1.4.4.1:1.0: Firmware version 27.2.0, H2C version 13
[ 1211.203343] usbcore: registered new interface driver rtl88x2bu
[ 1211.228381] rtw_8822bu 1-1.4.4.1:1.0 wlx1cbfce35170a: renamed from wlan0
[ 1218.994973] IPv6: ADDRCONF(NETDEV_CHANGE): wlx1cbfce35170a: link becomes ready
[ 1880.579920] rtw_8822bu 1-1.4.4.1:1.0: error beacon valid
[ 1880.580259] rtw_8822bu 1-1.4.4.1:1.0: failed to download drv rsvd page
[ 2217.888445] rtw_8822bu 1-1.4.4.1:1.0: error beacon valid
[ 2217.888781] rtw_8822bu 1-1.4.4.1:1.0: failed to download drv rsvd page

Please note that beacon and drv rsvd page failure do not always happen (whatever if the beacons are working or not)

@Samt43
Copy link

Samt43 commented Jul 25, 2024

Using airdump, we can clearly see no beacons are emitted on channel 36 currently, eventhough hotspot is working on some devices
BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID

30:93:BC:9F:C0:D5 -77 10 4 0 100 1733 WPA2 CCMP PSK Livebox-C0D0
6C:61:F4:68:7E:05 -79 8 0 0 52 1170 WPA2 CCMP PSK SFR_7E00_5GHZ
72:61:F4:68:7E:07 -79 7 0 0 52 1170 WPA2 CCMP PSK SFR_7E00
1C:BF:CE:35:17:0A -1 0 0 0 36 -1 <length: 0>

BSSID STATION PWR Rate Lost Frames Notes Probes

30:93:BC:9F:C0:D5 20:1F:3B:83:81:53 -72 0 - 6 0 1
1C:BF:CE:35:17:0A 6A:31:75:8E:97:33 -61 0 - 6 0 1
1C:BF:CE:35:17:0A FC:02:96:E9:65:10 -38 0 - 6e 0 4
Quitting...

@castillofrancodamian
Copy link

Something that causes problems: https://wiki.archlinux.org/title/TLP

My PC is a desktop. Therefore it is not an energy problem.

@dubhater
Copy link

But after some seconds, beacons stop (this seems to be as soon as my device has tried to connect)

This should be fixed now.

@Samt43
Copy link

Samt43 commented Jul 27, 2024

@dubhater i confirm that lwfinger/rtw88@610e04f fixed definitively beacon issues on 8822bu. Well done, thank you for all your team work, this is really impressive !
I noticed that bitrates are quite low compared to realteck driver :
Connecting to host 10.0.0.1, port 5201
[ 5] local 100.115.92.198 port 60874 connected to 10.0.0.1 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 6.27 MBytes 52.6 Mbits/sec 3 211 KBytes
[ 5] 1.00-2.00 sec 9.13 MBytes 76.6 Mbits/sec 0 242 KBytes
[ 5] 2.00-3.00 sec 8.82 MBytes 74.0 Mbits/sec 1 266 KBytes
[ 5] 3.00-4.00 sec 8.70 MBytes 73.0 Mbits/sec 0 290 KBytes
[ 5] 4.00-5.00 sec 5.78 MBytes 48.5 Mbits/sec 2 235 KBytes
[ 5] 5.00-6.00 sec 9.13 MBytes 76.6 Mbits/sec 0 264 KBytes
[ 5] 6.00-7.00 sec 9.45 MBytes 79.2 Mbits/sec 0 280 KBytes
[ 5] 7.00-8.03 sec 11.8 MBytes 95.6 Mbits/sec 0 307 KBytes
[ 5] 8.03-9.00 sec 10.9 MBytes 94.3 Mbits/sec 0 334 KBytes
[ 5] 9.00-10.00 sec 10.4 MBytes 87.0 Mbits/sec 2 355 KBytes


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 90.3 MBytes 75.8 Mbits/sec 8 sender
[ 5] 0.00-10.04 sec 89.7 MBytes 75.0 Mbits/sec receiver

iperf Done.

In normal times, i have around 200mb bandwidth, so something is still wrong. But what a progress !

@morrownr
Copy link
Owner Author

@Samt43

Clarify for us:

You are adapter is based on a rtl8822bu or rtl8812bu chip?

Running USB2 or USB3 mode? $ lsusb -t

But what a progress !

@dubhater is really good. Now, if I could get him to stop fixing things for a couple of days and clean up some patches to send upstream.

@Samt43
Copy link

Samt43 commented Jul 28, 2024

@morrownr i wouls say rtl8822bu, as i'm loading the driver using :
sudo modprobe rtw_8822bu

Here is are some logs, using the realteck driver.
Bus 001 Device 010: ID 0bda:b812 Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey]
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0xb812 RTL88x2bu [AC1200 Techkey]
bcdDevice 2.10
iManufacturer 1 Realtek
iProduct 2 802.11ac NIC
iSerial 3 123456
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0035
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 5
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2 802.11ac NIC
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x08 EP 8 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
HIRD Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x0006
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 1023 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)

sudo lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
|__ Port 3: Dev 4, If 0, Class=Vendor Specific Class, Driver=rt2800usb, 480M
|__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 9, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 12, If 0, Class=Vendor Specific Class, Driver=usbfs, 480M
|__ Port 3: Dev 12, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 1: Dev 10, If 0, Class=Vendor Specific Class, Driver=rtl88x2bu, 480M
|__ Port 4: Dev 14, If 0, Class=Vendor Specific Class, Driver=dvb_usb_af9035, 480M
|__ Port 2: Dev 15, If 3, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 2: Dev 15, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 2: Dev 15, If 4, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 2: Dev 15, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 2: Dev 15, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 2: Dev 8, If 0, Class=Vendor Specific Class, Driver=dvb_usb_dib0700, 480M
|__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 5: Dev 6, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 5: Dev 6, If 1, Class=Wireless, Driver=btusb, 12M

I only have usb 2.0, but even for 2.0, bandwith is adnormally low compared to realtek driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests