# iwlwifi module can't load firmware

## Amir

I have AC9461 wifi adapter on my pc. 

dmesg|grep iwlwifi output:

```
[    0.396416] iwlwifi 0000:00:0c.0: enabling device (0000 -> 0002)

[    0.397918] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-46.ucode failed with error -2

[    0.397935] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-45.ucode failed with error -2

[    0.397946] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-44.ucode failed with error -2

[    0.397956] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-43.ucode failed with error -2

[    0.397966] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-42.ucode failed with error -2

[    0.397977] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-41.ucode failed with error -2

[    0.397989] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-40.ucode failed with error -2

[    0.397999] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-39.ucode failed with error -2

[    0.398009] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-38.ucode failed with error -2

[    0.398020] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-37.ucode failed with error -2

[    0.398030] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-36.ucode failed with error -2

[    0.398040] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-35.ucode failed with error -2

[    0.398052] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-34.ucode failed with error -2

[    0.398063] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-33.ucode failed with error -2

[    0.398073] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-32.ucode failed with error -2

[    0.398084] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-31.ucode failed with error -2

[    0.398094] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-30.ucode failed with error -2

[    0.398098] iwlwifi 0000:00:0c.0: no suitable firmware found!

[    0.398102] iwlwifi 0000:00:0c.0: minimum version required: iwlwifi-9000-pu-b0-jf-b0-30

[    0.398105] iwlwifi 0000:00:0c.0: maximum version supported: iwlwifi-9000-pu-b0-jf-b0-46

[    0.398108] iwlwifi 0000:00:0c.0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
```

ls /lib/firmware|grep iwlwifi-9000 output:

```
iwlwifi-9000-pu-b0-jf-b0-33.ucode

iwlwifi-9000-pu-b0-jf-b0-34.ucode

iwlwifi-9000-pu-b0-jf-b0-38.ucode

iwlwifi-9000-pu-b0-jf-b0-41.ucode

iwlwifi-9000-pu-b0-jf-b0-43.ucode

iwlwifi-9000-pu-b0-jf-b0-46.ucode
```

modinfo iwlwifi output:

```
name:           iwlwifi

filename:       (builtin)

license:        GPL

file:           drivers/net/wireless/intel/iwlwifi/iwlwifi

author:         Intel Corporation <linuxwifi@intel.com>

description:    Intel(R) Wireless WiFi driver for Linux

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-6.ucode

firmware:       iwlwifi-7265D-29.ucode

firmware:       iwlwifi-7265-17.ucode

firmware:       iwlwifi-3168-29.ucode

firmware:       iwlwifi-3160-17.ucode

firmware:       iwlwifi-7260-17.ucode

firmware:       iwlwifi-8265-36.ucode

firmware:       iwlwifi-8000C-36.ucode

firmware:       iwlwifi-9260-th-b0-jf-b0-46.ucode

firmware:       iwlwifi-9000-pu-b0-jf-b0-46.ucode

firmware:       iwlwifi-SoSnj-a0-mr-a0-59.ucode

firmware:       iwlwifi-ma-a0-mr-a0-59.ucode

firmware:       iwlwifi-ma-a0-gf-a0-59.ucode

firmware:       iwlwifi-SoSnj-a0-hr-b0-59.ucode

firmware:       iwlwifi-SoSnj-a0-gf-a0-59.ucode

firmware:       iwlwifi-SoSnj-a0-gf4-a0-59.ucode

firmware:       iwlwifi-ty-a0-gf-a0-59.ucode

firmware:       iwlwifi-so-a0-gf-a0-59.ucode

firmware:       iwlwifi-so-a0-hr-b0-59.ucode

firmware:       iwlwifi-so-a0-jf-b0-59.ucode

firmware:       iwlwifi-cc-a0-59.ucode

firmware:       iwlwifi-QuQnj-b0-jf-b0-59.ucode

firmware:       iwlwifi-QuZ-a0-jf-b0-59.ucode

firmware:       iwlwifi-QuZ-a0-hr-b0-59.ucode

firmware:       iwlwifi-Qu-b0-jf-b0-59.ucode

firmware:       iwlwifi-Qu-c0-hr-b0-59.ucode

firmware:       iwlwifi-QuQnj-b0-hr-b0-59.ucode

firmware:       iwlwifi-Qu-b0-hr-b0-59.ucode

parm:           swcrypto:using crypto in software (default 0 [hardware]) (int)

parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)

parm:           amsdu_size:amsdu size 0: 12K for multi Rx queue devices, 2K for AX210 devices, 4K for other devices 1:4K 2:8K 3:12K 4: 2K (default 0) (int)

parm:           fw_restart:restart firmware in case of error (default true) (bool)

parm:           nvm_file:NVM file name (charp)

parm:           uapsd_disable:disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3) (uint)

parm:           enable_ini:Enable debug INI TLV FW debug infrastructure (default: true (bool)

parm:           bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)

parm:           led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)

parm:           power_save:enable WiFi power management (default: disable) (bool)

parm:           power_level:default power save level (range from 1 - 5, default: 1) (int)

parm:           disable_11ac:Disable VHT capabilities (default: false) (bool)

parm:           remove_when_gone:Remove dev from PCIe bus if it is deemed inaccessible (default: false) (bool)

parm:           disable_11ax:Disable HE capabilities (default: false) (bool)
```

----------

## Zucca

Can you manually load the module running 

```
modprobe iwlwifi
```

 as root?

----------

## Amir

mod probe iwlwifi doesn’t output nothing, but ifconfig still doesn’t see my adapterLast edited by Amir on Sun Apr 11, 2021 5:13 pm; edited 1 time in total

----------

## Amir

modprobe-v iwlwifi also doesn’t return anything

----------

## Zucca

You need to run 

```
ifconfig -a
```

 to see also those interfaces which are "down" (roughly "not in use currently").

Is iwlwifi already loaded? Try with

```
lsmod | fgrep iwlwifi
```

----------

## Amir

 *Zucca wrote:*   

> You need to run 
> 
> ```
> ifconfig -a
> ```
> ...

 

lsmod|fgrep iwlwifi returns emty output and lsmod returns only two strings. ifconfig -a returns only 2 devices lo and sit0. But my device is wlo1

----------

## NeddySeagoon

Amir,

```
[    0.396416] iwlwifi 0000:00:0c.0: enabling device (0000 -> 0002) 
```

from the timestamp on that line of dmesg, you have  iwlwifi  built into the kernel.

Firmware is required when the driver is initialised, so that needs to be built into the kernel too.

----------

## Amir

 *NeddySeagoon wrote:*   

> Amir,
> 
> ```
> [    0.396416] iwlwifi 0000:00:0c.0: enabling device (0000 -> 0002) 
> ```
> ...

 

So what must I do? I must to set adapter as module or what?

----------

## Hu

As Neddy wrote, if you build in the driver, you must build in the firmware.  So your choices are that you can embed the firmware in the kernel, or you can switch to build the driver as a module.

----------

## Amir

 *Hu wrote:*   

> As Neddy wrote, if you build in the driver, you must build in the firmware.  So your choices are that you can embed the firmware in the kernel, or you can switch to build the driver as a module.

 

In kernel config already had set CONFIG_EXTRA_FIRMWARE=iwlwifi-9000-pu-b0-jf-b0-34.ucode

CONFIG_EXTRA_FIRMWARE_DIR=/lib/firmware

----------

## Marlo

I speculate Amir has a dual boot with windows?

Windows does not turn off itself and keeps the wifi driver, and linux can not start its own driver.

Turn off the fast start function in windows.

https://support.lenovo.com/gt/en/solutions/ht501793

----------

## Amir

 *Marlo wrote:*   

> I speculate Amir has a dual boot with windows?
> 
> Windows does not turn off itself and keeps the wifi driver, and linux can not start its own driver.
> 
> Turn off the fast start function in windows.
> ...

 

No. In my pc installed only Debian and this gentoo

----------

## Marlo

Ok, wrong speculation.   :Very Happy: 

But you can install gentoo-kernel-bin for testing. If it works you can improve your .config.

Ma

----------

## Hu

That seems reasonable.  What is the output of zgrep FIRM /proc/config.gz after this error appears?

----------

## Buffoon

 *Amir wrote:*   

>  *Hu wrote:*   As Neddy wrote, if you build in the driver, you must build in the firmware.  So your choices are that you can embed the firmware in the kernel, or you can switch to build the driver as a module. 
> 
> In kernel config already had set CONFIG_EXTRA_FIRMWARE=iwlwifi-9000-pu-b0-jf-b0-34.ucode
> 
> CONFIG_EXTRA_FIRMWARE_DIR=/lib/firmware

 

Having it in your kernel is not enough, you need also install this kernel properly so it will be booted next time.

----------

## NeddySeagoon

Amir,

We have a contradiction.  You say    *Quote:*   

> In kernel config already had set CONFIG_EXTRA_FIRMWARE=iwlwifi-9000-pu-b0-jf-b0-34.ucode
> 
> CONFIG_EXTRA_FIRMWARE_DIR=/lib/firmware

 

dmesg says 

```
[    0.398052] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-34.ucode failed with error -2 
```

They cannot both be true at the same time unless ...

a) system time took a step back and make got confused.

b) you are not running the kernel you think you are.

Look at the date/time in 

```
uname -a
```

I get  

```
$ uname -a

Linux NeddySeagoon_Static 5.11.2-gentoo #2 SMP PREEMPT Fri Mar 5 10:13:14 GMT 2021 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux
```

The Fri Mar 5 10:13:14 GMT 2021 is the time and date my running kernel was made.

Look at your own and ask yourself if you have made a newer kernel since that time.

If you have, we need to find out why its not in use.

-- edit--

Buffoon beat me to it.

----------

## Amir

Thanks to all. I reconfigured kernel with cfg80211 as module and FW_LOADER_USER_HELPER_FALLBACK=y and now drive loads correctly, but after connecting to WiFi with wpa_supplicant ping google.com returns error. I think, this topic is solved, but I don’t know, how to close it

----------

## NeddySeagoon

Amir,

```
FW_LOADER_USER_HELPER_FALLBACK=y
```

does nothing now.

udev used to load firmware but the functionality was removed.

----------

## Zucca

 *Amir wrote:*   

> I think, this topic is solved, but I don’t know, how to close it

 Edit your first post and append [SOLVED] on the Subject -field.

Oh. And welcome to Gentoo.  :Wink: 

----------

