WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: wifi: how to get mt7921au chipset to work with TCL15 x86_64?  (Read 1101 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« on: September 10, 2024, 05:26:57 PM »
I bought a Netgear model A8000 usb adapter (advertised as "Nighthawk AXE3000"). It is based on the mt7921au chipset.

Both driver (mt7921u.ko.gz, provided by wireless-KERNEL.tcz) and firmware (WIFI_RAM_CODE_MT7961_1.bin and WIFI_MT7961_patch_mcu_1_2_hdr.bin, both provided by firmware-mediatek.tcz) are available on the system, yet the device is not working.

Looking through dmesg I see this:
Code: [Select]
$ tce-load -wi wireless-KERNEL bluetooth-KERNEL firmware-mediatek
wireless-6.6.8-tinycore64 is already installed!
bluetooth-6.6.8-tinycore64 is already installed!
firmware-mediatek is already installed!
$ dmesg | grep mt7
[   13.209248] mt76x2e 0000:02:00.0: ASIC revision: 76120044
[   13.898125] mt76x2e 0000:02:00.0: ROM patch build: 20141115060606a
[   13.899511] mt76x2e 0000:02:00.0: Firmware Version: 0.0.00
[   13.899515] mt76x2e 0000:02:00.0: Build: 1
[   13.899518] mt76x2e 0000:02:00.0: Build Time: 201507311614____
[   13.920496] mt76x2e 0000:02:00.0: Firmware running!
[   13.972082] mt76x2e 0000:02:00.0: disabling ASPM L0s L1
[   56.106947] mt7921u 4-2:1.0: Direct firmware load for mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
[   56.106954] mt7921u 4-2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_RAM_CODE_MT7961_1.bin
[   56.289877] usbcore: registered new interface driver mt7921u
[   56.290813] mt7921u 4-2:1.0: Direct firmware load for mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin failed with error -2
[   56.290826] mt7921u 4-2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
[   56.295819] mt7921u 4-2:1.0: HW/SW Version: 0x8a108a10, Build Time: 20231109190918a
[   57.310670] mt7921u 4-2:1.0: Failed to send patch
[   60.483870] mt7921u 4-2:1.0: Message 00000010 (seq 4) timeout
[   60.483885] mt7921u 4-2:1.0: Failed to release patch semaphore
[   63.683870] mt7921u 4-2:1.0: Message 00000010 (seq 5) timeout
[   63.683885] mt7921u 4-2:1.0: Failed to get patch semaphore
[   66.883857] mt7921u 4-2:1.0: Message 00000010 (seq 6) timeout
[   66.883877] mt7921u 4-2:1.0: Failed to get patch semaphore
[   70.083869] mt7921u 4-2:1.0: Message 00000010 (seq 7) timeout
[   70.083886] mt7921u 4-2:1.0: Failed to get patch semaphore
[   73.283870] mt7921u 4-2:1.0: Message 00000010 (seq 8) timeout
[   73.283885] mt7921u 4-2:1.0: Failed to get patch semaphore
[   76.483865] mt7921u 4-2:1.0: Message 00000010 (seq 9) timeout
[   76.483880] mt7921u 4-2:1.0: Failed to get patch semaphore
[   79.683811] mt7921u 4-2:1.0: Message 00000010 (seq 10) timeout
[   79.683824] mt7921u 4-2:1.0: Failed to get patch semaphore
[   82.883870] mt7921u 4-2:1.0: Message 00000010 (seq 11) timeout
[   82.883888] mt7921u 4-2:1.0: Failed to get patch semaphore
I tried copying the firmware files to different locations (e.g., /lib/firmware and /lib/firmware/mediatek), but it made no difference. Besides, the above output seems to indicate that the fallback firmware is getting loaded.

Any idea what the errors mean and how to fix them? I'm stumped.
« Last Edit: September 10, 2024, 05:30:41 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #1 on: September 10, 2024, 06:25:04 PM »
P.S. Please ignore the lines of output having to do with mt76x2e. Those lines have to do with my internal wireless network card, which is working fine. The fancy usb adapter is the one I'm trying to debug. It seems I'm partial to Mediatek gear :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #2 on: September 10, 2024, 09:03:00 PM »
Hi GNUser
A few thoughts:
1. Recently it was mentioned order of extension (firmware) loading
   was not important, yet I found this reference:
   
Quote
For things to work properly, the firmware needs to be loaded before any other extensions.
   Found here:
   https://forum.tinycorelinux.net/index.php/topic,27172.msg174541.html#msg174541

2. Why is it loading mt7961 firmware for an mt7921?
   (Never mind, modinfo says that's what it wants.)

3. If that's the right firmware, why isn't BT_RAM_CODE_MT7961_1_2_hdr.bin also
   trying to load?

4. It looks like the patch is failing to load.

5. Use lsusb to get the VID:PID of your device. Then try using them like this:
   
Code: [Select]
echo 3574 6211 | sudo tee /sys/bus/usb/drivers/mt7921u/new_id   Found here:
   https://bbs.archlinux.org/viewtopic.php?pid=2089213#p2089213

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #3 on: September 10, 2024, 09:14:58 PM »
Hi Rich. I just tried using this usb adapter on this same laptop, but booting into a Devuan partition. I get the same errors in dmesg there, so this is not TCL-specific.

This is a USB3 adapter. Maybe there's something wrong with the USB3 port on this laptop?

I'll take a look at your suggestions and will report back.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #4 on: September 10, 2024, 09:26:52 PM »
Hmm. My wife runs the same version of Devuan (Daedalus) on her laptop, which is more modern than my X230. This usb adapter works just fine on her laptop.

It seems I've narrowed the problem down to the usb3 port on my old laptop. I know usb3 has different generations (3.0, 3.1, 3.2), my X230 must not have support whatever minimum usb3 version this newfangled adapter needs.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #5 on: September 10, 2024, 10:28:45 PM »
Hi GNUser
I was under the impression USB was backwards compatible.

I've used old USB thumb drives, keyboards, and mice with
a USB3 port using an OTG cable.

I've read that USB3 devices are compatible with USB2 ports.

By the way, there is newer firmware (2024/08/26) available here:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #6 on: September 10, 2024, 10:46:44 PM »
Hi GNUser
Some more info on your adapter:
https://github.com/morrownr/USB-WiFi/blob/main/home/USB_WiFi_Adapters_that_are_supported_with_Linux_in-kernel_drivers.md
See the section titled  >======>  Netgear A8000  <==-====<

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #7 on: September 10, 2024, 11:03:30 PM »
Hi Rich. I spent over an hour on morrownr's github page today. I read the section on the Netgear A8000 plus everything that seemed even remotely relevant.

I made a strange discovery. If I plug this device into my X230's usb2 port, the device works and shows up in the output of ifconfig -a. It's something about the usb3 port on my X230 that the adapter doesn't like.

I just asked about this on morrownr's github page, since it seems to be a hardware (port-related) issue and not a TCL issue.

https://github.com/morrownr/USB-WiFi/issues/505
« Last Edit: September 10, 2024, 11:14:38 PM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #8 on: September 11, 2024, 12:10:51 AM »
Hi GNUser
Do you have any other USB3 devices you can plug in to test that port?

Here's something else you can try. Force the USB3 port into USB2 mode:
https://www.systutorials.com/how-to-force-a-usb-3-0-port-to-work-in-usb-2-0-mode-in-linux/
See if it works then.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #9 on: September 11, 2024, 01:06:28 AM »
@GNUser: Due to the non-free release of the hardware and no source to refer to, we're going to have to roll up our sleeves and look deeper.

Error Code -2: No such file or directory (assuming the code is KERNEL and not the driver itself)

* Did you try the docking port that came with the Nighthawk AND without it on your wife's machine?
* No clue what release of TCL you're using - assuming 13.x or newer x86_64
* PCI Utils and USB Utils are both needed - not sure BOTH are available in any one 13.x, 14.x or 15.x release so you may need to get a little manually-downloading creative
* Have you tried and tested another USB3 device (such as a USB flash drive) and verified it's working AND at USB3 speeds?
* Plug in a USB2-only mouse if you have one into the same USB3 port - functional on the desktop?
* There's a chance you may not have ALL of the drivers installed for ALL of the hardware necessary for ALL of the USB3 data lines - or any of them at all.
   It's also possible that other hardware busses need to be installed/probed (i2c, SPI, etc.) OR, and here's the fun one I've gotten nailed with a time or two...

IPv6!

P.S. Please ignore the lines of output having to do with mt76x2e.
We'd know better if we had the results from pciutils and usbutils
In fact, there's a good chance having two networked ASUS/ASMedia wireless devices which may be using the same Device/Hardware ID...
. o O (Epiphany!)
...here's something to try
  • Remove firmware-KERNEL from your onboot.lst file for the moment
  • Disable your onboard wifi/bluetooth radios in BIOS, boot TC and see if you find your long lost Nighthawk!



I was under the impression USB was backwards compatible.

@Rich: I wish.  Unfortunately, there are a good number of oddballs out there (here's a Lexar example attached) who wanted to beef up claims of speed and their descriptions tend to avoid references to USB2 for a good reason.

Unit on the left is a standard MicroSD's pins/pads...  on the right is Lexar's Class 10 U3 MicroSD card at "blazing 1000x" speeds and USB3 this and that...  which if plugged into a USB2 port with their supplied card reader makes the card (seemingly?) act like it is in BIT mode (normal options: bit, nibble, byte* in its firmware.)

For only $75 there's an amazonian listing on G00gle's top ten or so Sponsored items for a Lexar 128GB V60 UHS-II Class 10 U3 nosebleed chip with claims speeds of 150MB/sec and another identical on e for $115 and others priced in excess of $150 per 128GB....

Small print: "Includes SD UHS-II (USB) adapter for high-speed file transfer from card to computer, dramatically accelerating workflow"

My print: "Averages 12-17MB/s Random Write in a normal USB2 card reader, maxes at 22MB/s with a normal USB3 reader.  Thus in a CAMERA, or a RasPi, or anything that takes SD or MicroSD...  all the hype is NOT backward compatible, and WITH the Lexar adapter we got random write speeds of less than 60MB/s.  Read speeds are nice, though if intended as read-only, hurry up and wait for it to fill up with your files after your kids graduate college, get married, etc...

https://www.cameramemoryspeed.com/reviews/sd-cards/lexar-professional-1000x-uhs-ii-128gb-microsdxc-memory-card/
I didn't find this URL until long after I made the mistake of buying a few dozen for Universal Operating System installation media.
Return policy = UNopened Package.

For only $12 there's a listing at MicroCenter for a 128GB v30, UHS1 Class 10 U3, blah, blah, blah with write speeds LISTED at 80MB/s and our own random write speeds were clocked 62-78MB/s without the need for special adapters and my printers and cameras get pretty close to the high end of those numbers with a 1/6 or less price tag and ARE backward compatible to USB2 within USB2's shared speed max (1.1 works, too, but nobody truly remembers just how slow today's tech runs at USB1 speeds!!!  Or what 1.x MegaBITS per second even looks like!  At that speed, who cares about compatibility!?!  I'm thinking Dinner and a Movie and MAYBE that 30 second SD video I was backing up might be done when I get back?!)

I also have two 5.25" USB2/USB3/Bazillion-in-one kind of card/hdd readers for mid/tower cases.  USB2 works out of the box as it connects to motherboard headers still available for most motherboards with the assumed 500ma protected power output.  USB3 feeds everything else as the card slots are USB3 powered (Vcc) but the chipset for the reader/slots use USB3's Receive/Transmit lines instead of solely DATA+/- that our USB2 buddies expect and use.  There are USB3.x hubs and multi-function devices which also follow this path using the mentality that a USB3+ hub cannot perform its "described on the box" responsibilities if being fed from a 500ma USB2 480mbps port.  Micro-B cables and USB3 Type B are good indicators that Trans/Recv lines are likely mandated and USB-C (PD) could be feeding a number of different voltages which otherwise will be missing from normal USB2/3 slots.  The blue "A" to "A" cables are the most likely to be downward compatible (and in some of those chinasized cases - and probably here in the states, too, they're actually USB2 28 gauge junk fiber cables with blue molded plastic at the FOUR pins (instead of white like we're used to seeing with USB2) making them appear to look like 3's to the untrained eye.)

Fun fact: Software, for however many months or years it survives in the 21st century, tends to be much more "backward compatible" than most anything else on the planet.  Bugs 'n all.
Hardware...  more times than not... is just backward.  (The engineers don't usually buy their own wares! LOL - I know!  A good number of devices we've had to design over the last few decades I'd never buy for myself even if the need arose...  not because our work was shoddy, I've never once been accused...  okay...  once for a mission-impossible in Australia, but because the proof of concept by a non-electronics-thinking individual was more involved in a direction that the circuit board had poke-dotted masking on a purple coated board and their LOGO which NOBODY will ever see being that it'll forever be IN A CASE, was more important than the components and concept of what's being SOLDERED onto the board.  No...  not kidding.  22 year old wanna-be-nerd wants us to design a CNC-like drawing board which takes a #2 pencil and draws a greyscale masterpiece from a JPEG they stole off the Internet so he can sell the drawings claiming to be genuine artwork...  yet the kid can't even grasp the concept of a PENCIL SHARPENER and/or its possible NEED in such a task.)

As I accidentally taught my teenager some time ago...  and hear from him more frequently than I'd like to admit...
"You can fix almost everything out there, Dad, but you can't fix stupid!"

Sorry - long winded, on-topic but with a twist or three...  but that's par recently! :)  Thought you of all people here could appreciate a dose of reality hidden in consumerville.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #10 on: September 11, 2024, 07:19:28 AM »
Hi Rich.
Do you have any other USB3 devices you can plug in to test that port?
Yes. Wifi adapters with other chipsets (e.g., mt7612u) work fine in these usb3 ports. Usb3 storage devices also work, with the expected speed. The problem with these ports seems specific to wifi adapters with mt7921au.

Here's something else you can try. Force the USB3 port into USB2 mode:
https://www.systutorials.com/how-to-force-a-usb-3-0-port-to-work-in-usb-2-0-mode-in-linux/
See if it works then.
I will try this but I expect it will work. I already know that the mt7921au device works on this laptop's usb2 ports.

Hi CentralWare. Your idea that my internal Mediatek card may be interfering is worth investigating. However, I know that it does *not* interfere with mt7921au adapters plugged into a usb2 port. I think the solution, if I find one, will have something to do with a usb3-related boot code that enables or disables a specific usb3 feature.
« Last Edit: September 11, 2024, 07:21:10 AM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #11 on: September 11, 2024, 07:48:01 AM »
Hi CentralWare. As a test, I created a custom firmware-mediatek.tcz extension without the firmware files that my internal Mediatek wireless network card needs. After rebooting and confirming that the internal card was inop, the problem with the Netgear A8000 usb adapter persists. I think we can cross off the internal wireless card from our list of suspects.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #12 on: September 11, 2024, 09:13:41 AM »
Hi Rich and CentralWare. I've scoured the internet and found rare other users with similar errors in dmesg.

My conclusion is that the mt76 driver fails to deliver the firmware payload to the adapter when it is connected to one of this laptop's usb3 ports. It seems there's a bug in how mt76 and usb/xhci interact in old hardware like this X230.

I think my only options at this point in time are:
a. Compiling a custom kernel so that this adapter works with my laptop's usb3 port (thus ending up with a Franken-TCL15)
b. Getting a more modern laptop
c. Giving up on the adapter

I'm going with option c. Thank you both very much for your help.
« Last Edit: September 11, 2024, 09:17:05 AM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #13 on: September 11, 2024, 09:18:47 AM »
Hi GNUser
... I think the solution, if I find one, will have something to do with a usb3-related boot code that enables or disables a specific usb3 feature.
I did a search for usb in the kernel parameters and saw this tidbit:
Code: [Select]
4218 usbcore.authorized_default=
4219 [USB] Default USB device authorization:
4220 (default -1 = authorized except for wireless USB,
4221 0 = not authorized, 1 = authorized)
Found here:
https://mjmwired.net/kernel/Documentation/kernel-parameters.txt

You could try this boot code:
Code: [Select]
usbcore.authorized_default=1
Or you could check its current setting. Based on your dmesg, I
think it's usb4:
Code: [Select]
cat /sys/bus/usb/devices/bus4/authorized_default

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: wifi: how to get mt7921au chipset to work with TCL15 x86_64?
« Reply #14 on: September 11, 2024, 09:24:40 AM »
Hi GNUser
This might sound dumb, but have you only tried the
device while booting, or have you also tried unplugging
then plugging it back in?