Sam Hooke

These are rough notes from whatever I was working on, interested in or thinking about at the time. They vary greatly in quality and length, but prove useful to me, and hopefully to you too!

Troubleshooting wifi driver crashing (part 3)

We’re going to try and downgrade iwlwifi from version -22 to -17, roughly following advice from here.

This person also has trouble with the -22 version:

Other people reported problems with the -21 version:

Okay, first stop apt from trying to upgrade this package:

sudo apt-mark hold firmware-iwlwifi

Then remove the -22 and -21 version. This should force the kernel to load the previous version which is -17 from what I can see in /lib/firmware/.

sudo mv /lib/firmware/iwlwifi-7265D-22.ucode .
sudo mv /lib/firmware/iwlwifi-7265D-21.ucode .

Time to reboot…


That… did not work. The drivers failed to load, and it did not attempt -17:

[    2.580420] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-26.ucode (-2)
[    2.580521] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-26.ucode failed with error -2
[    2.580562] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-25.ucode (-2)
[    2.580644] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-25.ucode failed with error -2
[    2.580668] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-24.ucode (-2)
[    2.580748] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-24.ucode failed with error -2
[    2.580770] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-23.ucode (-2)
[    2.580826] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-23.ucode failed with error -2
[    2.580840] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-22.ucode (-2)
[    2.580889] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-22.ucode failed with error -2

Networking broke completely:

$ ping 8.8.8.8
connect: Network is unreachable

Let’s mv the firmware back in place and reboot…


This time let’s try removing the firmware-iwlwifi package which we got from apt, and instead download the firmware ourselves and install it manually.

$ sudo apt-mark unhold firmware-iwlwifi
$ sudo apt remove firmware-iwlwifi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  firmware-iwlwifi
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 46.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 145071 files and directories currently installed.)
Removing firmware-iwlwifi (20161130-3) ...

Download iwlwifi-7265-ucode-25.30.13.0.tgz (version -13) from here.

Follow instructions in README…

After reboot it was just ignored by the kernel. The kernel seems to only be trying to load from -26 to -22?

Let’s see what happens if we rename the -13 firmware to -26 to trick the kernel into trying to load it:

[  127.719341] iwlwifi 0000:02:00.0: firmware: direct-loading firmware iwlwifi-7265D-26.ucode
[  127.719361] iwlwifi 0000:02:00.0: Driver unable to support your firmware API. Driver supports v26, firmware is v13.

Okay, let’s reset back to normal and re-install firmware-iwlwifi from apt:

sudo apt install firmware-iwlwifi

Now let’s try and get -21 to be loaded instead of -22 by renaming it to -26 so that the kernel tries to load it first:

sudo mv /lib/firmware/iwlwifi-7265D-21.ucode /lib/firmware/iwlwifi-7265D-26.ucode

And rather than rebooting again, we can use modprobe to trigger the loading:

$ sudo modprobe -r iwlwifi
sam@cpe1704tks:~$ sudo modprobe iwlwifi
sam@cpe1704tks:~$ sudo dmesg | grep iwlwifi
...snip...
[  462.138715] iwlwifi 0000:02:00.0: firmware: direct-loading firmware iwlwifi-7265D-22.ucode
[  462.139142] iwlwifi 0000:02:00.0: loaded firmware version 22.361476.0 op_mode iwlmvm
[  462.174085] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
[  462.176442] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.176994] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.259519] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[  462.291123] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.291582] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.357429] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.357881] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.390375] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.390925] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.457893] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[  462.458443] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled

That did not work. It failed on the -21 discused as -26 and continued on down to successfully load -22.


I give up.

Let’s take a different approach and instead buy a FSF-certified USB wifi adapter.


All articles in this series:

<< Previous: Holiday to Italy visiting Pompeii, Herculaneum, Vesuvius and the Amalfi Coast
Next: That weird feeling... >>