How does the linux kernel choose which firmware version to load?

57,245

Solution 1

The firmware version that is requested is written into the driver code. As you can see, the particular version if iwlwifi that you are using requests -7 firmware. It can't find it and ends in an error. You can see this in modinfo iwlwifi:

$ modinfo iwlwifi
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
license:        GPL
author:         Copyright(c) 2003-2013 Intel Corporation <[email protected]>
version:        in-tree:
description:    Intel(R) Wireless WiFi driver for Linux
<snip>
firmware:       iwlwifi-7260-7.ucode

What does yours report? Have you tried re-naming the -9 firmware as -7, after backing up, of course?

I actually believe that, for 7260 devices, modinfo suggests -7 but the driver actually uses -8. I am unaware of any driver version that calls for -9. Perhaps kernel version 3.15-xx.

Solution 2

I think it depends on your kernel:

  • 3.10+ uses firmware -7
  • 3.13+ uses firmware -8
  • 3.14.9+ uses firmware -9
  • 3.17+ uses firmware -10

Source: http://wireless.kernel.org/en/users/Drivers/iwlwifi

Ubuntu 14.04 is 3.13 so loads 22.24.8.0.

Ubuntu 14.10 is 3.16 so loads 25.228.9.0.

I can connect with both, though the first was flaky for me... speedtest.net scores were 2-3Mbps down versus 25Mbps down with the second. YMMV.

Solution 3

Same here... but with stock kernel

$ uname -a
Linux prato 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ modinfo iwlwifi | grep 7260
firmware:       iwlwifi-7260-7.ucode

But will only load if I download and install 7260-8 from http://wireless.kernel.org/en/users/Drivers/iwlwifi

Maybe somebody forgot to change something in the driver info. My installation had -7 and -9, oddly enough.

Luckily it works with the -8, even with monitor mode.

Hope it helps!

Share:
57,245

Related videos on Youtube

oz123
Author by

oz123

Updated on September 18, 2022

Comments

  • oz123
    oz123 over 1 year

    I installed the latest firmware for my network card N-7260 from http://wireless.kernel.org/en/users/Drivers/iwlwifi#Firmware. I am using Ubuntu 14.04 with kernel version 3.14.01 from the kernel's team ppa. Here is a list of firmware I have in /lib/firmware:

    $ ls /lib/firmware/*iwl*7260*
    /lib/firmware/iwlwifi-7260-8.ucode  /lib/firmware/org.iwlwifi-7260-7.ucode
    /lib/firmware/iwlwifi-7260-9.ucode  /lib/firmware/org.iwlwifi-7260-8.ucode
    

    Right now it seems that version 9 does not load. If I remove version 8, I see on boot the following message:

    sudo dmesg | grep iwl
    [sudo] password for ozubu: 
    [    6.121743] iwlwifi 0000:02:00.0: irq 62 for MSI/MSI-X
    [    6.133208] iwlwifi 0000:02:00.0: Direct firmware load failed with error -2
    [    6.133211] iwlwifi 0000:02:00.0: Falling back to user helper
    [    6.311794] iwlwifi 0000:02:00.0: Direct firmware load failed with error -2
    [    6.311799] iwlwifi 0000:02:00.0: Falling back to user helper
    [    6.324940] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-7260-7.ucode' failed.
    [    6.324950] iwlwifi 0000:02:00.0: no suitable firmware found!
    

    So, my question is:

    How do I tell linux it should load iwlwifi-7260-9.ucode ?

    update

    Oddly enough, the firmware version loaded now is 8, at least according to dmesg:

    $ sudo dmesg | grep iwl
    [sudo] password for ozubu: 
    [   18.970651] iwlwifi 0000:02:00.0: irq 62 for MSI/MSI-X
    [   19.012648] iwlwifi 0000:02:00.0: loaded firmware version 22.24.8.0 op_mode iwlmvm
    [   19.315472] iwlwifi 0000:02:00.0: Detected Intel(R) Wireless N 7260, REV=0x144
    [   19.315899] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    [   19.316118] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    [   19.523132] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
    [   23.100268] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    [   23.100484] iwlwifi 0000:02:00.0: L1 Disabled; Enabling L0S
    
    • jhasse
      jhasse almost 10 years
      AFAIK 22.24.8.0 is firmware version 9. Version 8 is 22.15.8.0. See intel.com/support/wireless/wlan/sb/CS-034398.htm
    • Admin
      Admin almost 10 years
      Just to confirm Pablo findings, my issue was that SSH stop responding a short while following reboot. After I installed iwlwifi-7260-8.ucode firmware into /lib/firmware and rebooted I no have been up and running SSH without any issues over Wifi. My system is a Intel NUC with 14.04 LTS installed. Thanks Pablo New to this forum so I'm not able to vote yet, else you would have my vote.
    • Tosho
      Tosho over 9 years
      Using 14.04 with kernel 3.13.0-36-generic is loading firmware version 22.24.8.0 op_mode iwlmvm and it WORKS! perfectly (no mater power on/off). But when I upgrade the kernel to 3.16.*, its loading firmware version 23.214.9.0, and the speed is terrible (with power on) and half the speed (with power off)
    • oz123
      oz123 over 9 years
      @Tosho, well, the firmware for this chip is simply bad. I have various problems with this chip.
    • Tosho
      Tosho over 9 years
      @Oz123 Yeah. but as I said the 22.24.8.0 work perfect. I'm not sure if the problem is from the latest firmware or the kernel 3.16.
  • oz123
    oz123 about 10 years
    Hi, I tried your solution, but I am still seeing the error: Direct firmware load failed with error -2. And a different issue is that despited the module requiring version 7, it loads version 8. See my update above.
  • chili555
    chili555 about 10 years
    Please see my edit.
  • Martin Thoma
    Martin Thoma about 8 years
    What does 4.4.0-21-generic use?
  • zeroconf
    zeroconf almost 7 years
    Here is one bug report bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/170479‌​9 - hopefully you can download missing firmware and fix the issue.