lwfinger/rtl8852au

TP-Link AX1800 (2357:013f) setup issues on Kubuntu 20.04

Closed this issue · 7 comments

Thank you for your work.

I'm trying to set up a TP-Link AX1800 device on my Kubuntu 20.04 (kernel: 5.11.0-44-generic).
Followed your instructions, also installed the DKIM module, but the device is still not showing as a network device in Network Manager.

uname -r output:

5.11.0-44-generic

lsmod | grep 8852au output:

8852au              13119488  0
cfg80211              888832  4 iwlmvm,8852au,iwlwifi,mac80211

lsusb output:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0c45:672d Microdia Integrated_Webcam_HD
Bus 003 Device 037: ID 2357:013f TP-Link 802.11ac WLAN Adapter
Bus 003 Device 006: ID 0bda:1100 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 003 Device 004: ID 0bda:5418 Realtek Semiconductor Corp. 
Bus 003 Device 002: ID 0b00:5411 INGENICO USB2.1 Hub
Bus 003 Device 005: ID 8087:0026 Intel Corp. 
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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg output:

[17339.857768] usb 3-3: new high-speed USB device number 36 using xhci_hcd
[17340.006273] usb 3-3: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 0.00
[17340.006284] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[17340.006287] usb 3-3: Product: DISK
[17340.006290] usb 3-3: Manufacturer: Realtek
[17340.008920] usb-storage 3-3:1.0: USB Mass Storage device detected
[17340.009249] scsi host0: usb-storage 3-3:1.0
[17341.019285] scsi 0:0:0:0: Direct-Access     RTK      Driver Storage   2.00 PQ: 0 ANSI: 0 CCS
[17341.019874] sd 0:0:0:0: Attached scsi generic sg0 type 0
[17341.021017] sd 0:0:0:0: [sda] 32384 512-byte logical blocks: (16.6 MB/15.8 MiB)
[17341.021571] sd 0:0:0:0: [sda] Write Protect is on
[17341.021577] sd 0:0:0:0: [sda] Mode Sense: 03 00 80 00
[17341.021944] sd 0:0:0:0: [sda] No Caching mode page found
[17341.021955] sd 0:0:0:0: [sda] Assuming drive cache: write through
[17341.061110]  sda:
[17341.085896] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[17341.085911] sd 0:0:0:0: [sda] Sense not available.
[17341.085917] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[17341.085994] sd 0:0:0:0: [sda] Write Protect is off
[17341.085996] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
[17341.086003] sda: detected capacity change from 32384 to 0
[17341.086008] sd 0:0:0:0: [sda] Attached SCSI removable disk
[17341.175075] usb 3-3: USB disconnect, device number 36
[17341.949860] usb 3-3: new high-speed USB device number 37 using xhci_hcd
[17342.099234] usb 3-3: New USB device found, idVendor=2357, idProduct=013f, bcdDevice= 0.00
[17342.099246] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[17342.099250] usb 3-3: Product: 802.11ac WLAN Adapter
[17342.099253] usb 3-3: Manufacturer: Realtek
[17342.099256] usb 3-3: SerialNumber: 00e04c000001
[17342.104151] option 3-3:1.0: GSM modem (1-port) converter detected
[17342.104390] usb 3-3: GSM modem (1-port) converter now attached to ttyUSB0

sudo hwinfo --network --short output:

network interface:                                              
  wlp0s20f3            Ethernet network interface
  lo                   Loopback network interface

wlp0s20f3 is the built in wifi card.

Any help is really appreciated, and I'm happy to help with further logs.
Thank you.

@dchagniot I can see you made the code change for this adapter.
Did you run any commands in addition to the list of commands explained in the readme file?

Your postings show that the driver is loaded, and no errors are shown. That leaves only the user-space configuration as a potential problem. I do not have this device, thus I cannot test; however, all the other Realtek USB devices using similar drivers have configured on openSUSE using NetworkManager.

nmcli does not recognise the device:

➜  ~ nmcli device status
DEVICE             TYPE      STATE         CONNECTION 
wlp0s20f3          wifi      connected     *******  
90:78:B2:******  bt        disconnected  --         
p2p-dev-wlp0s20f3  wifi-p2p  disconnected  --         
lo                 loopback  unmanaged     --  

Actually, I do have this device. After building and loading the driver, it connected to my AP and I got the following output:

finger@localhost:~/rtl8852au>nmcli dev status
DEVICE TYPE STATE CONNECTION
enp0s25 ethernet connected enp0s25
wlp0s20u6 wifi connected Larry_ac
wlp4s0 wifi connected NETGEAR81-5G
wls1 wifi connected Larry-ax
p2p-dev-wlp0s20u6 wifi-p2p disconnected --
p2p-dev-wlp4s0 wifi-p2p disconnected --
p2p-dev-wls1 wifi-p2p disconnected --
lo loopback unmanaged --

The 8852au is wlp0s20u6. I tested with both USB2 and USB3 ports. As far as I can tell, everything is working, which points back to something in your user-space wireless networking code. My distro is openSUSE Tumbleweed with a KDE desktop with NetworkManager 1.40.10. My kernel is 6.2.0-rc4. I have no idea what may be wrong.

I read the readme again, and realised, I forgot to add the modprobe line with the correct IDs.
Maybe I'll need to clarify the wording to clarify it is required to all adapter on the list, not only for DWA-x1850.

It is working now if I connect it directly to my laptop, but if I connect it to the USD hub in my monitor it is still recognised as a storage device.
The hub is USB 2.0 mode to be able to use 4k 60Hz over USB-C.

dmesg:

[  541.423732] usb 3-2.1: new high-speed USB device number 22 using xhci_hcd
[  541.524921] usb 3-2.1: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 0.00
[  541.524932] usb 3-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  541.524935] usb 3-2.1: Product: DISK
[  541.524937] usb 3-2.1: Manufacturer: Realtek
[  541.526841] usb-storage 3-2.1:1.0: USB Mass Storage device detected
[  541.527233] scsi host1: usb-storage 3-2.1:1.0
[  542.544371] scsi 1:0:0:0: Direct-Access     RTK      Driver Storage   2.00 PQ: 0 ANSI: 0 CCS
[  542.544782] sd 1:0:0:0: Attached scsi generic sg0 type 0
[  542.545449] sd 1:0:0:0: [sdb] 32384 512-byte logical blocks: (16.6 MB/15.8 MiB)
[  542.545812] sd 1:0:0:0: [sdb] Write Protect is on
[  542.545815] sd 1:0:0:0: [sdb] Mode Sense: 03 00 80 00
[  542.546188] sd 1:0:0:0: [sdb] No Caching mode page found
[  542.546194] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[  542.583832]  sdb:
[  542.620998] sd 1:0:0:0: [sdb] Attached SCSI removable disk
➜  ~ lsusb           
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0c45:672d Microdia Integrated_Webcam_HD
Bus 003 Device 020: ID 0bda:1100 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 003 Device 019: ID 0bda:5418 Realtek Semiconductor Corp. 
Bus 003 Device 022: ID 0bda:1a2b Realtek Semiconductor Corp. 
Bus 003 Device 017: ID 0bda:5411 Realtek Semiconductor Corp. USB2.1 Hub
Bus 003 Device 007: ID 8087:0026 Intel Corp. 
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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Is the USB hub changing the device ID causing the modprobe rule to stay inactive?

There is a utility called usb_modeswitch that automatically switches to the underlying wifi device. There is also a service that starts the process. I have file /usr/lib/udev/rules.d/40-usb_modeswitch.rules with the following code (among others):

D-Link DWA-171 Wifi Dongle

ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"

Apparently, your system does not have this line, or the service is not starting.
https://askubuntu.com/questions/1080944/automatically-use-usb-modeswitch-for-wifi-usb covers this issue.

It worked when plugged in directly to the laptop, but it did not when plugged in to a hub.

I returned the adapter, it did not help much with the network latency and stability, so my rot issue will be related to walls and/or router.

This ticket can be closed, it was mainly a user error.
Thank you for your help.