1

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):

  1. 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
      
  2. Replace the removed binaries with newer versions.
  3. Call sudo update-initramfs -u to regenerate the initial RAM disk.
  4. 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 relevant modinfo 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 ran update-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 the dmesg output or hardware behavior (although it does change the modprobe output).
10
  • You're running srcversion on the .ko files, which are separate from the firmware files. It may be better to use cmp or sha256sum instead of diff. I think the new binaries are running. If you're still in doubt, delete them, update-initramfs, reboot, see errors in dmesg, put them back, update-initramfs, reboot, see no more errors
    – Daniel T
    Commented Feb 8 at 18:16
  • @DanielT, would the dmesg errors also include the string mt7921e?
    – Vectornaut
    Commented Feb 8 at 19:13
  • I don't know whether it will contain any specific string. All I know is that the WM Firmware Version line will change to something else
    – Daniel T
    Commented Feb 8 at 19:14
  • 1
    No, missing firmware problems are localized to the affected devices. Firmware for new computers are frequently missing, but those computers did not explode
    – Daniel T
    Commented Feb 8 at 19:26
  • 1
    This is strange. I suppose it confirms your suspicion that you "don't think the new binaries are running"
    – Daniel T
    Commented Feb 8 at 20:38

0

You must log in to answer this question.

Browse other questions tagged .