Missing MediaTek firmware!

I have hardware.firmware = [ pkgs.linux-firmware ]; in my system configuration.
However, I checked /run/current-system/firmware, and didn’t find firmware related to MT7925. As it supposed to be here accroding to Linux firmware git repository.

I use nixos-unstable repo by the way, and the rev: 0b4defa2584313f3b781240b29d61f6f9f7e0df3

A couple of thoughts:

(1) What is the problem that you are trying to solve? How did you determine missing firmware was the cause?

(2) Using ls and grep to find files may have led you to the wrong conclusion. The firmware files will (most likely) be in subfolders, so your ls would not be seeing the filenames with MT7925 (case-sensitive). You might want to check that using find /run/current-system/firmware -iname '*mt7925*' instead.

2 Likes

I can confirm that my device doesn’t recongnize bluetooth due to lack of firmware. Therefore I’m gonna add firmware to my system.

There aren’t subfolders with mt7925 firmware in that diretory. While it contains a few other MediaTek device firmware:

mt7601u.bin.zst
mt7650.bin.zst
mt7662.bin.zst
mt7662_rom_patch.bin.zst

Does the directory /run/current-system/firmware/mediatek/mt7925/ not exist for you? It exists for me on nixos 25.05 and has files like BT_RAM_CODE_MT7925_1_1_hdr.bin.zst (matching what’s in mediatek/mt7925 · main · kernel-firmware / Linux Firmware · GitLab).

1 Like

It even does not have mediatek directory.
Have you installed linux-firmware?

Yeah, have you? Does nix-store -qR /run/current-system | grep linux-firmware show anything? For me it outputs /nix/store/103ckyl3blv252b01ymaq36hfmdy73n6-linux-firmware-20251011-zstd and the directory /nix/store/103ckyl3blv252b01ymaq36hfmdy73n6-linux-firmware-20251011-zstd/lib/firmware/mediatek/mt7925 also exists with the same files as before. If that command doesn’t output anything then your current system doesn’t include linux-firmware.

1 Like

Oddly enough, mt7601u.bin.zst that they gave as an example would also be coming from linux-firmware.

Allright, sorry for my hasty assertion, there IS a /run/current-system/firmware/mediatek/mt7925/ directory on my system. And I see .zst suffix firmware in that directory.

BT_RAM_CODE_MT7925_1_1_hdr.bin.zst  WIFI_MT7925_PATCH_MCU_1_1_hdr.bin.zst  WIFI_RAM_CODE_MT7925_1_1.bin.zst

But I wonder if it is correctly loaded.

Do I have to add these parameters?

You can check if those kernel parameters are set on your system with cat /proc/config.gz | gunzip | grep CONFIG_FW_LOADER. On my system both of them are enabled, so I don’t think anything custom needs to be done there. To confirm whether or not firmware is loaded you could first check which module (if any) is loaded with lsmod | grep mt7925. It should be either mt7925e or mt7925u I think. You can check modinfo mt7925e mt7925u | grep firmware to check which firmware is loaded by the modules. You could also check dmesg and see if there’s anything relevant there.

Can you post the output of journalctl -b -g mt792 ?

And can you share the make and model of the device involved?

Can confirm is correctly loaded:

[intangiblew@nixos:~]$ modinfo mt7925e
filename:       /run/booted-system/kernel-modules/lib/modules/6.12.51/kernel/drivers/net/wireless/mediatek/mt76/mt7925/mt7925e.ko.xz
license:        Dual BSD/GPL
description:    MediaTek MT7925E (PCIe) wireless driver
author:         Lorenzo Bianconi <lorenzo@kernel.org>
author:         Deren Wu <deren.wu@mediatek.com>
firmware:       mediatek/mt7925/WIFI_MT7925_PATCH_MCU_1_1_hdr.bin
firmware:       mediatek/mt7925/WIFI_RAM_CODE_MT7925_1_1.bin
alias:          pci:v000014C3d00000717sv*sd*bc*sc*i*
alias:          pci:v000014C3d00007925sv*sd*bc*sc*i*
depends:        mt76-connac-lib,mt7925-common,mt792x-lib,mt76
intree:         Y
name:           mt7925e
retpoline:      Y
vermagic:       6.12.51 SMP preempt mod_unload
parm:           disable_aspm:disable PCI ASPM support (bool)

Since there no problem with firmware. I’ll close this post.