# [SOLVED] iwlfifi takes three minutes to detect WiFi card

## SwordArMor

Hi,

Since the last update of eudev, I have to wait three minutes at each boot to get my wlan working

I have this in the dmesg:

```
[   60.761223] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-5000-5.ucode' failed.

[   60.761244] iwlwifi 0000:03:00.0: request for firmware file 'iwlwifi-5000-5.ucode' failed.

[   60.761996] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-5000-4.ucode failed with error -2

[   60.762036] iwlwifi 0000:02:00.0: Falling back to user helper

[  120.762213] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-5000-4.ucode' failed.

[  120.762235] iwlwifi 0000:03:00.0: request for firmware file 'iwlwifi-5000-4.ucode' failed.

[  120.762702] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-5000-3.ucode failed with error -2

[  120.762709] iwlwifi 0000:02:00.0: Falling back to user helper

[  180.762154] iwlwifi 0000:02:00.0: request for firmware file 'iwlwifi-5000-3.ucode' failed.

[  180.762166] iwlwifi 0000:03:00.0: request for firmware file 'iwlwifi-5000-3.ucode' failed.

[  180.769941] iwlwifi 0000:02:00.0: Firmware has old API version, expected v5, got v2.

[  180.769944] iwlwifi 0000:02:00.0: New firmware can be obtained from http://www.intellinuxwireless.org/.

[  180.770116] iwlwifi 0000:02:00.0: loaded firmware version 8.24.2.12 op_mode iwldvm

[  180.770136] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled

[  180.770139] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS disabled

[  180.770141] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled

[  180.770143] iwlwifi 0000:02:00.0: Detected Intel(R) WiFi Link 5100 AGN, REV=0x54

[  180.770161] iwlwifi 0000:03:00.0: Firmware has old API version, expected v5, got v2.

[  180.770164] iwlwifi 0000:03:00.0: New firmware can be obtained from http://www.intellinuxwireless.org/.

[  180.770474] iwlwifi 0000:02:00.0: L1 Disabled - LTR Disabled

[  180.789895] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.

[  180.790633] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'

[  180.791081] iwlwifi 0000:03:00.0: loaded firmware version 8.24.2.12 op_mode iwldvm

[  180.791100] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled

[  180.791103] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS disabled

[  180.791105] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled

[  180.791107] iwlwifi 0000:03:00.0: Detected Intel(R) Ultimate N WiFi Link 5300 AGN, REV=0x24

[  180.791159] iwlwifi 0000:03:00.0: L1 Disabled - LTR Disabled

[  180.810996] ieee80211 phy1: Selected rate control algorithm 'iwl-agn-rs'

[  181.761368] iwlwifi 0000:03:00.0: L1 Disabled - LTR Disabled

[  181.761767] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0

[  181.897907] iwlwifi 0000:03:00.0: L1 Disabled - LTR Disabled

[  181.898323] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0

[  181.925703] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready

[  185.166937] wlan1: authenticate with f4:ca:e5:a1:dd:00

[  185.170844] wlan1: send auth to f4:ca:e5:a1:dd:00 (try 1/3)

[  185.173636] wlan1: authenticated

[  185.174068] wlan1: associate with f4:ca:e5:a1:dd:00 (try 1/3)

[  185.177609] wlan1: RX AssocResp from f4:ca:e5:a1:dd:00 (capab=0x411 status=0 aid=1)

[  185.183021] wlan1: associated

[  185.183128] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready

```

I think that I have the correct firmwares:

```
alarig@pikachu ~ $ find /lib64/firmware/ -name iwlwifi-5000-* 2>/dev/null 

/lib64/firmware/iwlwifi-5000-5.ucode

/lib64/firmware/iwlwifi-5000-1.ucode

/lib64/firmware/iwlwifi-5000-2.ucode

```

And this is my kernel config about firmware:

```
alarig@pikachu ~ $ grep -i firmware /usr/src/linux/.config

CONFIG_PREVENT_FIRMWARE_BUILD=y

# CONFIG_FIRMWARE_IN_KERNEL is not set

CONFIG_EXTRA_FIRMWARE=""

# Altera FPGA firmware download module

# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set

# CONFIG_FIRMWARE_EDID is not set

# Firmware Drivers

CONFIG_FIRMWARE_MEMMAP=y

# CONFIG_GOOGLE_FIRMWARE is not set

# CONFIG_TEST_FIRMWARE is not set

```

I don’t know what is wrong in my configuration.

ThanksLast edited by SwordArMor on Fri Jul 17, 2015 7:48 am; edited 1 time in total

----------

## charles17

 *SwordArMor wrote:*   

> I think that I have the correct firmwares:

 

You might want to cross-check with https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi#firmware

Are you having the DVM and MVM enabled?

----------

## mir3x

check probably this ? https://forums.gentoo.org/viewtopic-t-1001638.html

----------

## SwordArMor

My driver was set as built-in in the kernel, I changed to a module and it solved my problem.

Thanks for your help  :Smile: 

----------

## Havin_it

I stumbled on this and just wanted to add a bit about the "three minutes" aspect, for others who may find this (it's probably mentioned in one of the linked threads, but seems worth mentioning here).

The long delays are caused by the kernel config CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y. This should *not*  be enabled, because the iwlwifi driver tries to load higher-revision firmware (that's not yet in linux-firmware) and if it fails, falls back to the user helper. The problem then is that you probably don't *have* a user helper (udev doesn't any more), so there is a 60-second timeout before the kernel gives up and starts looking for the next blob.

When you disable this config, the driver just loops through the list of firmware revisions by itself, no delays, until it finds a usable one.

Hope this helps someone as it was driving me batty.

----------

## philip

I have the "3 minute" problem with wifi connection as well. I tried to disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK in the kernel as the primary mitigation. But it rendered me no wifi at all. 

Kernel:

```
# uname -a

Linux phils_x1 4.0.5-gentoo #7 SMP Sat Feb 27 16:34:38 CET 2016 x86_64 Intel(R) Core(TM) i7-4550U CPU @ 1.50GHz GenuineIntel GNU/Linux
```

```
tail -n 200 /var/log/messages

[    0.698268] Intel(R) Wireless WiFi driver for Linux

[    0.698269] Copyright(c) 2003- 2014 Intel Corporation

[    0.699610] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-7260-12.ucode failed with error -2

[    0.699622] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-7260-11.ucode failed with error -2

[    0.699631] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-7260-10.ucode failed with error -2

[    0.699632] iwlwifi 0000:03:00.0: request for firmware file 'iwlwifi-7260-10.ucode' failed.

[    0.699641] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-7260-9.ucode failed with error -2

[    0.699643] iwlwifi 0000:03:00.0: request for firmware file 'iwlwifi-7260-9.ucode' failed.

[    0.699644] iwlwifi 0000:03:00.0: no suitable firmware found!
```

So it seems like the iwlwifi module tries to load the firmware, but fails to do so. When I check my firmware directories I see:

```
# ls -al /lib64/firmware/

total 3620

drwxr-xr-x  5 root root    4096 Feb 27 13:48 .

drwxr-xr-x 13 root root    4096 Feb 17 21:25 ..

-rw-r--r--  1 root root   97652 Aug  8  2015 digiface_firmware.bin

-rw-r--r--  1 root root   97652 Aug  8  2015 digiface_firmware_rev11.bin

drwxr-xr-x  2 root root    4096 Aug  8  2015 ess

drwxr-xr-x  2 root root    4096 May  1  2014 intel

-rw-r--r--  1 root root  672372 Feb 27 12:22 iwlwifi-7260-10.ucode

-rw-r--r--  1 root root  782300 Feb 27 13:48 iwlwifi-7260-12.ucode

-rw-r--r--  1 root root 1049284 Feb 27 13:37 iwlwifi-7260-15.ucode

-rw-r--r--  1 root root  683236 Jun 21  2014 iwlwifi-7260-7.ucode

-rw-r--r--  1 root root   97652 Aug  8  2015 multiface_firmware.bin

-rw-r--r--  1 root root   97652 Aug  8  2015 multiface_firmware_rev11.bin

-rw-r--r--  1 root root   97652 Aug  8  2015 rpm_firmware.bin

drwxr-xr-x  2 root root    4096 Aug  8  2015 yamaha
```

This is strange. The firmware seem to be there.

When I re-enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y in the kernel I get a wifi connection, but still with the "3-minute wait"

```
# dmesg | grep iwlwifi

[    0.701955] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-7260-12.ucode failed with error -2

[    0.701957] iwlwifi 0000:03:00.0: Falling back to user helper

[   60.735086] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-7260-11.ucode failed with error -2

[   60.735091] iwlwifi 0000:03:00.0: Falling back to user helper

[  120.772992] iwlwifi 0000:03:00.0: loaded firmware version 23.11.10.0 op_mode iwlmvm

[  120.773018] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144

[  120.773383] iwlwifi 0000:03:00.0: L1 Enabled - LTR Enabled

[  120.773899] iwlwifi 0000:03:00.0: L1 Enabled - LTR Enabled

[  120.975665] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0

[  120.990425] iwlwifi 0000:03:00.0: L1 Enabled - LTR Enabled

[  120.990937] iwlwifi 0000:03:00.0: L1 Enabled - LTR Enabled
```

Disabling CONFIG_FW_LOADER_USER_HELPER_FALLBACK in the kernel, as the only mitigatin, does not seem to work. Or have I forgotten something?

----------

## philip

OK, I tried other method: To build CONFIG_IWLWIFI=m

I can confirm that this solves the "3 minute problem"

----------

