Mediatek wifi controller don't see driver

hello

I have bought a new MSI Laptop with wifi controller Mediatek:

miguel@localhost:~> lsb_release -a
LSB Version: n/a
Distributor ID: openSUSE
Description: openSUSE Leap 15.5
Release: 15.5
Codename: n/a

miguel@localhost:~> uname -a
Linux localhost.localdomain 5.14.21-150500.53-default #1 SMP PREEMPT_DYNAMIC Wed May 10 07:56:26 UTC 2023 (b630043) x86_64 x86_64 x86_64 GNU/Linux

miguel@localhost:~> sudo lspci -v -s 01:00.0
01:00.0 Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
Subsystem: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
Flags: fast devsel, IRQ 255
Memory at e0300000 (64-bit, prefetchable) [disabled] [size=1M]
Memory at e0400000 (64-bit, prefetchable) [disabled] [size=16K]
Memory at e0404000 (64-bit, prefetchable) [disabled] [size=4K]
Capabilities: [80] Express Endpoint, MSI 00
Capabilities: [e0] MSI: Enable- Count=1/32 Maskable+ 64bit+
Capabilities: [f8] Power Management version 3
Capabilities: [100] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
Capabilities: [108] Latency Tolerance Reporting
Capabilities: [110] L1 PM Substates
Capabilities: [200] Advanced Error Reporting

if i run this command (sudo lspci -v -s 01:00.0) whith an other distro
the result is :
01:00.0 Network controller: MEDIATEK Corp. Device 0608
Subsystem: MEDIATEK Corp. Device 0608
Flags: bus master, fast devsel, latency 0, IRQ 82, IOMMU group 8
Memory at e0300000 (64-bit, prefetchable) [size=1M]
Memory at e0400000 (64-bit, prefetchable) [size=16K]
Memory at e0404000 (64-bit, prefetchable) [size=4K]
Capabilities:
Kernel driver in use: mt7921e
** Kernel modules: mt7921e**

there is 2 news infos about kernel
theorically the driver mt7921e is usable from kernel 5.12
in my "15.5 openSUSE distro this driver is present

i have tryed to start driver with command :
miguel@localhost:~> sudo modprobe --first-time mt7921e

the driver seems to be loaded the next command seems to confirm that :
miguel@localhost:~> sudo lsmod | grep -i mt79
mt7921e 90112 0
mt76_connac_lib 40960 1 mt7921e
mt76 90112 2 mt7921e,mt76_connac_lib
mac80211 1183744 3 mt76,mt7921e,mt76_connac_lib
cfg80211 1048576 4 mt76,mt7921e,mac80211,mt76_connac_lib

After that i restarted the networkManager service and nothing change wifi is not enabled and the lspci command don’t show driver info.

Has someone some solution for my problem
Thanks in advance

@micalmar:

First, welcome to the openSUSE Forums.


Checking the content of the openSUSE RPM package “kernel-firmware-mediatek”, it seems that, the firmware for the MT7921K isn’t currently available.

  • Leap 15.5 Kernel version: 5.14.21

But, the Linux Kernel has this information: <https://wireless.wiki.kernel.org/en/users/drivers/mediatek>.

  • The MT7921 as such is supported as follows:
    PCIe from Kernel version 5.12+
    SDIO from Kernel version 5.16+
    USB from Kernel version 5.18+

Therefore, you can either wait a few months until the openSUSE Kernel backport team supply the MT7921 firmware for the Leap 15.5 (SLE) Kernel or –

  • you could try Tumbleweed.

Thanks a lot for your fast answer

the live CD of Tumbleweed manage the wifi controller.
wait and see

Not the name of the Wifi Controller is important, only the ID is important and not shown by your commands.

So please post:
/sbin/lspci -nnk | grep -iA3 net

modinfo shows, what firmware is needed and which ID are ready for this driver:

modinfo mt7921e
filename:       /lib/modules/5.14.21-150500.55.7-default/kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko.zst
license:        Dual BSD/GPL
author:         Lorenzo Bianconi <lorenzo@kernel.org>
author:         Sean Wang <sean.wang@mediatek.com>
firmware:       mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin
firmware:       mediatek/WIFI_RAM_CODE_MT7922_1.bin
firmware:       mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
firmware:       mediatek/WIFI_RAM_CODE_MT7961_1.bin
suserelease:    SLE15-SP5
srcversion:     FA6553A3233AD36C8A42BF6
alias:          pci:v000014C3d00000616sv*sd*bc*sc*i*
alias:          pci:v000014C3d00000608sv*sd*bc*sc*i*
alias:          pci:v000014C3d00007922sv*sd*bc*sc*i*
alias:          pci:v000014C3d00007961sv*sd*bc*sc*i*
depends:        mt76,mt7921-common,mt76-connac-lib
supported:      no
retpoline:      Y
intree:         Y
name:           mt7921e
vermagic:       5.14.21-150500.55.7-default SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         SUSE Linux Enterprise Secure Boot CA
sig_key:        CA:FC:B5:D7:5E:C5:89:82
sig_hashalgo:   sha256
signature:      4F:04:56:B3:2C:41:EC:B4:C1:DF:22:18:2D:94:B8:F2:3C:18:40:1D:
                B7:E7:28:AA:76:CF:E0:ED:40:78:6D:EE:8D:10:B9:67:EA:3D:78:90:
                32:46:8F:69:11:31:FA:A5:17:0B:F9:0A:2D:8B:2F:67:88:E2:9A:68:
                E1:99:D5:23:EC:81:96:99:E3:DD:86:03:B7:DA:EE:F7:D3:9E:E4:94:
                87:98:53:DE:4B:4A:38:1B:08:4E:5F:DA:1C:3B:11:22:CD:25:1B:16:
                8F:4C:76:3E:3B:8E:FD:86:4D:A3:74:F3:51:16:4E:F6:64:57:27:C0:
                E9:A5:AD:3F:B9:B7:EE:C2:60:A3:9A:97:B1:6E:59:04:1E:9C:BE:4F:
                38:A3:01:8D:45:E2:3F:C5:6D:45:84:5F:6B:3F:A8:FE:4B:0F:0A:B5:
                C9:D1:3F:8F:77:4E:28:21:52:98:6F:64:CF:86:F0:9B:13:09:74:94:
                2E:2A:67:75:95:66:E4:BC:1B:3F:12:81:0D:B4:B8:BA:1B:8E:72:86:
                57:36:98:CE:03:BE:7F:6E:DA:7D:35:8C:BF:F6:F4:4C:5C:EE:87:39:
                AC:7B:C4:4F:8A:28:A5:78:3F:7E:17:78:B6:0F:DB:3D:0F:73:14:7A:
                33:6E:54:40:7A:29:09:9E:28:7B:50:32:D0:A9:C0:CB
parm:           disable_aspm:disable PCI ASPM support (bool)

Hello

miguel@olga-MSI-LinMint21:~> /sbin/lspci -nnk | grep -iA3 net
01:00.0 Network controller [0280]: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz [14c3:0608]
Subsystem: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz [14c3:0608]
02:00.0 Non-Volatile memory controller [0108]: Sandisk Corp Device [15b7:5014]
Subsystem: Sandisk Corp Device [15b7:5014]

miguel@olga-MSI-LinMint21:~> /usr/sbin/modinfo mt7921e
filename: /lib/modules/5.14.21-150500.53-default/kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko.zst
license: Dual BSD/GPL
author: Lorenzo Bianconi lorenzo@kernel.org
author: Sean Wang sean.wang@mediatek.com
firmware: mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin
firmware: mediatek/WIFI_RAM_CODE_MT7922_1.bin
firmware: mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
firmware: mediatek/WIFI_RAM_CODE_MT7961_1.bin
suserelease: SLE15-SP5
srcversion: 5E5E30BB24F73C57BBD7A4E
alias: pci:v000014C3d00007922sv*sd*bc*sc*i*
alias: pci:v000014C3d00007961svsdbcsci*
depends: mac80211,mt76,mt76-connac-lib,cfg80211
supported: no
retpoline: Y
intree: Y
name: mt7921e
vermagic: 5.14.21-150500.53-default SMP preempt mod_unload modversions
sig_id: PKCS#7
signer: SUSE Linux Enterprise Secure Boot CA
sig_key: CA:FC:B5:D7:5E:C5:89:82
sig_hashalgo: sha256
signature: 82:7A:76:EC:4A:6C:25:EC:7B:10:1A:07:D8:32:0B:D0:BD:CB:6D:23:
49:1F:B5:60:A6:6A:7E:7B:BB:B9:7E:2B:49:26:5D:04:71:78:2A:66:
C7:6B:1D:A4:8B:16:06:15:93:A7:1F:99:DB:3E:35:17:4F:BF:49:D4:
03:B6:1C:AB:EC:66:2E:B9:47:D6:AF:27:FB:A7:1C:EC:1F:73:84:E3:
B9:AC:98:BF:42:DB:68:AF:D5:4A:0C:A1:BD:2D:6C:72:93:52:F5:32:
9A:9E:17:73:C5:FC:83:6C:5B:4E:3B:1D:84:E0:B9:6E:E0:20:41:DE:
9A:6A:E4:B3:52:09:6C:8B:14:2D:D9:B9:7A:7B:4D:94:1B:D7:3C:5D:
91:00:A6:9B:40:28:A6:FD:C8:EA:AF:DC:31:E7:A9:F3:49:17:9E:C9:
C7:0F:2B:3C:18:01:1B:3A:EB:7B:83:83:9A:DB:C9:6E:9C:EC:D4:14:
28:AF:46:4D:58:A3:2B:B7:47:F9:1C:22:8A:A3:76:37:21:04:B3:96:
81:1B:49:2C:85:83:62:F8:88:14:24:CF:6A:9C:43:7A:51:B8:E5:C9:
26:A9:5A:F6:DB:99:68:11:82:63:83:7C:CD:22:16:0A:5E:AF:95:73:
6E:C2:71:A7:81:F7:67:20:AE:8C:BC:D7:A7:ED:69:28
parm: disable_aspm:disable PCI ASPM support (bool)

Checking the content of the openSUSE RPM package “kernel-firmware-mediatek”, it seems that, the firmware for the MT7921K isn’t currently available.

Its in the OSS Repo:

zypper se -s kernel-firmware-mediatek
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S  | Name                     | Type  | Version             | Arch   | Repository
---+--------------------------+-------+---------------------+--------+----------------
i+ | kernel-firmware-mediatek | Paket | 20230724-lp155.3.1  | noarch | Sauerland-OSS
v  | kernel-firmware-mediatek | Paket | 20230320-150500.1.1 | noarch | Main Repository

Edit:

rpm -ql https://download.opensuse.org/distribution/openSUSE-current/repo/oss/noarch/kernel-firmware-mediatek-20230320-150500.1.1.noarch.rpm
/lib/firmware
/lib/firmware/mediatek
/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.xz
/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
/lib/firmware/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin.xz
/lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin.xz
/lib/firmware/mediatek/WIFI_RAM_CODE_MT7922_1.bin.xz
/lib/firmware/mediatek/WIFI_RAM_CODE_MT7961_1.bin.xz

1 Like

I messed up –

The Mediatek MT7921 drivers, are supplied by the kernel-default-extra and kernel-default-optional packages:

 > rpm --query --whatprovides /lib/modules/5.14.21-150500.55.7-default/kernel/drivers/net/wireless/mediatek/mt76/mt7921/*
kernel-default-extra-5.14.21-150500.55.7.1.x86_64
kernel-default-extra-5.14.21-150500.55.7.1.x86_64
kernel-default-optional-5.14.21-150500.55.7.1.x86_64
kernel-default-optional-5.14.21-150500.55.7.1.x86_64
 > 

On the other hand, the mt7921e/u/s drivers seem to be calling MT7922 and MT7961 firmware (modinfo output).


Therefore, the question is – “Is that firmware being loaded?

The systemd Journal will probably be of little help:

 # journalctl -b 0 --no-hostname --output=short-monotonic | grep -i 'firmware'
[    0.100998] kernel: Spectre V2 : Enabling Speculation Barrier for firmware calls
[    0.329235] kernel: ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.347949] kernel: acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-7f] only partially covers this bridge
[    4.659578] kernel: [drm] Found VCN firmware Version ENC: 1.13 DEC: 2 VEP: 0 Revision: 4
[    4.659592] kernel: amdgpu 0000:06:00.0: amdgpu: Will use PSP to load VCN firmware
[   21.778792] iscsiadm[1778]: iscsiadm: Could not get list of targets from firmware. (err 21)
 #

The information under ‘/sys/firmware/’ may also be of not much help.

# find /lib/firmware -atime -1

and –

# find /lib/firmware -atime -2

are also not much help.


Bottom line:

You cannot query for “currently loaded” firmware, because firmware doesn’t necessarily remain in system memory. It is often uploaded to some chip in some device outside the system. Most drivers will load a firmware file into a kernel buffer, use that buffer to program the device, then discard the buffer without keeping any record of what the file was. Some drivers do log their firmware loading to the kernel log, but that is by choice of whoever wrote the driver; it’s not universal.


And thinking about this issue, the only time I’ve ever seem Firmware being logged in the boot Journal is, when a required Firmware either couldn’t be found or, didn’t load – for whatever reason …