You are not logged in.

#1 2022-12-22 12:11:15

Matty_J
Member
Registered: 2022-12-22
Posts: 5

Mediatek mt7921e wifi driver dropping [Solved]

Hi everyone.

When I boot up my wifi driver is absent.

lspci -k 

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Root Complex (rev 01)
	Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 17h-19h IOMMU
	Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h-19h IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy Host Bridge (rev 01)
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14b8
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy Host Bridge (rev 01)
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: pcieport
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: pcieport
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: pcieport
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy Host Bridge (rev 01)
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy Host Bridge (rev 01)
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy Host Bridge (rev 01)
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe GPP Bridge (rev 10)
	Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe GPP Bridge
	Kernel driver in use: pcieport
00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe GPP Bridge (rev 10)
	Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe GPP Bridge
	Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: ASUSTeK Computer Inc. Device 1d42
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 3
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device 18h; Function 7
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev c2)
	Kernel driver in use: pcieport
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
	Kernel driver in use: pcieport
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT] (rev c2)
	Subsystem: ASUSTeK Computer Inc. Device 1dec
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller
	Subsystem: ASUSTeK Computer Inc. Device 1dec
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
04:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)
	Subsystem: ASUSTeK Computer Inc. Device 202f
	Kernel driver in use: sdhci-pci
	Kernel modules: sdhci_pci
05:00.0 Network controller: MEDIATEK Corp. Device 7922
	Subsystem: AzureWave Device 5300
	Kernel driver in use: mt7921e
	Kernel modules: mt7921e
06:00.0 Non-Volatile memory controller: Phison Electronics Corporation E16 PCIe4 NVMe Controller (rev 01)
	Subsystem: Phison Electronics Corporation E16 PCIe4 NVMe Controller
	Kernel driver in use: nvme
	Kernel modules: nvme
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev c8)
	Subsystem: ASUSTeK Computer Inc. Device 1dec
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
07:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
07:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP
	Subsystem: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP
	Kernel driver in use: ccp
	Kernel modules: ccp
07:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #3
	Subsystem: ASUSTeK Computer Inc. Device 201f
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
07:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #4
	Subsystem: ASUSTeK Computer Inc. Device 201f
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
07:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 60)
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: snd_pci_acp6x
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_sof_amd_renoir
07:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
	Subsystem: ASUSTeK Computer Inc. Device 1d42
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
08:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #8
	Subsystem: ASUSTeK Computer Inc. Device 201f
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
08:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #5
	Subsystem: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #5
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
08:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #6
	Subsystem: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller #6
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
dmesg |grep firmware

[  189.857510] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[  193.562377] [drm] Loading DMUB firmware via PSP: version=0x02020017
[  193.594311] [drm] Found VCN firmware Version ENC: 1.26 DEC: 2 VEP: 0 Revision: 0
[  193.594328] amdgpu 0000:03:00.0: amdgpu: Will use PSP to load VCN firmware
[  195.458882] [drm] Loading DMUB firmware via PSP: version=0x0400002E
[  195.506608] [drm] Found VCN firmware Version ENC: 1.23 DEC: 2 VEP: 0 Revision: 5
[  195.506617] amdgpu 0000:07:00.0: amdgpu: Will use PSP to load VCN firmware

I have found a workaround where if I remove the module "modprobe -rv mt7921" and then shutdown the system tries to shut down but goes to a black screen without completely powering off. after a hard reset it boots back up again and voila the wifi is working again.

Not sure whats going on but any help would be greatly appreciated.

Last edited by Matty_J (2022-12-23 08:22:23)

Offline

#2 2022-12-22 12:33:14

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,646

Re: Mediatek mt7921e wifi driver dropping [Solved]

Please edit your post and use [ code ] tags (not quote tags) when posting output. This makes the output easier to read and provides a scroll box for long output.

https://wiki.archlinux.org/title/Genera … s_and_code
https://bbs.archlinux.org/help.php#bbcode

Offline

#3 2022-12-22 16:32:31

rab0171610@gmail.com
Member
Registered: 2022-11-05
Posts: 20

Re: Mediatek mt7921e wifi driver dropping [Solved]

Is this a dual boot with Windows?  If so, you need to make sure that fast boot is disabled.  Windows saves devices state information to my wifi device that uses an MT7921e chip.  I do not use it for dual boot anymore, and keep win11 in a virtual machine.  The symptoms were the device not being recognized upon some reboots, but available on others.
The only way I found to get the device to be recognized on boot is to turn off the computer by  holding the power button down for at least 30-60 seconds.  The computer should completely turn off while you are doing this.  It does not hurt while you are holding the button in to reach behind computer and turn off power switch at the PSU.  You can flip it back on when you are done.  If that does not work, as a last resort, try clearing CMOS with jumpers or removing the motherboard battery while the machine is removed from power cable.   Your device, if not faulty, should be recognized on the next boot.
That being said, I no longer have this problem using it with only Linux on the system.

Last edited by rab0171610@gmail.com (2022-12-22 16:34:25)

Offline

#4 2022-12-23 00:04:40

Matty_J
Member
Registered: 2022-12-22
Posts: 5

Re: Mediatek mt7921e wifi driver dropping [Solved]

rab0171610@gmail.com wrote:

Is this a dual boot with Windows?  If so, you need to make sure that fast boot is disabled.  Windows saves devices state information to my wifi device that uses an MT7921e chip.  I do not use it for dual boot anymore, and keep win11 in a virtual machine.  The symptoms were the device not being recognized upon some reboots, but available on others.
The only way I found to get the device to be recognized on boot is to turn off the computer by  holding the power button down for at least 30-60 seconds.  The computer should completely turn off while you are doing this.  It does not hurt while you are holding the button in to reach behind computer and turn off power switch at the PSU.  You can flip it back on when you are done.  If that does not work, as a last resort, try clearing CMOS with jumpers or removing the motherboard battery while the machine is removed from power cable.   Your device, if not faulty, should be recognized on the next boot.
That being said, I no longer have this problem using it with only Linux on the system.

Hey rab thanks for the reply smile its not a duel boot and the wifi card has been playing well for since I bought the computer 9 months ago until now. The power off trick is interesting, perhaps that is why when I hard reset after removing the module it works for me??? I feel like its a bios or maybe firmware issue and if I update the bios and reinstall from a backup maybe it will fix it. I just thought I would check in with some experts first and try to understand my system before defaulting to reinstalling. That and my motherboard only supports bios updates from Windows. So its pretty annoying installing Windows just to update the bios. Definitely going to research more linux compatible computers before purchasing next time lol (2022 asus g14)

Offline

#5 2022-12-23 02:02:39

rab0171610@gmail.com
Member
Registered: 2022-11-05
Posts: 20

Re: Mediatek mt7921e wifi driver dropping [Solved]

Did you change any UEFI/Bios settings recently?  It may or may not help, but you could consider toggling the ASPM (Active State Power Management) to on or off in your UEFI motherboard menu.  I cannot check right now, but I think I turned mine to off right around the time period I was having this same problem for that reason.  Also, for open disclosure, I have a different card that uses the same kernel driver:

05:00.0 Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
        Subsystem: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
        Kernel driver in use: mt7921e
        Kernel modules: mt7921e

Barring that, you may find a newer kernel may have fixed the issue?  Otherwise, if you do reboot and find the driver not listed with lspci -k, then  a hard reboot with the power button works for me in those cases to reset the device state.
Soft rebooting did not fix the problem once it started.  I could reboot a hundred times and have the same issue.   Only using the power button trick for 60 seconds would clear the device.  Also, it was not every single reboot, just randomly after rebooting the driver was not listed.  Give the ASPM a toggle and see if that helps.

Offline

#6 2022-12-23 04:42:15

Matty_J
Member
Registered: 2022-12-22
Posts: 5

Re: Mediatek mt7921e wifi driver dropping [Solved]

rab0171610@gmail.com wrote:

Did you change any UEFI/Bios settings recently?  It may or may not help, but you could consider toggling the ASPM (Active State Power Management) to on or off in your UEFI motherboard menu.  I cannot check right now, but I think I turned mine to off right around the time period I was having this same problem for that reason.  Also, for open disclosure, I have a different card that uses the same kernel driver:

05:00.0 Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
        Subsystem: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
        Kernel driver in use: mt7921e
        Kernel modules: mt7921e

Barring that, you may find a newer kernel may have fixed the issue?  Otherwise, if you do reboot and find the driver not listed with lspci -k, then  a hard reboot with the power button works for me in those cases to reset the device state.
Soft rebooting did not fix the problem once it started.  I could reboot a hundred times and have the same issue.   Only using the power button trick for 60 seconds would clear the device.  Also, it was not every single reboot, just randomly after rebooting the driver was not listed.  Give the ASPM a toggle and see if that helps.


Haven't messed with any bios settings recently. Of course secure boot and fast boot are always set to off for me, aside from that I dont really touch the bios settings. I will  mess around a little with the ASPM and see if that works. I just updated bios with ezyboot with no luck. If I modprobe -r and remove the module and reboot it works 100% of the time, then subsequent boots it drops the driver again. I think I'm going to have to install windows again just to update the driver.

I have the g14 kernel installed but the latest linux and linux-lts give the that same issue.

Last edited by Matty_J (2022-12-23 04:43:12)

Offline

#7 2022-12-23 05:10:02

Matty_J
Member
Registered: 2022-12-22
Posts: 5

Re: Mediatek mt7921e wifi driver dropping [Solved]

Ok so just tweaking the ASPM does make the wifi work some times. It seems like it isnt the setting itself that is fixing it but rather just the action of going into the bios then making a change makes the driver module load correctly.

Offline

#8 2022-12-23 08:16:08

Matty_J
Member
Registered: 2022-12-22
Posts: 5

Re: Mediatek mt7921e wifi driver dropping [Solved]

Ok this isn't a true fix however Its working now. Not really sure how it was fixed.

I went to install Windows to update the driver firmware. As I was  staring at the very first window choosing a partition to install on I realized I didn't have the time to do this and quit to complete the install later.

Later I booted up my same linux install one last time and punched in a modprobe -r and then reloaded the module again. I don't know why it worked this time but it worked, and now the driver works as intended again.

Not sure if in the first steps of the Windows install it corrected the driver issue or not but I guess its solved?? Kinda

Last edited by Matty_J (2022-12-23 08:20:22)

Offline

Board footer

Powered by FluxBB