linux-docs icon indicating copy to clipboard operation
linux-docs copied to clipboard

FW16 Mediatek MT7922 WIFI 6E connection issues on Ubuntu 22.04 and Debian trixie

Open linux4life798 opened this issue 1 year ago • 3 comments

On the Framework 16 with the Mediatek MT7922, I am experiencing wifi connection/association issue using the firmware discussed in the https://github.com/FrameworkComputer/linux-docs/blob/main/ubuntu-22.04-fw-16.md tutorial. This is the Mediatek firmware at version 0a18a7292a66532633d9586521f0b954c68a9fbc. The wifi card may associate once or twice to a wifi 6e AP, but it is still too unstable. The majority of the time it just doesn't connect on boot.

I'm testing out the mediatek firmware at tag 20240410 to see if this remedies the issue.

https://gist.github.com/linux4life798/952d2164faab3fc0323924aa24e1b367#file-debian-on-framework16-md

linux4life798 avatar Apr 21 '24 01:04 linux4life798

Even with this newer firmware, there seems to be issues. After I let the machine sit idle for a while, it make have opted to sleep. When I woke it, I saw that the wifi was disconnected and I saw the following in the kernel messages:

[13873.049482] PM: suspend exit
[13876.040571] wlp1s0: authenticate with ae:4c:a5:ab:cd:ef
[13876.076204] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 1/3)
[13876.103905] wlp1s0: authenticate with ae:4c:a5:ab:cd:ef
[13876.112854] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 1/3)
[13879.152341] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 2/3)
[13881.117940] wlp1s0: aborting authentication with ae:4c:a5:ab:cd:ef by local choice (Reason: 3=DEAUTH_LEAVING)
[13895.414979] wlp1s0: authenticate with ae:4c:a5:ab:cd:ef
[13896.464028] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 1/3)
[13899.504255] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 2/3)
[13914.460942] wlp1s0: authenticate with ae:4c:a5:ab:cd:ef
[13915.503836] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 1/3)
[13916.527825] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 2/3)
[13917.551781] wlp1s0: send auth to ae:4c:a5:ab:cd:ef (try 3/3)
[13917.564573] wlp1s0: authentication with ae:4c:a5:ab:cd:ef timed out

linux4life798 avatar Apr 21 '24 06:04 linux4life798

I appreciate the heads up. Are you seeing this on a vanilla install of Ubuntu 24.04 fully updated (should be the same era of firmware as your latest test)?

ctsdownloads avatar Apr 26 '24 21:04 ctsdownloads

I'm testing out the mediatek firmware at tag 20240410 to see if this remedies the issue.

Unfortunately, this did not fix the issue. It rarely successfully connects to my Wifi 6E AP on boot. I am pretty much Ethernet bound. I have slightly better success with the machine booting with wifi disabled and then manually enabling it after all boot stuff finishes.

I appreciate the heads up. Are you seeing this on a vanilla install of Ubuntu 24.04 fully updated (should be the same era of firmware as your latest test)?

Sorry I don't have much daily Ubuntu usage data for you. I don't use Ubuntu, but I did a clean/test install for comparison. It looks like it is having issues connecting to my Wifi 6E AP, also. It isn't very predictable when it will fail to connect. I'm attaching a kernel messages from when I resumed from standby and the wifi failed to reconnect. Once it fails to associate like this, it doesn't matter how many times you disable and re-enable wifi, if doesn't seem like it associate again in that boot.

Info:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04 LTS
Release:	24.04
Codename:	noble

$ uname -a
Linux craigwork-ubuntu 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg -l linux-firmware
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                       Architecture Description
+++-==============-=============================-============-=================================
ii  linux-firmware 20240318.git3b128b60-0ubuntu2 amd64        Firmware for Linux kernel drivers

$ md5sum /lib/firmware/mediatek/{WIFI_,BT_}*
7e0d4276e2b0f4be9c059afeddc454e4  /lib/firmware/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin.zst
2c8f3ca895c1fd8c91ec4603e7e217d5  /lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin.zst
91aa3f0aaf19804a9384eb13c95f4b64  /lib/firmware/mediatek/WIFI_RAM_CODE_MT7922_1.bin.zst
256ce93707d08a2ba22b40193046cb16  /lib/firmware/mediatek/WIFI_RAM_CODE_MT7961_1.bin.zst
c5ef50e02159eaf23cd6260a36f48166  /lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.zst
258032c00e260ba1619afcc2ce5d0bce  /lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.zst

$ for f in /lib/firmware/mediatek/{WIFI_,BT_}*; do echo \# $f; zstdcat $f | md5sum; done
# /lib/firmware/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin.zst
35039ab85bbad3db23a8d5227781b6b9  -
# /lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin.zst
08c696798917a7a976bf3669238878b7  -
# /lib/firmware/mediatek/WIFI_RAM_CODE_MT7922_1.bin.zst
f647ffe6cf1cc4cd9d164eeb2053a5b4  -
# /lib/firmware/mediatek/WIFI_RAM_CODE_MT7961_1.bin.zst
c2fa82d36f0d65dcb072c8e34469586c  -
# /lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.zst
82f41ea252faa3c34e3114e498c516ab  -
# /lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.zst
03afd3e322987348e94ec1cc8f5ef5dc  -

wifi-failed-to-reconnect-after-resume.txt

linux4life798 avatar May 17 '24 06:05 linux4life798

Confirmed this is still an issue on Ubuntu 24.04.

Lately, it has been failing to connect to the WiFI 6E AP about 25% of the time, but seems to always successfully connect to non-6E APs. Once this failure occurs, then rebooting will not solve the issue. I believe a full shutdown with some dwell time can recover from this timedout state, but I usually just plug in ethernet, since I'm not willing to roll the dice again.

This issue only occurs when connecting to my home Technicolor CGM4981 router/AP provided by Comcast.

linux4life798 avatar Aug 26 '24 00:08 linux4life798

After procuring a 6E router for testing, I was able to repro this about the same. Updated router firmware, it has not been an issue since. This was tested on a mesh network router, later firmware updates resolved the issue.

ctsdownloads avatar Oct 10 '24 21:10 ctsdownloads

Some may still encounter the problem. Here's a useful fix:

sudo modprobe -r mt7921e
sudo modprobe mt7921e

kennyfs avatar Oct 17 '24 02:10 kennyfs

@kennyfs his solution also works on the FW 13 AMD

hieronymousch avatar May 27 '25 14:05 hieronymousch

Anyway, I replaced it with a AX200 lol. That's the best fix.

kennyfs avatar May 27 '25 15:05 kennyfs