mirror of
https://github.com/morrownr/8812au-20210820.git
synced 2026-10-14 21:38:30 +00:00
[GH-ISSUE #56] [Bug]: Error! Bad return status for module build on kernel: 6.16.7-arch1-1 (x86_64) #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @princeri on GitHub (Sep 14, 2025).
Original GitHub issue: https://github.com/morrownr/8812au-20210820/issues/56
Checklist
Is Secure Boot enabled?
No
uname
Linux archlinux 6.16.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 Sep 2025 17:42:36 +0000 x86_64 GNU/Linux
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 04f2:b628 Chicony Electronics Co., Ltd EasyCamera Bus 001 Device 003: ID 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU] Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 002 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 003 Device 002: ID 0438:7900 Advanced Micro Devices, Inc. Root Hub Bus 003 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) Bus 003 Device 004: ID 0cf3:e500 Qualcomm Atheros Communications
rfkill
0: ideapad_wlan: Wireless LAN Soft blocked: no Hard blocked: no 1: ideapad_bluetooth: Bluetooth Soft blocked: yes Hard blocked: no 2: hci0: Bluetooth Soft blocked: yes Hard blocked: no 3: hci1: Bluetooth Soft blocked: yes Hard blocked: no 4: phy0: Wireless LAN Soft blocked: no Hard blocked: no
dkms
iw
git status
install-driver.sh
What happened?
It just failed to install the driver everytime.
This is the output of /var/lib/dkms/rtl8812au/5.13.6-23/build/make.log:
DKMS (dkms-3.2.1) make.log for rtl8812au/5.13.6-23 for kernel 6.16.7-arch1-1 (x86_64)
Sun Sep 14 01:40:57 PM IST 2025
Building module(s)
command: kernelver=6.16.7-arch1-1 ./dkms-make.sh
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.16.7-arch1-1/build M=/var/lib/dkms/rtl8812au/5.13.6-23/build modules
make[1]: Entering directory '/usr/lib/modules/6.16.7-arch1-1/build'
make[2]: Entering directory '/var/lib/dkms/rtl8812au/5.13.6-23/build'
CC [M] core/rtw_cmd.o
CC [M] core/rtw_security.o
core/rtw_cmd.c:17:10: fatal error: drv_types.h: No such file or directory
17 | #include <drv_types.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[4]: *** [/usr/lib/modules/6.16.7-arch1-1/build/scripts/Makefile.build:287: core/rtw_cmd.o] Error 1
make[4]: *** Waiting for unfinished jobs....
core/rtw_security.c:17:10: fatal error: drv_types.h: No such file or directory
17 | #include <drv_types.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[4]: *** [/usr/lib/modules/6.16.7-arch1-1/build/scripts/Makefile.build:287: core/rtw_security.o] Error 1
make[3]: *** [/usr/lib/modules/6.16.7-arch1-1/build/Makefile:2003: .] Error 2
make[2]: *** [/usr/lib/modules/6.16.7-arch1-1/build/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/var/lib/dkms/rtl8812au/5.13.6-23/build'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.16.7-arch1-1/build'
make: *** [Makefile:2516: modules] Error 2
exit code: 2
elapsed time: 00:00:01
@morrownr commented on GitHub (Sep 15, 2025):
Hi @princeri
This driver won't compile on kernel 6.16 because it should not need to compile on any distro using kernel 6.14 or later. Did you check to see if your adapter was working before you tried to install this driver?
A very solid rtl8812au standards compliant driver was added to the kernel with kernel 6.14. Try running the following:
$ sudo sh remove-driver.sh
After reboot, see what you have.
@cybersnow02 commented on GitHub (Sep 21, 2025):
Also, I renamed 'remove-driver.sh' to 'uninstall-driver.sh'. Take this into consideration if applying my patch.
@morrownr commented on GitHub (Sep 21, 2025):
@cybersnow02
Thanks for the information. I have no problems with users continuing to keep this driver going with API related PRs. What I would like instead on one patch is 3 PRs. One for kernel 15, one for kernel 16 and one for the change to uninstall. That will allow me to check things in a more orderly way.
I understand but I have to make the best use of the time that I have available. Like I said, this repo can live as long as users make the API updates.
Have you actually checked to see if txpower can actually be adjusted to a higher value with this driver? I'm not talking about the output of
iw, I am talking about checking levels to see if the change is actually being made.I wrote a message in lwfinger/rtw88#111 a while ago in an effort to start consolidating what we know about txpower. You are welcome to participate in this effort.
@princeri commented on GitHub (Sep 22, 2025):
after uninstalling the driver it uses the
readlink /sys/class/net/wlan0/device/driver
../../../../../../bus/usb/drivers/rtw88_8821au
this driver has problem where the packet inject doesn't works sometime....
also unable to find wifi networs when in monitor mode
the 8812au was working absolutely fine....
@cybersnow02 commented on GitHub (Sep 22, 2025):
@morrownr I made incremental patches in 3 steps:
The 'uninstall' patch idea was taken from your other project (https://github.com/morrownr/rtl8852bu-20240418). By now, I could just try to focus on Kernel patch instead of non-urgent mods? I tried to follow your code changes between projects to match what it should be now...
1__patch_actual_main_kernel_6.14_to_6.15.patch
2__patch_kernel_6.15_to_6.16.patch
3__patch_uninstall.patch
@morrownr commented on GitHub (Sep 24, 2025):
@cybersnow02
Is -20 dBm the maximum allowable txpower setting for your country and channel you are using? If unsure, tell me your country and band/channel you are using and I will show you how to look it up.
With that said, if -20 dBm is the max allowed, then rtw88 is doing its job correctly as it should not allow you to exceed the max allowed by law. If the rtl8812au driver is allowing you to exceed the max allowed txpower, then that needs to be corrected or the driver taken down.
I'm sure that is not what you want to hear but I am pretty good at helping with cases when range needs to be extended... legally.
@princeri commented on GitHub (Sep 24, 2025):
Can you please share me your patched version 8812au driver.
@morrownr commented on GitHub (Sep 24, 2025):
@cybersnow02
If you are interested, I can give you admin rights to this repo so that you can take over maintenance of this repo. This might be the best solution. I would ask you to consider your changes carefully as I have numerous Realtek WiFi 5 vendor drivers up here and it is best if they work in a consistent manner. An example of what I am talking about is the change from
removetouninstall. I understand the desire as I am the one that made that change starting with the Realtek WiFi 6 drivers... however I do not think it is a good change for WiFi 5 at this point as keeping things consistent would require the change in all drivers and in the docs and in the mind of all current users... and this is a repo that gets a lot of hits per day. I will leave things alone as far as API changes go as long as you don't break things but other things that can lead to a lot of message traffic is something to avoid.What do you think?
@cybersnow02 commented on GitHub (Sep 24, 2025):
@morrownr
I just want to contribute by sending patches if able to fix it with my current skills :) I do not want to take over maintenance of this repo.
I have a question for you. You said : "I understand but I have to make the best use of the time that I have available". Then, you seem to abandon this project because you prefer the RTW88 alternative since 8812au in now included with the kernel. But, by looking of the work you do with RTL8852BU, you could easily backports the same kind of fixes in 10 minutes like I did, since they are compatible. When the 8852BU will be included in the future kernel, are you going to stop maintaining it as well? I mean, for now, the kernel changes aren't too complicated to justify not supporting it anymore. What I'm doing right now is trying to help you with patches to save you some time. You could then just approve patches from users and add them to the repo?
@cybersnow02 commented on GitHub (Sep 24, 2025):
@princeri
To apply patches, you can follow this guide:
https://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/
@cybersnow02 commented on GitHub (Sep 24, 2025):
By the way, I just realized that I made the patches according to the following commit in February 21, 2025. So before applying my patches, download the right commit main code:
github.com/morrownr/8812au-20210820@dabcb74da6At this stage, it already included the Kernel 6.14 patches. thanks
@morrownr commented on GitHub (Sep 24, 2025):
I think you are making this harder than it needs to be. If you want me to merged the patches, make PR requests. That will speed things up on my end and eliminate some potential problems. Remember to git pull so that your repo is at the same level before doing anything.
So that there is no confusion:
Absolutely I am going to stop maintaining the rtl8852bu repo. In fact, the new rtw89 driver for the rtl8952bu chip just went into kernel 6.17. I will probably stop maintaining it and rtl8852cu with the kernel that goes into Ubuntu 26.04. I am aware of user needs and try to accommodate a transition period. I also leave the repos available and accepted PRs tfrom users that want the drivers available for future kernels. The alternative is that I make two clicks and remove the repos from public viability.
What you may not understand is that the Realtek USB vendor drivers are bad in many ways. They are not designed for end users. They are designed for embedded purposes. The Linux development cycle makes it where out-of-kernel , non-standards compliant drivers are very problematic. I have put in many hours over the last several years trying to make the Realtek vendor drivers as user friendly as possible but there are basic limits. The new drivers that we are making are Linux standards compliant drivers (mac80211) and are handled the way Linux drivers should be handled... in-kernel with coordination done in linux-wireless. I CANNOT over emphasize how much better the new drivers are. You have a very specific case for the reason you want this driver to be maintained. I would much prefer that you move to rtw88 and I will be glad to work with you to find a solution to your problem.
@cybersnow02 commented on GitHub (Sep 25, 2025):
I used another antenna and my TX is working fine now (antenna was broken) and this driver respect the regulation. thanks.
@morrownr commented on GitHub (Sep 25, 2025):
@princeri
I am willing to work with you if you decide to start using the new rtw88 driver. I think you will find the new driver to be quite good.
@walmis commented on GitHub (Oct 2, 2025):
I've been experiencing some issues with rtw88 on Kernel 6.16 (Archer T4UH Wi-Fi dongle):
dmesgshows repeatedCLASS3_FRAME_FROM_NONASSOC_STAmessages.Just my perspective as a user - my previous 8812au setup was stable for several years without these issues.
Thanks to these patches, I can roll back to 8812au and continue using my existing hardware.
@morrownr commented on GitHub (Oct 2, 2025):
Hi @walmis
Thanks for the report. I need you to report this to the downstream repo where the work is done on rtw88:
https://github.com/lwfinger/rtw88
Make sure the title of the issue says the chipset of your adapter (rtl8812au)
I understand. I have put many hours in over the years trying to keep this driver in as good of shape as I could. I am only too aware that it has many shortcomings. With that said, I also realize that it has performed very well for many people for a long time and you appear to be in that category. I can write a long list of reasons why the community needs the new rtw88 and rtw89 USB WiFi drivers but if something is not working then the list doesn't matter... I get it.
I am actually setup to do some testing if I can get you to file your bug over at the rtw88 repo. I'll try to help confirm and see if we can fix it.
One thing I am going to be asking you is if you run your adapter in USB3 mode. With the driver in this repo, setting USB3 requires changing a module parameter whereas changing to USB3 mode is automatic with rtw88.
I hope to see you in the rtw88 repo as shown above.