Summary
I'm trying to replace a small number of firmware binaries with newer versions that fix a bug affecting my hardware. I've followed a procedure that should load the new firmware, but it doesn't seem to do that. How can I load the new firmware?
Updating the linux-firmware
package to the version under development for 24.04 (Noble Numbat) might also be an acceptable solution. If this is feasible, I can ask a new question about how to do it.
System details
- OS: Ubuntu 22.04 (Jammy Jellyfish)
- Kernel: 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
- Secure boot: on
Firmware loading procedure
Here's the firmware update procedure I tried (with the goal of solving this problem):
- Move the default binaries out of their directory.
The specific binaries are:
/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin /lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin /lib/firmware/mediatek/WIFI_RAM_CODE_MT7961_1.bin
- Replace the removed binaries with newer versions.
- Call
sudo update-initramfs -u
to regenerate the initial RAM disk. - Reboot.
Unexpected outcome
I don't think the new binaries are running. Here's why.
- The build times in the
dmesg
logs from the relevant kernel module haven't changed:[ 2.302579] mt7921e 0000:01:00.0: enabling device (0000 -> 0002) [ 2.311065] mt7921e 0000:01:00.0: ASIC revision: 79220010 [ 2.399380] mt7921e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20221227123154a [ 2.778037] mt7921e 0000:01:00.0: WM Firmware Version: ____000000, Build Time: 20221227123243 [ 3.867760] mt7921e 0000:01:00.0 wlp1s0: renamed from wlan0
- The
srcversion
number in the relevantmodinfo
output (modinfo mt7921e
) hasn't changed—although I'm not sure it would change if the new firmware loaded, because it doesn't seem to come from the replaced binaries.
⋮filename: /lib/modules/6.5.0-15-generic/kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko
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 srcversion: 6691EA96F8FB6412FC35FFB
- I haven't noticed any change in how the hardware behaves.
Troubleshooting checks
- The new binaries are different from the old ones, but have the same names (checked with
diff
). - The permissions of the old and new binaries match.
- The modification date of the initial RAM disk I'm booting from (
/boot/initrd.img-6.5.0-15-generic
) matches the last time I ranupdate-initramfs
. - Following a suggestion by @DanielT, I tried skipping step 2 in the procedure, which should leave the
mt7921e
module missing some of its firmware. This still doesn't affect thedmesg
output or hardware behavior (although it does change themodprobe
output).
srcversion
on the.ko
files, which are separate from the firmware files. It may be better to usecmp
orsha256sum
instead ofdiff
. I think the new binaries are running. If you're still in doubt, delete them, update-initramfs, reboot, see errors indmesg
, put them back, update-initramfs, reboot, see no more errorsdmesg
errors also include the stringmt7921e
?WM Firmware Version
line will change to something else