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

Perhaps a couple of months ago (unfortunately I’m not sure exactly when) I started experiencing the following wifi problem on my laptop: the wifi connection would die, and nothing except rebooting the machine would fix the problem. Sometimes it would happen after the laptop had been on for hours, and sometimes it would happen within a minute of booting, but it was inevitable that at some point the wifi would die.

I had been hoping this issue would go away in a future update, but it persisted and became ever more irritating, since each time it struck I had to close everything and reboot. So at last I began to dig into this issue with hopes to find a resolution.

Arch Linux

The first serious sign should have been when during shutdown, my Arch laptop would print a whole bunch of errors about something called iwlwifi.

However I began by checking dmesg after the issue struck, and saw the following:

[ 2163.830836] iwlwifi 0000:02:00.0: failed to update power mode
[ 2163.848317] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 2163.848335] iwlwifi 0000:02:00.0: Error sending TIME_QUOTA_CMD: enqueue_hcmd failed: -5
[ 2163.848340] iwlwifi 0000:02:00.0: Failed to send quota: -5
[ 2163.865744] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 2163.865758] iwlwifi 0000:02:00.0: Error sending BINDING_CONTEXT_CMD: enqueue_hcmd failed: -5
[ 2163.865763] iwlwifi 0000:02:00.0: Failed to send binding (action:3): -5
[ 2163.883155] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 2163.883169] iwlwifi 0000:02:00.0: Error sending MAC_PM_POWER_TABLE: enqueue_hcmd failed: -5
[ 2163.900568] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 2163.900582] iwlwifi 0000:02:00.0: Error sending MAC_CONTEXT_CMD: enqueue_hcmd failed: -5
[ 2163.900586] iwlwifi 0000:02:00.0: Failed to send MAC context (action:2): -5
[ 2163.900590] iwlwifi 0000:02:00.0: failed to update MAC 60:57:18:79:04:28
[ 2163.918235] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 2163.918253] iwlwifi 0000:02:00.0: Error sending TXPATH_FLUSH: enqueue_hcmd failed: -5
[ 2163.918256] iwlwifi 0000:02:00.0: Failed to send flush command (-5)
[ 2165.919125] iwlwifi 0000:02:00.0: fail to flush all tx fifo queues Q 0
[ 2165.919137] iwlwifi 0000:02:00.0: Current SW read_ptr 60 write_ptr 61
[ 2165.936621] iwl data: 00000000: 48 7c 56 41 da a4 ff ff 80 b6 a6 f5 05 7c 72 1f  H|VA.........|r.
[ 2165.954044] iwlwifi 0000:02:00.0: FH TRBs(0) = 0x5a5a5a5a
[ 2165.971462] iwlwifi 0000:02:00.0: FH TRBs(1) = 0x5a5a5a5a
[ 2165.988861] iwlwifi 0000:02:00.0: FH TRBs(2) = 0x5a5a5a5a
[ 2166.006261] iwlwifi 0000:02:00.0: FH TRBs(3) = 0x5a5a5a5a
[ 2166.023668] iwlwifi 0000:02:00.0: FH TRBs(4) = 0x5a5a5a5a
[ 2166.041083] iwlwifi 0000:02:00.0: FH TRBs(5) = 0x5a5a5a5a
[ 2166.058487] iwlwifi 0000:02:00.0: FH TRBs(6) = 0x5a5a5a5a
[ 2166.075909] iwlwifi 0000:02:00.0: FH TRBs(7) = 0x5a5a5a5a
[ 2166.110848] ------------[ cut here ]------------
[ 2166.110861] WARNING: CPU: 2 PID: 446 at /build/linux-2eXeHC/linux-4.9.110/drivers/net/wireless/intel/i
wlwifi/iwl-trans.h:1194 iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 2166.110867] Modules linked in: fuse ctr ccm rfcomm cmac bnep nls_ascii nls_cp437 vfat fat snd_hda_code
c_hdmi arc4 iTCO_wdt iTCO_vendor_support asus_nb_wmi iwlmvm asus_wmi sparse_keymap mac80211 snd_hda_codec
_conexant intel_rapl x86_pkg_temp_thermal snd_hda_codec_generic intel_powerclamp coretemp kvm_intel iwlwi
fi kvm i915 irqbypass crct10dif_pclmul crc32_pclmul snd_hda_intel btusb btrtl btbcm btintel drm_kms_helpe
r snd_hda_codec bluetooth snd_hda_core snd_hwdep snd_pcm snd_timer cfg80211 ghash_clmulni_intel intel_cst
ate mei_me intel_uncore intel_rapl_perf rfkill drm lpc_ich snd mfd_core soundcore i2c_algo_bit shpchp pcs
pkr mei efi_pstore processor_thermal_device int340x_thermal_zone serio_raw intel_soc_dts_iosf efivars uvc
video wmi sg videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core
[ 2166.110936]  intel_pch_thermal videodev media acpi_als battery video kfifo_buf industrialio int3400_th
ermal acpi_thermal_rel asus_wireless ac tpm_crb acpi_pad button evdev joydev parport_pc ppdev lp parport 
efivarfs ip_tables x_tables autofs4 ext4 crc16 jbd2 crc32c_generic fscrypto ecb mbcache sd_mod crc32c_int
el ahci libahci aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd libata xhci_pci psmous
e xhci_hcd i2c_i801 i2c_smbus scsi_mod usbcore usb_common fan thermal
[ 2166.110982] CPU: 2 PID: 446 Comm: NetworkManager Tainted: G        W       4.9.0-7-amd64 #1 Debian 4.9
.110-3+deb9u2
[ 2166.110983] Hardware name: ASUSTeK COMPUTER INC. UX305FA/UX305FA, BIOS UX305FA.206 12/16/2014
[ 2166.110985]  0000000000000000 ffffffff8df30694 0000000000000000 0000000000000000
[ 2166.110989]  ffffffff8dc78d6e 0000000000000000 00000000a5a5a5a5 0000000000a02e34
[ 2166.110993]  ffff93ba13340018 0000000000000002 ffff93ba13340018 ffffffffc0d5d41b
[ 2166.110997] Call Trace:
[ 2166.111003]  [<ffffffff8df30694>] ? dump_stack+0x5c/0x78
[ 2166.111007]  [<ffffffff8dc78d6e>] ? __warn+0xbe/0xe0
[ 2166.111014]  [<ffffffffc0d5d41b>] ? iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 2166.111020]  [<ffffffffc0d5d604>] ? iwl_trans_pcie_wait_txq_empty+0x154/0x190 [iwlwifi]
[ 2166.111028]  [<ffffffffc08463ff>] ? iwl_mvm_prepare_mac_removal+0x7f/0xd0 [iwlmvm]
[ 2166.111035]  [<ffffffffc0846487>] ? iwl_mvm_mac_remove_interface+0x37/0x120 [iwlmvm]
[ 2166.111054]  [<ffffffffc0bf4b25>] ? drv_remove_interface+0x45/0x110 [mac80211]
[ 2166.111072]  [<ffffffffc0c0957e>] ? ieee80211_do_stop+0x57e/0x860 [mac80211]
[ 2166.111077]  [<ffffffff8e138226>] ? dev_deactivate_many+0x1f6/0x230
[ 2166.111095]  [<ffffffffc0c09876>] ? ieee80211_stop+0x16/0x20 [mac80211]
[ 2166.111098]  [<ffffffff8e106507>] ? __dev_close_many+0x97/0x100
[ 2166.111100]  [<ffffffff8e1065f4>] ? dev_close_many+0x84/0x120
[ 2166.111104]  [<ffffffff8e1086de>] ? dev_close.part.82+0x3e/0x60
[ 2166.111106]  [<ffffffff8e108713>] ? dev_close+0x13/0x20
[ 2166.111127]  [<ffffffffc064fe63>] ? cfg80211_shutdown_all_interfaces+0x43/0xc0 [cfg80211]
[ 2166.111143]  [<ffffffffc064ff32>] ? cfg80211_rfkill_set_block+0x22/0x30 [cfg80211]
[ 2166.111148]  [<ffffffffc05b0c30>] ? rfkill_set_block+0x90/0x140 [rfkill]
[ 2166.111152]  [<ffffffffc05b0ec4>] ? rfkill_fop_write+0x114/0x1c0 [rfkill]
[ 2166.111155]  [<ffffffff8de078d0>] ? vfs_write+0xb0/0x190
[ 2166.111158]  [<ffffffff8de08d12>] ? SyS_write+0x52/0xc0
[ 2166.111162]  [<ffffffff8dc03b7d>] ? do_syscall_64+0x8d/0xf0
[ 2166.111165]  [<ffffffff8e214c4e>] ? entry_SYSCALL_64_after_swapgs+0x58/0xc6
[ 2166.111167] ---[ end trace c9af675566702543 ]---
[ 2166.146121] iwlwifi 0000:02:00.0: Q 0 is active and mapped to fifo 2 ra_tid 0xa5a5 [90,1515870810]

The WARNING section would then repeat very frequently and continuously, until shutdown.

For a while now I had been considering switching from Arch Linux to another OS for my laptop. I wanted an OS that was more stable, easier to maintain and came with more out-of-the-box. While I’ve learnt a lot from running Arch as my main OS at home for the past 3 years, I am now glad to switch instead to Debian.

This wifi problem was the catalyst for the change: I naively assumed that blasting away Arch and installing Debian would fix the issue.

Debian

I installed the netinst amd64 Debian from USB, and was soon greeted by this screen:

Photo of Debian installation screen prompting for non-free iwlwifi drivers being needed
iwlwifi, we meet again

It appears Debian also wants iwlwifi in order for my laptop to operate using its wifi chip.

Since iwlwifi is non-free, it is not included in the Debian distribution. There are instructions on how to place the drivers on a USB which can be loaded during the installation procedure, but I failed to get this to work. Instead I connected a USB-to-Ethernet adapter (since the laptop has no Ethernet port) and used wired internet during the installation (since internet is requried for installing packages). After Debian was installed, I then updated the sources.list to allow non-free software and installed the iwlwifi drivers.

All was good until an hour or so later when my wifi once again died.

I checked dmesg and saw the following familiar sight:

[ 1301.302401] WARNING: CPU: 0 PID: 0 at /build/linux-IWeKxA/linux-4.9.110/drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1194 iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 1301.302403] Modules linked in: fuse ctr ccm rfcomm bnep nls_ascii nls_cp437 vfat fat arc4 snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal uvcvideo intel_powerclamp coretemp iwlmvm videobuf2_vmalloc kvm_intel videobuf2_memops videobuf2_v4l2 iTCO_wdt mac80211 iTCO_vendor_support kvm videobuf2_core videodev asus_nb_wmi asus_wmi irqbypass media sparse_keymap snd_hda_codec_conexant snd_hda_codec_generic iwlwifi crct10dif_pclmul i915 crc32_pclmul snd_hda_intel ghash_clmulni_intel btusb btrtl snd_hda_codec btbcm intel_cstate snd_hda_core cfg80211 btintel intel_uncore snd_hwdep bluetooth intel_rapl_perf snd_pcm drm_kms_helper snd_timer snd soundcore rfkill evdev drm joydev pcspkr mei_me sg lpc_ich serio_raw i2c_algo_bit mei mfd_core efi_pstore shpchp processor_thermal_device int340x_thermal_zone efivars
[ 1301.302470]  intel_pch_thermal intel_soc_dts_iosf wmi video battery asus_wireless acpi_als int3400_thermal kfifo_buf ac industrialio acpi_thermal_rel tpm_crb acpi_pad button parport_pc ppdev lp parport efivarfs ip_tables x_tables autofs4 ext4 crc16 jbd2 crc32c_generic fscrypto ecb mbcache sd_mod crc32c_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd psmouse ahci libahci libata xhci_pci i2c_i801 i2c_smbus xhci_hcd scsi_mod usbcore usb_common fan thermal
[ 1301.302565]  [<ffffffffc0bb741b>] ? iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 1301.302572]  [<ffffffffc0baeb54>] ? iwl_pcie_txq_stuck_timer+0x74/0xa0 [iwlwifi]
[ 1301.302581]  [<ffffffffc0baeae0>] ? iwl_pcie_irq_msix_handler+0x350/0x350 [iwlwifi]
[ 1301.337418] iwlwifi 0000:02:00.0: Q 28 is active and mapped to fifo 2 ra_tid 0xa5a5 [90,1515870810]
[ 1301.372207] WARNING: CPU: 0 PID: 0 at /build/linux-IWeKxA/linux-4.9.110/drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1194 iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 1301.372210] Modules linked in: fuse ctr ccm rfcomm bnep nls_ascii nls_cp437 vfat fat arc4 snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal uvcvideo intel_powerclamp coretemp iwlmvm videobuf2_vmalloc kvm_intel videobuf2_memops videobuf2_v4l2 iTCO_wdt mac80211 iTCO_vendor_support kvm videobuf2_core videodev asus_nb_wmi asus_wmi irqbypass media sparse_keymap snd_hda_codec_conexant snd_hda_codec_generic iwlwifi crct10dif_pclmul i915 crc32_pclmul snd_hda_intel ghash_clmulni_intel btusb btrtl snd_hda_codec btbcm intel_cstate snd_hda_core cfg80211 btintel intel_uncore snd_hwdep bluetooth intel_rapl_perf snd_pcm drm_kms_helper snd_timer snd soundcore rfkill evdev drm joydev pcspkr mei_me sg lpc_ich serio_raw i2c_algo_bit mei mfd_core efi_pstore shpchp processor_thermal_device int340x_thermal_zone efivars
[ 1301.372279]  intel_pch_thermal intel_soc_dts_iosf wmi video battery asus_wireless acpi_als int3400_thermal kfifo_buf ac industrialio acpi_thermal_rel tpm_crb acpi_pad button parport_pc ppdev lp parport efivarfs ip_tables x_tables autofs4 ext4 crc16 jbd2 crc32c_generic fscrypto ecb mbcache sd_mod crc32c_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd psmouse ahci libahci libata xhci_pci i2c_i801 i2c_smbus xhci_hcd scsi_mod usbcore usb_common fan thermal
[ 1301.372375]  [<ffffffffc0bb741b>] ? iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 1301.372382]  [<ffffffffc0baeb54>] ? iwl_pcie_txq_stuck_timer+0x74/0xa0 [iwlwifi]
[ 1301.372389]  [<ffffffffc0baeae0>] ? iwl_pcie_irq_msix_handler+0x350/0x350 [iwlwifi]
[ 1301.407351] iwlwifi 0000:02:00.0: Q 29 is active and mapped to fifo 2 ra_tid 0xa5a5 [90,1515870810]
[ 1301.442761] WARNING: CPU: 0 PID: 0 at /build/linux-IWeKxA/linux-4.9.110/drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1194 iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 1301.442766] Modules linked in: fuse ctr ccm rfcomm bnep nls_ascii nls_cp437 vfat fat arc4 snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal uvcvideo intel_powerclamp coretemp iwlmvm videobuf2_vmalloc kvm_intel videobuf2_memops videobuf2_v4l2 iTCO_wdt mac80211 iTCO_vendor_support kvm videobuf2_core videodev asus_nb_wmi asus_wmi irqbypass media sparse_keymap snd_hda_codec_conexant snd_hda_codec_generic iwlwifi crct10dif_pclmul i915 crc32_pclmul snd_hda_intel ghash_clmulni_intel btusb btrtl snd_hda_codec btbcm intel_cstate snd_hda_core cfg80211 btintel intel_uncore snd_hwdep bluetooth intel_rapl_perf snd_pcm drm_kms_helper snd_timer snd soundcore rfkill evdev drm joydev pcspkr mei_me sg lpc_ich serio_raw i2c_algo_bit mei mfd_core efi_pstore shpchp processor_thermal_device int340x_thermal_zone efivars
[ 1301.442923]  intel_pch_thermal intel_soc_dts_iosf wmi video battery asus_wireless acpi_als int3400_thermal kfifo_buf ac industrialio acpi_thermal_rel tpm_crb acpi_pad button parport_pc ppdev lp parport efivarfs ip_tables x_tables autofs4 ext4 crc16 jbd2 crc32c_generic fscrypto ecb mbcache sd_mod crc32c_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd psmouse ahci libahci libata xhci_pci i2c_i801 i2c_smbus xhci_hcd scsi_mod usbcore usb_common fan thermal
[ 1301.443145]  [<ffffffffc0bb741b>] ? iwl_trans_pcie_log_scd_error+0x27b/0x310 [iwlwifi]
[ 1301.443163]  [<ffffffffc0baeb54>] ? iwl_pcie_txq_stuck_timer+0x74/0xa0 [iwlwifi]
[ 1301.443178]  [<ffffffffc0baeae0>] ? iwl_pcie_irq_msix_handler+0x350/0x350 [iwlwifi]
[ 1301.478260] iwlwifi 0000:02:00.0: Q 30 is active and mapped to fifo 2 ra_tid 0xa5a5 [90,1515870810]
[ 1302.163448] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1302.163482] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1302.163490] iwlwifi 0000:02:00.0: Scan failed! ret -5
[ 1303.182467] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1303.182506] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1303.182512] iwlwifi 0000:02:00.0: Scan failed! ret -5
[ 1304.201494] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1304.201534] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1304.201539] iwlwifi 0000:02:00.0: Scan failed! ret -5
[ 1305.219633] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1305.219667] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1305.219671] iwlwifi 0000:02:00.0: Scan failed! ret -5
[ 1306.238736] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1306.238808] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1306.238813] iwlwifi 0000:02:00.0: Scan failed! ret -5
[ 1307.257809] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1307.257832] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1307.257836] iwlwifi 0000:02:00.0: Scan failed! ret -5
[ 1308.276745] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[ 1308.276769] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 1308.276772] iwlwifi 0000:02:00.0: Scan failed! ret -5

Again this repeated on and on…

So if installing a new OS does not fix this issue, I must dig further.

Further details

First I identify what chipset is used for my wifi:

$ lspci -k | grep Network --after=3
02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
	Subsystem: Intel Corporation Dual Band Wireless-AC 7265
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

So I have an Intel 7265, and it is indeed using the iwlwifi kernel module.

Next I check which firmwares we have installed for this chipset:

$ ls -al /lib/firmware | grep 7265
-rw-r--r--  1 root root  880604 Jun  6  2017 iwlwifi-7265-12.ucode
-rw-r--r--  1 root root 1180224 Jun  6  2017 iwlwifi-7265-14.ucode
-rw-r--r--  1 root root 1180356 Jun  6  2017 iwlwifi-7265-16.ucode
-rw-r--r--  1 root root 1180412 Jun  6  2017 iwlwifi-7265-17.ucode
-rw-r--r--  1 root root  697828 Jun  6  2017 iwlwifi-7265-9.ucode
-rw-r--r--  1 root root 1002800 Jun  6  2017 iwlwifi-7265D-12.ucode
-rw-r--r--  1 root root 1384256 Jun  6  2017 iwlwifi-7265D-14.ucode
-rw-r--r--  1 root root 1384500 Jun  6  2017 iwlwifi-7265D-16.ucode
-rw-r--r--  1 root root 1383604 Jun  6  2017 iwlwifi-7265D-17.ucode
-rw-r--r--  1 root root 1385368 Jun  6  2017 iwlwifi-7265D-21.ucode
-rw-r--r--  1 root root 1028316 Jun  6  2017 iwlwifi-7265D-22.ucode

And check which firmwares the iwlwifi module is using:

$ sudo modinfo iwlwifi | grep firmware
firmware:       iwlwifi-100-5.ucode
firmware:       iwlwifi-1000-5.ucode
firmware:       iwlwifi-135-6.ucode
firmware:       iwlwifi-105-6.ucode
firmware:       iwlwifi-2030-6.ucode
firmware:       iwlwifi-2000-6.ucode
firmware:       iwlwifi-5150-2.ucode
firmware:       iwlwifi-5000-5.ucode
firmware:       iwlwifi-6000g2b-6.ucode
firmware:       iwlwifi-6000g2a-6.ucode
firmware:       iwlwifi-6050-5.ucode
firmware:       iwlwifi-6000-4.ucode
firmware:       iwlwifi-7265D-26.ucode
firmware:       iwlwifi-7265-17.ucode
firmware:       iwlwifi-3168-26.ucode
firmware:       iwlwifi-3160-17.ucode
firmware:       iwlwifi-7260-17.ucode
firmware:       iwlwifi-8265-26.ucode
firmware:       iwlwifi-8000C-26.ucode
firmware:       iwlwifi-9000-pu-a0-lc-a0--26.ucode
firmware:       iwlwifi-9260-th-a0-jf-a0--26.ucode
firmware:       iwlwifi-9000-pu-a0-jf-a0--26.ucode
firmware:       iwlwifi-Qu-a0-jf-b0--26.ucode
parm:           fw_restart:restart firmware in case of error (default true) (bool)
parm:           fw_monitor:firmware monitor - to debug FW (default: false - needs lots of memory) (bool)

I am not sure what the signifigance is of 7265 vs 7265D, nor how it is that iwlwifi claims to be using iwlwifi-7265D-26.ucode when I cannot see that in /lib/firmware. However this whole area is rather new to me so I am probably just ignorant.

However, if we look at dmesg it turns out we can see the firmware being loaded:

$ sudo dmesg | grep iwl
[    2.176068] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-26.ucode (-2)
[    2.176159] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-26.ucode failed with error -2
[    2.176186] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-25.ucode (-2)
[    2.176275] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-25.ucode failed with error -2
[    2.176296] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-24.ucode (-2)
[    2.176382] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-24.ucode failed with error -2
[    2.176404] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-23.ucode (-2)
[    2.176489] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-23.ucode failed with error -2
[    2.183806] iwlwifi 0000:02:00.0: firmware: direct-loading firmware iwlwifi-7265D-22.ucode
[    2.184327] iwlwifi 0000:02:00.0: loaded firmware version 22.361476.0 op_mode iwlmvm
[    2.223008] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
[    2.225580] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    2.226270] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    2.314434] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[    2.571968] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[    3.502948] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.503550] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.569578] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.570125] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.624016] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.624473] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.689479] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    3.689930] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled

So it looks like that answers one of my above questions! It tries to load iwlwifi-7265D-26 but cannot find it, so then tries 25 and fails again, continuing on down until it finds 22 which does exist in /lib/firmware.

This comment seems to confirm the above observation, however it also appears to show that 23 to 26 do not actually exist, while 27 and 29 do. The Ubuntu Wiki also provides more details on how firmware is loaded by the kernel.

Research

Others seem to have experienced similar problems.

Solution

Unfortunately I have been unable to resolve this issue so far. Possible steps forward are:

  • Try upgrading to more recent firmware. Perhaps iwlwifi-7265D-29 (the latest at time of writing) will fix this issue? Perhap also check on the bug tracker whether any issues fitting my description have been fixed recently. However this will probably require polluting my stable Debian system with with testing or unstable qualified distributions…
  • Try downgrading to an older firmware. I am currently using iwlwifi-7265D-22, but at some previous point the issue did not occur, so perhaps 21 or earlier would work?
  • Try some of the configuration based solutions others have had some luck with, such as disabling power management for the wifi. However there are many possible knobs to twiddle, and it is hard to quickly validate this potenial fixes since the issue can take up to a few hours to occur. I could just get really (un)lucky and not see the issue for ages, and think it has been fixed!?

All articles in this series:

<< Previous: Update
Next: Debian center window keyboard shortcut >>