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

Adapters with mt7921au chipset don't work with laptop's USB3 ports, work with its USB2 ports #505

Open
bdantas opened this issue Sep 11, 2024 · 15 comments

Comments

@bdantas
Copy link

bdantas commented Sep 11, 2024

I have an X230 ThinkPad. The laptop has USB2 and USB3 ports. Adapters with the mt7921au chipset (I've tested Netgear A8000 as well as EDUP EP-AX1672) only work when plugged into the laptop's USB2 ports.

Here is what dmesg says when device is plugged into USB3 port:

[  640.741219] mt7921u 4-2:1.0: Direct firmware load for mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
[  640.741231] mt7921u 4-2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_RAM_CODE_MT7961_1.bin
[  640.912574] mt7921u 4-2:1.0: Direct firmware load for mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin failed with error -2
[  640.912580] mt7921u 4-2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
[  640.915593] mt7921u 4-2:1.0: HW/SW Version: 0x8a108a10, Build Time: 20231109190918a
[  641.923846] mt7921u 4-2:1.0: Failed to send patch
[  645.017124] mt7921u 4-2:1.0: Message 00000010 (seq 4) timeout
[  645.017140] mt7921u 4-2:1.0: Failed to release patch semaphore
[  648.217107] mt7921u 4-2:1.0: Message 00000010 (seq 5) timeout
[  648.217122] mt7921u 4-2:1.0: Failed to get patch semaphore
[  651.417126] mt7921u 4-2:1.0: Message 00000010 (seq 6) timeout
[  651.417136] mt7921u 4-2:1.0: Failed to get patch semaphore
[  654.617130] mt7921u 4-2:1.0: Message 00000010 (seq 7) timeout
[  654.617146] mt7921u 4-2:1.0: Failed to get patch semaphore
[  657.817055] mt7921u 4-2:1.0: Message 00000010 (seq 8) timeout
[  657.817070] mt7921u 4-2:1.0: Failed to get patch semaphore
[  661.017196] mt7921u 4-2:1.0: Message 00000010 (seq 9) timeout
[  661.017212] mt7921u 4-2:1.0: Failed to get patch semaphore
[  664.217109] mt7921u 4-2:1.0: Message 00000010 (seq 10) timeout
[  664.217125] mt7921u 4-2:1.0: Failed to get patch semaphore
[  667.417585] mt7921u 4-2:1.0: Message 00000010 (seq 11) timeout
[  667.417603] mt7921u 4-2:1.0: Failed to get patch semaphore
[  670.617116] mt7921u 4-2:1.0: Message 00000010 (seq 12) timeout
[  670.617135] mt7921u 4-2:1.0: Failed to get patch semaphore
[  673.817054] mt7921u 4-2:1.0: Message 00000010 (seq 13) timeout
[  673.817069] mt7921u 4-2:1.0: Failed to get patch semaphore
[  673.945675] mt7921u 4-2:1.0: hardware init failed

Here is what happens when I plug the same device into one of the laptop's USB2 ports:

[  721.524324] mt7921u 2-1.2:1.0: Direct firmware load for mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
[  721.524343] mt7921u 2-1.2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_RAM_CODE_MT7961_1.bin
[  721.737742] mt7921u 2-1.2:1.0: Direct firmware load for mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin failed with error -2
[  721.737751] mt7921u 2-1.2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
[  721.740946] mt7921u 2-1.2:1.0: HW/SW Version: 0x8a108a10, Build Time: 20231109190918a
[  722.007678] mt7921u 2-1.2:1.0: Direct firmware load for mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
[  722.007691] mt7921u 2-1.2:1.0: Falling back to sysfs fallback for: mediatek/WIFI_RAM_CODE_MT7961_1.bin
[  722.013302] mt7921u 2-1.2:1.0: WM Firmware Version: ____010000, Build Time: 20231109190959

I'm quite perplexed. I expected this device would work better when plugged into the USB3 port, not the other way around. Can any of you usb wifi gurus shed some light on this strangeness? Basic technical details are below. I'll be happy to provide whatever other details you need.

Thanks!


OS version: Tiny Core Linux 15 x86_64
Linux version: 6.6.8
USB adapter used for the above tests: Netgear A8000
Output of lsusb and lsusb -v is here
Output of dmesg | grep xhci and dmesg | grep ehci is here

@bdantas
Copy link
Author

bdantas commented Sep 11, 2024

P.S. 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.

I think the solution, if I can find one, will have something to do with a usb3-related boot code that enables or disables a specific usb3 feature.

@bdantas
Copy link
Author

bdantas commented Sep 11, 2024

A user reported identical errors ("Failed to get patch semaphore") in this post, using a different Mediatek chipset. That user did not find a solution as far as I can tell.

@bdantas
Copy link
Author

bdantas commented Sep 11, 2024

I found other (rare) users with similar errors, all using various Mediatek chipsets.

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.

It seems my options to upgrade my laptop, look for an existing kernel patch that addresses this issue, or give up on using this adapter on my laptop. I'm going to take the easy way out and give up on the adapter. Sorry for the noise.

@bdantas bdantas closed this as completed Sep 11, 2024
@morrownr
Copy link
Owner

@bdantas

Hold on. I'm going to reopen this issue unless you have a good reason to close it. You are not the only to one to see this. I need to do some testing to see what the problem is.

@morrownr morrownr reopened this Sep 12, 2024
@bdantas
Copy link
Author

bdantas commented Sep 12, 2024

I closed this prematurely out of frustration. I'll keep an adapter with this chipset around. If I can help with testing, just let me know. I can reliably reproduce the issue on my X230 ThinkPad.

@gdluca
Copy link

gdluca commented Sep 13, 2024

@bdantas

Already on the latest BIOS on your X230 ThinkPad?
Just a thought.

@morrownr
Copy link
Owner

@bdantas

I can reliably reproduce the issue on my X230 ThinkPad.

I am going to test on a couple of systems but I am curious if I can get some specs on the systems where you are seeing this issue:

Laptop/Desktop/Mini/sbc?
CPU, amd, intel, arm64?
Age or processor generation?
Distro?

@bdantas
Copy link
Author

bdantas commented Sep 13, 2024

  • Laptop/Desktop/Mini/sbc: Laptop (Lenovo X230 ThinkPad)
  • CPU: Intel Core i7-3520M CPU @ 2.90GHz
  • Age or processor generation: Ivy Bridge (circa 2012)
  • Distro: I dual boot Devuan Daedalus and Tiny Core Linux 15 x86_64. Both distros are affected by this issue.

@gdluca - BIOS is coreboot. Here at details per dmidecode:

BIOS Information
	Vendor: coreboot
	Version: CBET4000 4.19-293-gdb4b71ff10-dirty
	Release Date: 02/06/2023
	ROM Size: 12 MB
	Characteristics:
		PCI is supported
		PC Card (PCMCIA) is supported
		BIOS is upgradeable
		Selectable boot is supported
		ACPI is supported
		Targeted content distribution is supported
	BIOS Revision: 4.19
	Firmware Revision: 0.0

@morrownr
Copy link
Owner

@bdantas

Good day. It a wonderful day. Yes, we have a lot of problems on this blue dot but we can work them.

Now to this mt7921au vs USB3 problem:

Thanks for the details. I am testing right now:

  • Laptop
  • CPU: -5-1135G7
  • Age: Circa 2022
  • Distro: Ubuntu 24.04
  • BIOS: Insyde Corp. (2023)
  • Adapter: Same Edup adapter you are using.

Test results so far: Plugged adapter in. Connected. Ran iperf3. and saw approx. 700 Mbps. No need to check if USB3 is active because USB2 cannot even come close to that speed. No problem noted.

Have you taken a look to see if users of coreboot are reporting issues with USB3?
If coreboot has a forum, you might mention it.
There are updated firmware files... as of last month so you might look at updating the firmware

I found other (rare) users with similar errors, all using various Mediatek chipsets.

I understand this but in the vast world of the internet, if you start looking for something, you can find it or things similar to it. I say this because it might be easy to blame Mediatek but I'd prefer to wait until we have some solid proof that there is a problem with something Mediatek is responsible for. Remember that in the world of USB WiFi, we depend on the wifi stack and the usb stack to work well. The opportunity for failure are greatly increased due to this fact. Also, USB3 is not mankind's greatest invention. USB2 is far more stable so you could run with USB2 for now if it gets the job done. Don't get frustrated. Let's take our time to work this. I will keep my eyes open and will do additional testing as I have time.

@bdantas
Copy link
Author

bdantas commented Sep 13, 2024

@morrownr - Thank you very much for looking into this. I decided to keep the adapter around just for testing, as I'm very happy with the overall state of my network at this point.

Just two quick updates:

BIOS Information
	Vendor: coreboot
	Version: CBET4000 24.02-50-g04d6eb1eae00-dirty
	Release Date: 02/24/2024
	ROM Size: 12 MB
	Characteristics:
		PCI is supported
		PC Card (PCMCIA) is supported
		BIOS is upgradeable
		Selectable boot is supported
		ACPI is supported
		Targeted content distribution is supported
	BIOS Revision: 0.0
	Firmware Revision: 0.0

This is a low priority issue for me at this point, but I'll make sure to keep an eye out for a solution and post it here if I find one.

@compicat
Copy link

compicat commented Oct 3, 2024

@morrownr @bdantas thanks for pointing out this issue. I also have system with you, corebooted x230. Adapter only works when i plug it in usb 2.0 input. Have you been able to find anything in order to solve this issue? I have fenvi ax1800 btw.

@bdantas
Copy link
Author

bdantas commented Oct 3, 2024

@compicat - No, I did not find a solution for this problem and currently have no promising leads.

@morrownr
Copy link
Owner

morrownr commented Oct 3, 2024

@compicat

I have not run across a solution either. I cannot duplicate the issue here so am just watching. My opinion. based on observation, is that this is rare and is likely caused by something related to usb3 support and not wireless but I will keep watching.

@MillenniumAlpha
Copy link

I am also experiencing this, I would have never of known it would be the USB3 ports of all things.
Unfortunately my mini pc only has USB3 ports.

@morrownr
Copy link
Owner

@MillenniumAlpha

There is another issue that I posted a while back offering some ideas on usb port related things. Give it a read:

#508

That link to the issue in the Debian forum is interesting. Note how BIOS settings can be an issue.

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

5 participants