8

I'm trying to update the firmware for my wireless card, an Intel 8260 with the iwlwifi driver. /lib/firmware/ has the following files, among others:

iwlwifi-8000C-16.ucode    (version 16.242414.0)
iwlwifi-8000C-22.ucode    (version 22.361476.0)

(I've used the information at https://packages.debian.org/sid/firmware-iwlwifi to identify the versions of these files).

lshw shows that the current firmware is version 16.242414.0. How do I change it so that version 22.361476.0 is used?

  • Why are you using debian packages on Ubuntu ? Does 22.361476.0 load / work ? I suggest removing 16.242414.0 as the easiest solution (assuming 22.361476.0 is working). – Panther Jun 02 '17 at 20:32
  • For others' reference I think you are ultimately trying to use the answer here to solve your problem – Zanna Jun 02 '17 at 20:55
  • @Zanna I agree. The latest package is now this: http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.164_all.deb – chili555 Jun 02 '17 at 22:07
  • @bodhi.zazen - I'm not using debian packages, just using that page for reference. I think that the rest of your comments are exactly what I'm trying to learn in the first place. I don't know what you mean by them. – PiotrChernin Jun 02 '17 at 23:45
  • sudo apt-get purge iwlwifi then install the version you want either with apt-get or from .deb – Panther Jun 05 '17 at 14:38
  • @bodhi.zazen Thanks, I'm starting to understand. But why would apt-get be involved at all here? I already have both of the files on the system already. Repositories shouldn't be involved. – PiotrChernin Jun 05 '17 at 17:51
  • Use apt-get or any package manager you wish to install and remove packages. You should be using repositories rather than downloading .deb – Panther Jun 05 '17 at 17:53
  • @bodhi.zazen I shouldn't be using repositories OR downloading .deb files because I already have the files on-disk. I just want to switch between them. – PiotrChernin Jun 05 '17 at 18:32
  • @bodhi.zazen iwlwifi isn't the name of a package that can be installed or purged. It is the name of the driver. – chili555 Jun 08 '17 at 23:45

1 Answers1

4

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 -16 firmware. You can load several different ucode files into /lib/firmware and the driver will call the version it was written to require.

NOTE: In some cases, there is a mismatch between what the driver code seems to require and what actually loads.

You could install a later version of iwlwifi; generally, this is done by installing a newer Ubuntu version. In Ubuntu 17.04, modinfo iwlwifi says:

filename:       /lib/modules/4.10.0-22-generic/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
license:        GPL
author:         Copyright(c) 2003- 2015 Intel Corporation <linuxwifi@intel.com>
description:    Intel(R) Wireless WiFi driver for Linux
<snip>
firmware:       iwlwifi-8000C-26.ucode
<snip>

The corresponding linux-firmware package contains -13, -16 and -21; but not -26!

You certainly can upgrade your firmware. In any case, the driver will load the firmware file it is written to require. In many cases, the driver will be written to use any of several versions; for example, -6, -7, -8 or -9. The driver looks for the newest it can find in /lib/firmware and, if it fails to find it, loads the next newest and so on. In the 'for instance' I give above, if the newest firmware package contains -6, -7, -8, -9 and -10, no harm will be done. The driver simply loads the newest and latest it is written for and ignores the rest. -10 will not load.

To upgrade yours:

wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.164_all.deb
sudo dpkg -i linux*.deb

If your desire to load newer firmware is motivated by a wireless issue, we'd love to hear it and try to help.

chili555
  • 60,188
  • Thank you so much! I can see that I misunderstood several things. I was attempting to follow the first answer at this question, which starts with upgrading the firmware. It sounds like I can't upgrade my firmware any further without upgrading to a new release, is that correct? – PiotrChernin Jun 09 '17 at 13:00
  • So the output of lshw shows the firmware version that the driver requires, not the one it's currently using? In that case, how is any firmware ever upgraded without upgrading the driver itself? – PiotrChernin Jun 09 '17 at 13:02
  • Please see my edit above in a few moments. lshw shows the version that loaded, as does dmesg | grep iwl – chili555 Jun 09 '17 at 14:53
  • 1
    There's still something I don't understand. If the driver requires a specific version, then how can I upgrade firmware? It will keep using the version that it's written to require, no matter what, the way that mine is still using version 16 even though version 22 is available. – PiotrChernin Jun 09 '17 at 15:09
  • So is this understanding correct: modprobe <drivername> shows what firmware version is required; lshw and dmesg provide the firmware version that loaded; the two are almost always the same, excepting rare cases. (?) – PiotrChernin Jun 09 '17 at 15:12
  • modinfo not modprobe shows the firmware versions that will be accepted. However, sometimes, as I noted above, sometimes there is a disconnect. Essentially, older driver versions of iwlwifi were written for older firmware versions. As the driver improves in newer versions, so then, must the firmware. – chili555 Jun 09 '17 at 15:20
  • Sorry, I meant modinfo. Can't edit it. – PiotrChernin Jun 09 '17 at 15:41
  • As a newbie, I've been advised many times not to circumvent the repositories or package managers to install packages, including on that package's download page. And this isn't even an Ubuntu package. So, as a general principle, how do I know that what you're suggesting is safe? – PiotrChernin Jun 09 '17 at 16:06
  • How is packages.ubuntu.com not an Ubuntu package?? kernel.org is just a mirror site. – chili555 Jun 09 '17 at 16:09
  • My mistake. I was confused by the ".deb" extension and thought it was intended for Debian. – PiotrChernin Jun 09 '17 at 18:18
  • I came here because I have an issue with - I think - the wifi driver. I read the last sentence of your answer as an allowance to post a link to my question, in the hope you all can give some light: https://askubuntu.com/q/1368935/109449 Thanks a lot! – Alexandre Schmidt Oct 27 '21 at 20:35