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

mt7921 wireless driver failed with status -2 #224

Closed
4d30 opened this issue Nov 24, 2021 · 9 comments · Fixed by void-linux/void-packages#43516
Closed

mt7921 wireless driver failed with status -2 #224

4d30 opened this issue Nov 24, 2021 · 9 comments · Fixed by void-linux/void-packages#43516

Comments

@4d30
Copy link

4d30 commented Nov 24, 2021

I just downloaded and wrote the image at https://alpha.de.repo.voidlinux.org/live/current/void-live-x86_64-20210930.iso to install on a laptop with a MediaTek mt7921 wireless adapter. The module in this image for this device fails to load with status -2.

Afterwards, I tried images from other distributions and the module/device comes up and wireless connectivity is unimpeded. Updating the image to include newer kernel/firmware would probably solve this.

@JamiKettunen
Copy link

New images are being prepared (#284), this issue is a bit pointless if there's no confirmation what exactly might fix the problem. There's also an absence of any kind of logs so it's all up to interpretation what the problem could be if it "works on other distros".

Can you try building a new image locally and checking if that helps, or trying the upcoming 20221001 images when they release?

@4d30
Copy link
Author

4d30 commented Oct 15, 2022

Without a wireless driver, it was difficult for me to get the logs off the device. Most folks just say "thank you."

FWIW, this is how loading works on another distro:

$ uname -a                
Artix Linux localhost 5.15.64-1-lts #1 SMP Wed, 31 Aug 2022 21:14:32 +0000 x86_64 GNU/Linux
$ sudo dmesg | grep mt7921
[    2.599372] mt7921e 0000:03:00.0: enabling device (0000 -> 0002)
[    2.599634] mt7921e 0000:03:00.0: disabling ASPM  L1
[    2.599638] mt7921e 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    2.613436] mt7921e 0000:03:00.0: ASIC revision: 79610010
[    2.723254] mt7921e 0000:03:00.0: HW/SW Version: 0x8a108a10, Build Time: 20220608210839a
[    3.004359] mt7921e 0000:03:00.0: WM Firmware Version: ____010000, Build Time: 20220608210922
[    3.032637] mt7921e 0000:03:00.0: Firmware init done

Then my recollection for how may have looked on Void last year would have been something like

[ 2.599372] mt7921e 0000:03:00.0: enabling device (0000 -> 0002)
[ 2.599634] mt7921e 0000:03:00.0: disabling ASPM L1
[ 2.599638] mt7921e 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 2.723254] mt7921e 0000:03:00.0: module failed to load with status -2

@JamiKettunen
Copy link

JamiKettunen commented Oct 15, 2022

Sorry, I meant the problem is it's a bit difficult for us to try and fix it unless we have the hardware, thus if you build a new image locally it should have an up-to-date kernel and firmware which as you speculated could fix the issue.

A picture of dmesg with the exact error could do as well, as that module failed to load with status -2 is way too generic to track down and in fact grep -r . -we 'failed to load with' in root of kernel source didn't give me any results.

@JamiKettunen
Copy link

Seems the 20221001 images are now public, so you can just download it from https://voidlinux.org/download/ like normal. Let me know how it goes!

@4d30
Copy link
Author

4d30 commented Oct 17, 2022

I'll write an image when I get off work to test 'er out

@4d30
Copy link
Author

4d30 commented Oct 18, 2022

The image at https://repo-default.voidlinux.org/live/current/void-live-x86_64-20221001-base.iso was written to a disk. Then this disk was used to boot my device with a MediaTek Mt7921 wireless adapter. It failed to load the module with error -2.

I took some photos with a potato of the error message:

IMG_0151
IMG_0150

This message is printed (10) times:

mt7921e 0000:03:00.0: Direct firmware load for mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin failed with error -2

Then this message once:

mt7921e 0000:03:00.0: hardware init failed

Think it matters that the beginning of this message includes string mt7921 and the latter part contains string MT7961?

@4d30
Copy link
Author

4d30 commented Oct 19, 2022

@JamiKettunen
Copy link

JamiKettunen commented Oct 19, 2022

I can at least tell the linux-firmware package is out-of-date by some 4 months during which WIFI_MT7961_patch_mcu_1_2_hdr.bin has also received a few updates upstream :/

The sha256sum of this problematic file on the MEGA archive matches that of the second latest update to the file fwiw.

I do wonder if the latest version of the file would work if you just copy it to /usr/lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin, then attempt to re-probe the driver with rmmod mt7921e && modprobe mt7921e, it'll probably be more convenient to try this with the XFCE image flavor so you can copy things around easier from another USB device (or another OS install where it works) for example.

Let me know if you have any more progress!

@JamiKettunen
Copy link

JamiKettunen commented Oct 19, 2022

Found the problem, there is no /usr/lib/firmware/mediatek included on the live images currently, void-linux/void-packages#36120 (linux-firmware: move MediaTek firmware) would address this as linux-firmware-network is indeed installed, just not the full linux-firmware which currently contains all of /usr/lib/firmware/mediatek.

Firmware packages installed currently in the live images:
image

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

Successfully merging a pull request may close this issue.

2 participants