The problem
A few months ago, I started having intermittent wifi connection problems. It happened around the same time I upgraded the Ubuntu installation to 17.10, so I immediately suspected that something was updated to a version that didn’t work for my wifi hardware.
Quite some serious Googling later – it’s incredible how many people have problems with their wireless connections on Linux – I came across a viable solution. Pretty silly in its simplicity, but it works…
First off, as the title says, I have an Intel Dual Band Wireless-AC 8260 card in my laptop. This can be verified by:
$ lspci -nnk | grep 0280 -A2 70:00.0 Network controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a) Subsystem: Intel Corporation Dual Band Wireless-AC 8260 [8086:0010] Kernel driver in use: iwlwifi
The cause
I assumed the problem was caused by the version of the driver, iwlwifi
, as this was suggested in a number of the pages I found. Other options included problems with the 820.11N-layer, which can be disabled, but that was not necessary in my case.
To see what version is loaded:
$ dmesg | grep iwlwifi [ 8.598701] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2 [ 8.599260] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2 [ 8.614217] iwlwifi 0000:70:00.0: loaded firmware version 31.560484.0 op_mode iwlmvm [ 8.659485] iwlwifi 0000:70:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208 [ 8.736615] iwlwifi 0000:70:00.0: base HW address: a4:34:d9:7f:95:c2 [ 8.811521] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs' [ 8.813223] iwlwifi 0000:70:00.0 wlp112s0: renamed from wlan0
So we see that several versions are tried (33 and 32) before version 31 is actually loaded.
We can see how this is appropriate for my setup by looking at the corresponding module info (which indicates the highest version to be attempted; after each failure it decreases the number by one and attempts again):
$ sudo modinfo iwlwifi | grep iwlwifi-8000C firmware: iwlwifi-8000C-33.ucode
And taking into account the available drivers on the system:
$ ll /lib/firmware/iwlwifi-8000C* -rw-r--r-- 1 root root 1745176 mrt 30 2017 /lib/firmware/iwlwifi-8000C-13.ucode -rw-r--r-- 1 root root 2351636 mrt 30 2017 /lib/firmware/iwlwifi-8000C-16.ucode -rw-r--r-- 1 root root 2394060 nov 17 17:40 /lib/firmware/iwlwifi-8000C-21.ucode -rw-r--r-- 1 root root 2227284 dec 5 21:31 /lib/firmware/iwlwifi-8000C-27.ucode -rw-r--r-- 1 root root 2310116 dec 6 15:43 /lib/firmware/iwlwifi-8000C-31.ucode
The premise is that this version 31 was packaged with Ubuntu 17.10 (Artful) and not yet in 17.04 (Zesty), which can be verified by looking at the difference between these two pages:
- https://packages.ubuntu.com/search?suite=zesty&arch=i386&mode=filename&searchon=contents&keywords=iwlwifi
- https://packages.ubuntu.com/search?suite=artful&arch=i386&mode=filename&searchon=contents&keywords=iwlwifi
Indeed, in Artful versions 27 and 31 were added (not all consecutive version numbers are applicable to all card types, as can be seen in the table on this page: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release).
The solution
As said above, the solution to my problem proved very simple: downgrade the driver to a version that is available and works. To accomplish that, just rename the driver file in /lib/firmware
to something else, so that it isn’t loaded anymore at startup (e.g. give it a .unwanted
suffix).
After rebooting*, that looks something like this:
$ dmesg | grep iwl [ 8.931942] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2 [ 8.932340] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2 [ 8.934736] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-31.ucode failed with error -2 [ 8.935383] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-30.ucode failed with error -2 [ 8.935830] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-29.ucode failed with error -2 [ 8.935842] iwlwifi 0000:70:00.0: Direct firmware load for iwlwifi-8000C-28.ucode failed with error -2 [ 8.940888] iwlwifi 0000:70:00.0: loaded firmware version 27.541033.0 op_mode iwlmvm [ 8.959754] iwlwifi 0000:70:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208 [ 9.036883] iwlwifi 0000:70:00.0: base HW address: a4:34:d9:7f:95:c2 [ 9.112879] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs' [ 9.114525] iwlwifi 0000:70:00.0 wlp112s0: renamed from wlan0
As you can see, version 31 is no longer loaded, and the next highest available version 27 is loaded instead.
For me, that did the trick. If it hadn’t, I could have tried another step down, to version 21, which has worked fine for me under Zesty.
*: Instead of rebooting, sudo modprobe -r iwlwifi && sudo modprobe iwlwifi
will re-initialize the driver as well.