morrownr / 8821au-20210708

Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets - v5.12.5.2
Other
726 stars 109 forks source link

(solved) Installation fails on Raspberry Pi 400 running Raspbian (kernel 5.15) #36

Open mostro34 opened 2 years ago

mostro34 commented 2 years ago

I followed your guide, but when I ran install-driver.sh I got this error: Running install-driver.sh version 20220108 Raspbian GNU/Linux 10 (buster) 5.15.41-v7l+ armv7l Starting installation... Copying source files to: /usr/src/rtl8821au-5.12.5.2 Copying 8821au.conf to: /etc/modprobe.d

Creating symlink /var/lib/dkms/rtl8821au/5.12.5.2/source -> /usr/src/rtl8821au-5.12.5.2

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... 'make' -j4 KVER=5.15.41-v7l+ KSRC=/lib/modules/5.15.41-v7l+/build...(bad exit status: 2) Error! Bad return status for module build on kernel: 5.15.41-v7l+ (armv7l) Consult /var/lib/dkms/rtl8821au/5.12.5.2/build/make.log for more information. An error occurred. dkms build error = 10 Please report this error. You will need to run the following before reattempting installation. $ sudo ./remove-driver.sh

Here is /var/lib/dkms/rtl8821au/5.12.5.2/build/make.log : DKMS make.log for rtl8821au-5.12.5.2 for kernel 5.15.41-v7l+ (armv7l) ven 27 mag 2022, 17.47.35, CEST make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.41-v7l+/build M=/var/lib/dkms/rtl8821au/5.12.5.2/build modules make[1]: ingresso nella directory "/home/pietro/linux-2d1db105ff95870920f3d6c5480d125cf70437fd" CC [M] /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_cmd.o CC [M] /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_security.o CC [M] /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_debug.o gcc: error: unrecognized command line option ‘-mgeneral-regs-only’ make[2]: [scripts/Makefile.build:288: /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_cmd.o] Error 1 make[2]: Attesa per i processi non terminati.... CC [M] /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_io.o gcc: error: unrecognized command line option ‘-mgeneral-regs-only’ make[2]: [scripts/Makefile.build:288: /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_security.o] Error 1 gcc: error: unrecognized command line option ‘-mgeneral-regs-only’ make[2]: [scripts/Makefile.build:288: /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_debug.o] Error 1 gcc: error: unrecognized command line option ‘-mgeneral-regs-only’ make[2]: [scripts/Makefile.build:288: /var/lib/dkms/rtl8821au/5.12.5.2/build/core/rtw_io.o] Error 1 make[1]: [Makefile:1868: /var/lib/dkms/rtl8821au/5.12.5.2/build] Error 2 make[1]: uscita dalla directory "/home/pietro/linux-2d1db105ff95870920f3d6c5480d125cf70437fd" make: *** [Makefile:2510: modules] Error 2

morrownr commented 2 years ago

Hi @mostro34

I am having a difficult time duplicating this issue.

I just tested with a RasPi4B and RasPiOS 2022-04-04 (64 bit).

You appear to be on the 32 bit RasPiOS.

Try this from your driver directory:

$ sudo ./remove-driver.sh $ git pull $ make clean $ make $ sudo make install $ sudo reboot

Tell me if you see any problems.

Nick

mostro34 commented 2 years ago

I got this error while running make: make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.41-v7l+/build M=/home/pietro/src/8821au-20210708 modules make[1]: ingresso nella directory "/home/pietro/linux-2d1db105ff95870920f3d6c5480d125cf70437fd" CC [M] /home/pietro/src/8821au-20210708/core/rtw_cmd.o gcc: error: unrecognized command line option ‘-mgeneral-regs-only’ make[2]: [scripts/Makefile.build:288: /home/pietro/src/8821au-20210708/core/rtw_cmd.o] Error 1 make[1]: [Makefile:1868: /home/pietro/src/8821au-20210708] Error 2 make[1]: uscita dalla directory "/home/pietro/linux-2d1db105ff95870920f3d6c5480d125cf70437fd" make: *** [Makefile:2510: modules] Error 2

mostro34 commented 2 years ago

I tried once again to install the drivers, following your guide. This time, I ran _ARMRPI.sh instead of running _ARM64RPI.sh. The installation script ran just fine, however my Raspberry can't find the wi-fi stick.

morrownr commented 2 years ago

This time, I ran ARM_RPI.sh instead of running ARM64_RPI.sh.

I see.

Run and post the results of:

$ lsusb

mostro34 commented 2 years ago

Bus 002 Device 003: ID 0bc2:ab38 Seagate RSS LLC Backup Plus Hub Bus 002 Device 002: ID 0bc2:ab45 Seagate RSS LLC Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 04d9:0007 Holtek Semiconductor, Inc. Bus 001 Device 003: ID 0bc2:ab44 Seagate RSS LLC Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

mostro34 commented 2 years ago

The adapter is a tp-link archer t2u plus.

morrownr commented 2 years ago

The adapter is a tp-link archer t2u plus.

It seems that there are multiple versions that use different chipsets.

Bus 002 Device 003: ID 0bc2:ab38 Seagate RSS LLC Backup Plus Hub Bus 002 Device 002: ID 0bc2:ab45 Seagate RSS LLC Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 04d9:0007 Holtek Semiconductor, Inc. Bus 001 Device 003: ID 0bc2:ab44 Seagate RSS LLC Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I'm not seeing your adapter here. Make sure your adapter is plugged into a USB2 port and run the command again.

mostro34 commented 2 years ago

Bus 002 Device 003: ID 0bc2:ab38 Seagate RSS LLC Backup Plus Hub Bus 002 Device 002: ID 0bc2:ab45 Seagate RSS LLC Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 04d9:0007 Holtek Semiconductor, Inc. Bus 001 Device 009: ID 2357:0120 TP-Link Bus 001 Device 003: ID 0bc2:ab44 Seagate RSS LLC Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Now it shows up, but it doesn't connect to my network.

mostro34 commented 2 years ago

I just ran lsusb again. The adapter has disappeared.

morrownr commented 2 years ago

2357:0120 TP-Link

That tells us the adapter has a 8811au chipset so you are installing the correct driver.

I just ran lsusb again. The adapter has disappeared.

Something to keep in mind is that the USB subsystem with these pi's (such as the 3B, 4B and 400) is only able to supply a maximum of up to 1200 mA of power. It would be good if you can test with other usb peripherals removed.

mostro34 commented 2 years ago

I tried plugging in only the wi-fi stick, but still it doesn't show up in lsusb. However, I found this in /var/log/messages. It repeats every 1 - 2 seconds.

May 30 09:37:31 lampone1 kernel: [ 345.516188] usb 1-1-port3: attempt power cycle May 30 09:37:31 lampone1 kernel: [ 346.175521] usb 1-1.3: new high-speed USB device number 82 using xhci_hcd May 30 09:37:31 lampone1 kernel: [ 346.175774] usb 1-1.3: Device not responding to setup address. May 30 09:37:32 lampone1 kernel: [ 346.395700] usb 1-1.3: Device not responding to setup address. May 30 09:37:32 lampone1 kernel: [ 346.715541] usb 1-1.3: new high-speed USB device number 83 using xhci_hcd May 30 09:37:32 lampone1 kernel: [ 346.715790] usb 1-1.3: Device not responding to setup address. May 30 09:37:32 lampone1 kernel: [ 346.935885] usb 1-1.3: Device not responding to setup address. May 30 09:37:33 lampone1 kernel: [ 347.605534] usb 1-1.3: new high-speed USB device number 84 using xhci_hcd May 30 09:37:33 lampone1 kernel: [ 348.155547] usb 1-1.3: new high-speed USB device number 85 using xhci_hcd May 30 09:37:34 lampone1 kernel: [ 348.596157] usb 1-1-port3: attempt power cycle May 30 09:37:34 lampone1 kernel: [ 349.255524] usb 1-1.3: new high-speed USB device number 86 using xhci_hcd May 30 09:37:34 lampone1 kernel: [ 349.255773] usb 1-1.3: Device not responding to setup address. May 30 09:37:35 lampone1 kernel: [ 349.475748] usb 1-1.3: Device not responding to setup address. May 30 09:37:35 lampone1 kernel: [ 349.795527] usb 1-1.3: new high-speed USB device number 87 using xhci_hcd May 30 09:37:35 lampone1 kernel: [ 349.795758] usb 1-1.3: Device not responding to setup address. May 30 09:37:35 lampone1 kernel: [ 350.016006] usb 1-1.3: Device not responding to setup address.

morrownr commented 2 years ago

I was not familiar with this issue so I did some searching. Here is a link to a similar problem:

https://www.reddit.com/r/archlinux/comments/m4hruc/usb_device_not_accepting_address/

The credible links regarding this topic seem to indicate a connection problem. possibly worn connector pins in a port or device. You could try different ports or try plugging it into an external hub.

mostro34 commented 2 years ago

I did some tests and it appears that my wi-fi stick is almost dead. So, thank you very much for your helpfulness!

morrownr commented 2 years ago

I did some tests and it appears that my wi-fi stick is almost dead.

This very well could be. It happens.

So, thank you very much for your helpfulness!

You are welcome. I keep a repo that gives information and links to adapters that use in-kernel drivers. Menu item 1 gives overall information and menu item 2 gives links to specific adapters that use in-kernel drivers.

https://github.com/morrownr/USB-WiFi

Good luck.