Mediatek MT7921e wifi driver issue

I recently purchased a barebones minisforum HX90 computer, which comes with a Mediatek MT7921 wifi card pre-installed. After outfitting the computer with all the essential components, I loaded up Manjaro KDE Plasma 21.2.2 and noticed I had no wifi. I hooked up an ethernet cable and proceeded to enable AUR support, as well as updating the mirrors/repos. Then I performed an -Syyu and rebooted, still no wifi. After hours of research, I found folks who had the same set up as me got their wireless working after upgrading to the new experimental kernel (5.17rc2.220130.gfb602dd-1). After upgrading to the kernel, I FINALLY GOT WIFI WORKING!!!

But, my wifi still has problems. The computer will only load up the drivers from a cold power on. It refuses to load the wifi drivers if I perform a reboot, and will only configure itself properly if shut it down completelyI and wait a few seconds before powering back on. Although it’s not a deal breaker, it would be nice to have my wifi working properly as this computer is normally hooked up to my t.v. and no where near an ethernet connection.

When I run inxi -Fza off a cold boot, it shows all drivers loaded. If I run that command after a reboot, the mt7921e are absent.

I have secure boot turned off in the BIOS
I have disabled the Trusted Computing TPM module in the BIOS
I have also selected legacy boot in the BIOS.

Has anybody experienced this, or something similar?
Does anyone have a solution or work around for this?

Any help or comments will surely be appreciated.

Jonathan

1 Like

Hi @window_licker,

I faintly remembered something I saw about this adapter, so I asked Google again. Sure enough, I was led to this page and this answer that I remember reading:

Hold down the power button for a full 60 seconds and it resets your bluetooth and wifi then restart. Completely fixed the issue for me.

So, I hope it helps!

Thank you for the suggestion, but I also tried this several times to no avail.

Hey, I’m also facing the same issue in asus tuf a15 which has the same wifi card. Any updates on this?

Edit:

Actually, no.

Please provide the output of:

sudo lshw -class network

Please rather open a new #support thread and provide the necessary information:

me too

:smiley:

I have the same wireless adapter: mt7921e aka AMD RZ608
Thanks, @Mirdarthos! The 60s trick worked:

  1. Shut down the laptop
  2. Hold power button for 60s (probably less than that)
  3. Release power button
  4. Laptop boots
  5. Wi-fi module works again (internal memory cleaned)

It was recognized after that. (Resetting BIOS to default didn’t help the wi-fi card).

What’s the deal with it?

The OEM mt7921e has had kernel support for much longer than the AMD rebrand of the same card. The reason why 5.15 recognizes Bluetooth but not Wifi is that the rebrand’s PCI-ID is not known to the kernel. To make the existing driver work in older kernels you must register its PCI-ID to the driver (see answer for a persistent solution):

root# modprobe mt7921e
# echo 14c3 0608 > /sys/bus/pci/drivers/mt7921e/new_id

inxi -Fza before/after loading:

Before:
Network:
  Device-1: MEDIATEK driver: N/A pcie: gen: 2 speed: 5 GT/s lanes: 1
	port: N/A bus-ID: 04:00.0 chip-ID: 14c3:0608 class-ID: 0280
  Device-2: <LAN>
  IF: enp5s0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device type: USB driver: btusb v: 0.8
	bus-ID: 3-3:2 chip-ID: 0e8d:0608 class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends

After:
Network:
  Device-1: MEDIATEK driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s
	lanes: 1 port: N/A bus-ID: 04:00.0 chip-ID: 14c3:0608 class-ID: 0280
  IF: wlp4s0 state: down mac: <filter>
  Device-2: <LAN>
  IF: enp5s0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device type: USB driver: btusb v: 0.8
	bus-ID: 3-3:2 chip-ID: 0e8d:0608 class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
  1. You can see the PCI-ID under chip-ID
  2. You can see there’s now a wlp4s0 network interface

This hotloading works fine for a Live boot on 5.15 kernel. I needed a newer kernel so I installed Manjaro’s 5.17.1-3 and rebooted: BOOM. Kernel panic at boot, pointing at the wireless module. The log looked very similar to this, but I didn’t take a photo.
I rebooted: same 5.17 kernel booted fine but without wi-fi! Loading the driver per above and echo’ing the line returned an error: echo" write error: File exists - i.e. the card+ID is already known to kernel, but it’s not recognized. Rebooting thereafter, 5.17 or 5.15 DOES NOT RESTORE WIFI FUNCTIONALITY. Bluetooth continues to work fine.

The issue must be the driver that’s buggy.

Kernel 5.17.3: last commit is “mt76: mt7921e: fix possible probe failure after reboot” - that’s a big patch

Linux next / Kernel 5.18-rc2: “mt76: mt7921: move mt7921_init_hw in a dedicated work”

Judging by the changelog - the former patch was only added in 5.17.2 and Manjaro only distributes 5.17.1 for now - Manjaro’s kernels don’t have these latest patches. I’m either going to continue with the manual method or try to compile a 5.18/5.17.3 kernel.


OK, putting up your own kernel isn’t hard at all.

Offtopic: 5.18 Manjaro kernel compilation

Manjaro’s 5.18 kernel link. You’ll need packages make patch flex bison if you don’t already. 22GB free space as of today. Then follow the instruction from above:

  1. git clone https://gitlab.manjaro.org/packages/core/linux518
  2. cd linux518
  3. makepkg -s - if anything fails during compilation, you must delete the src folder: rm -rf ./src
  4. sudo pacman -U ./linux-518....tar.zst ./linux-headers-518.....tar.zst

This last step will normally install the kernel and update the boot manager (e.g. grub)

2 Likes

In kernel 5.18 the issue is completely fixed. Thank you!