# wireless interface does not show up on ip link

## Matkin

Hello,

I can't get my wireless card to work. # lspci says

```
 0c:00.0 Network controller: Intel Corporation WiFi Link 5100
```

But 

```
$ ip link
```

 and 

```
# ip link
```

 show

```
 

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000

    link/ether 00:24:e8:b8:ee:6c brd ff:ff:ff:ff:ff:ff

```

... so no wifi interface. Same with 

```
# ifconfig -a
```

:

```

enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.3  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::224:e8ff:feb8:ee6c  prefixlen 64  scopeid 0x20<link>

        ether 00:24:e8:b8:ee:6c  txqueuelen 1000  (Ethernet)

        RX packets 3205  bytes 1943383 (1.8 MiB)

        RX errors 0  dropped 4  overruns 0  frame 0

        TX packets 3252  bytes 378000 (369.1 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 22  memory 0xf6ae0000-f6b00000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 127  bytes 13781 (13.4 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 127  bytes 13781 (13.4 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

The corresponding driver to my card is iwlwifi as far as I know. I installed the linux-firmware package. On the Intel page for linux drivers (https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi) my device is not listed, but they say that you need those .ucode-files which are installed with the linux firmware. I found this weird Gentoo Wiki ripoff (http://gentoo-en.vfose.ru/wiki/Iwlwifi) and there was this article about iwlwifi which stated that my card needs the iwlwifi5000-ucode file, which is already installed in my /lib/firmware:

```

...

iwlwifi-5000-1.ucode

iwlwifi-5000-2.ucode

iwlwifi-5000-5.ucode

iwlwifi-5150-2.ucode

iwlwifi-6000-4.ucode

...

```

I followed this guide for kernel configuration: https://wiki.gentoo.org/wiki/Wifi, but there were a few options that didn't show up. In the section for network device drivers a lot of different drivers were build into the kernel per default and I was afraid to take some of them out. If a detailed kernel configuration is needed, I'm going to post that.

And dmesg does not show any iwlwifi errors and ps aux does not show any iwlwifi processes. 

My card definitely works, it worked with any other distribution I had before. So I really don't know what to do next...

----------

## Logicien

If you compile the wireless card support in the kernel image, the firmware files must be in the kernel image too. In the same way, if you compile the wireless card support in module and put it in an initramfs, the firmware files must be in the initramfs too. You may not see error messages from the kernel after init start.

You may want to check if the wireless card is blocked with

```
rfkill list
```

and unblock it if it is the case.

----------

## charles17

 *Matkin wrote:*   

> I found this weird Gentoo Wiki ripoff (http://gentoo-en.vfose.ru/wiki/Iwlwifi) 

 

Please have a look at https://wiki.gentoo.org/wiki/Iwlwifi which should tell you everything you need to get your wifi working.

Then check modinfo iwlwifi to see if that device is supported. According to the kernel info the driver supports three flavours of WiFi Link 5100:

* WiFi Link 5100 BGN

* WiFi Link 5100 ABG

* WiFi Link 5100 AGN

----------

## Matkin

 *Logician wrote:*   

> You may want to check if the wireless card is blocked with
> 
> Code:	
> 
> rfkill list	
> ...

 

I tried that and it says 

```
Can't open RFKILL control device: No such file or directory.
```

I tried to add support in the kernel, but all options I can enable for rfkill are already enabled.

 *charles17 wrote:*   

> Please have a look at https://wiki.gentoo.org/wiki/Iwlwifi which should tell you everything you need to get your wifi working.

 

Hm, yeah, that is actually a good idea, somehow I didn't find this article with google.

I changed my kernel according to this, but I can't modprobe iwlwifi. 

```
# modprobe iwlwifi
```

```
modprobe: ERROR: could not insert 'iwlwifi': Unknown symbol in module, or unknown parameter (see dmesg)
```

dmesg says

```

iwlwifi: Unknown symbol ieee80211_channel_to_frequency (err 0)

iwlwifi: Unknown symbol ieee80211_hdrlen (err 0)

```

And in the kernel Networking Support -> Wireless -> Generic IEEE 802.11 Networking Stack (mac80211) is enabled and besides the rate control algorithm the Minstrel Options as in the iwlwifi article don't appear at all.

----------

## charles17

Sounds like you did not boot from the kernel of your latest kernel settings.  Did you follow the Kernel/Rebuild wiki article?

Maybe you forgot to mount /boot before make && make install modules_install? Forgetting this is quite common.

Or forgot to grub2-mkconfig -o /boot/grub/grub.cfg before reboot?

Will you please provide your output of lspci -nnkv after checking the above and after reboot?

And also grep -i iwl .config from within your /usr/src/<kernel version>  directory.

----------

## Matkin

 *charles17 wrote:*   

> Sounds like you did not boot from the kernel of your latest kernel settings. Did you follow the Kernel/Rebuild wiki article?
> 
> Maybe you forgot to mount /boot before make && make install modules_install? Forgetting this is quite common.
> 
> Or forgot to grub2-mkconfig -o /boot/grub/grub.cfg before reboot? 

 

I actually always compiled the kernel with just # make && make modules install and that solved problems. But I did it like in the article two times and neither the wifi interface appeared in $ ip link or $ ifconfig -a nor the iwlwifi modprobe error vanished.

lspci -nnkv:

```

0c:00.0 Network controller [0280]: Intel Corporation WiFi Link 5100 [8086:4232]

Subsystem: Intel Corporation WiFi Link 5100 AGN [8086:1321]

Flags: bus master, fast devsel, latency 0, IRQ 5

Memory at f69fe000 (64-bit, non-prefetchable) [size=8k]

Capabilities: [c8] Power Management version 3

Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64-bit+

Capabilities: [e0] Express Endpoint, MSI 00

Capabilities: [100] Advanced Error Reporting

Capabilities: [140] Device Serial Number 00-22-fb-ff-ff-2b-11-d0

Kernel modules: iwlwifi

```

grep - iwl .config:

```
CONFIG_IWLWIFI=m

CONFIG_IWLWIFI_LEDS=y

CONFIG_IWLDVM=m

CONFIG_IWLMVM=m

CONFIG_IWLWIFI_OPMODE_MODULAR=y

# CONFIG_IWLWIFI_BCAST_FILTERING is not set

# CONFIG_IWLWIFI_UAPSD is not set

# CONFIG_IWLWIFI_DEBUG is not set

# CONFIG_IWLWIFI_DEVICE_TRACING is not set

# CONFIG_IWL4965 is not set

# CONFIG_IWL3945 is not set

```

----------

## charles17

 *Matkin wrote:*   

> I actually always compiled the kernel with just # make && make modules install and that solved problems.

 

Did you mean # make && make install && make modules_install?  

make install is for copying the kernel to /boot whereas make modules_install is for copying the modules to /lib/modules.

Sometimes a make clean && before the make && helps fixing configuration problems.

And make targets install and modules_install can be concatenated like  # make install modules_install

 *Matkin wrote:*   

> But I did it like in the article two times and neither the wifi interface appeared in $ ip link or $ ifconfig -a nor the iwlwifi modprobe error vanished.

 

Hmm, what are you getting with lsmod?  Are lsmod and modinfo working at all?

 *Matkin wrote:*   

> lspci -nnkv:
> 
> ```
> 
> Kernel modules: iwlwifi
> ...

 This seems ok, also the CONFIG_IWLWIFI=m and friends.  Sometimes a make clean && before the make helps fixing problems.

Could you please provide your output of dmesg | grep -i '0c:00.0\|iwl\|wlan\|80211'

----------

## Matkin

 *charles17 wrote:*   

> Did you mean # make && make install && make modules_install? 

 

Uhm... No. I never read that kernel rebuild article. This was what I remembered from the install gentoo handbook, but I'm too lazy too look it up right now. Maybe it was different in the handbook and I remember it wrong. I will follow the kernel/rebuild article from now on. Makes sense.

 *charles17 wrote:*   

> Sometimes a make clean && before the make && helps fixing configuration problems.

 

I recompiled the kernel two times like this:

 I mounted /boot

 # make clean && make && make install && make modules install    (in /usr/src/linux)

 # grub2-mkconfig -o /boot/grub/grub.cfg

 reboot

no change.

# lsmod works and prints out a lot of modules, as one would expect. # lsmod | grep iwlwifi  prints out nothing. # modinfo iwlwifi prints out the .ucode-firmware files and some additional information. It's quite a lot.

```
filename:       /lib/modules/4.1.12-gentoo/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko

license:        GPL

author:         Copyright(c) 2003- 2015 Intel Corporation <ilw@linux.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-5.ucode

firmware:       iwlwifi-6050-5.ucode

firmware:       iwlwifi-6000-4.ucode

firmware:       iwlwifi-7265D-12.ucode

firmware:       iwlwifi-7265-12.ucode

firmware:       iwlwifi-3160-IWL3160_UCODE_API_OK.ucode

firmware:       iwlwifi-7260-12.ucode

firmware:       iwlwifi-8000-12.ucode

// then a lot of alias things 

depends:        

intree:         Y

vermagic:       4.1.12-gentoo SMP mod_unload modversions 686 

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_8K:enable 8K amsdu size (default 0) (int)

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

parm:           antenna_coupling:specify antenna coupling in dB (default: 0 dB) (int)

parm:           nvm_file:NVM file name (charp)

parm:           d0i3_disable:disable d0i3 functionality (default: Y) (bool)

parm:           lar_disable:disable LAR functionality (default: N) (bool)

parm:           uapsd_disable:disable U-APSD functionality (default: Y) (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:           fw_monitor:firmware monitor - to debug FW (default: false - needs lots of memory) (bool)

```

 *charles17 wrote:*   

> Could you please provide your output of dmesg | grep -i '0c:00.0\|iwl\|wlan\|80211'

 

Is the same as $ dmesg | grep iwlwifi  that I postet earlier... :/

----------

## charles17

 *Matkin wrote:*   

> 
> 
>  # make clean && make && make install && make modules install    (in /usr/src/linux)
> 
> 

 

Instead of /usr/src/linux use the exact kernel version's directory like /usr/src/linux-4.1.15-gentoo-r1/ or make sure that /usr/src/linux is a symlink pointing there.

And instead of && make modules install (in /usr/src/linux) use && make modules_install (looks like you were missing the underscore between those two words?)

For long output of dmesg or modinfo you could use http://pastebin.com or wgetpaste.

----------

## Matkin

 *charles17 wrote:*   

> Instead of /usr/src/linux use the exact kernel version's directory like /usr/src/linux-4.1.15-gentoo-r1/ or make sure that /usr/src/linux is a symlink pointing there. 

 

It's a symlink.

 *charles17 wrote:*   

> And instead of && make modules install (in /usr/src/linux) use && make modules_install (looks like you were missing the underscore between those two words?) 

 

Yes, that was a typo, but I definitely didn't make that one while installing. Also, I repeated it with making sure that I type the underscore. 

 *charles7 wrote:*   

> For long output of dmesg or modinfo you could use http://pastebin.com or wgetpaste.

 

I already posted most of it but here's the full output: https://bpaste.net/show/9fa0bad41d67

I really think, this is not a kernel compiling issue. As I said, I already solved problems with just recompiling the kernel, so either I was just lucky, which is very unlikely, or actually something changed. I'd rather think, that there's still some firmware missing, but I don't know where to start looking. I have emerged linux-firmware though, so that's not it.

----------

## charles17

 *Matkin wrote:*   

> I really think, this is not a kernel compiling issue. As I said, I already solved problems with just recompiling the kernel, so either I was just lucky, which is very unlikely, or actually something changed. I'd rather think, that there's still some firmware missing, but I don't know where to start looking. I have emerged linux-firmware though, so that's not it.

 

Thanks for the info.

Could you again do a dmesg | grep -i '0c:00.0\|iwl\|wlan\|80211' and pastebin its output?

----------

## Matkin

 *charles17 wrote:*   

> Could you again do a dmesg | grep -i '0c:00.0\|iwl\|wlan\|80211' and pastebin its output?

 

https://bpaste.net/show/5f0844061140

----------

## charles17

Sorry.  Someone with specific experience on iwlwifi or even on the Intel Corporation WiFi Link 5100 AGN device might be able to help.

----------

## Matkin

Thanks a lot anyway. I'll post my solution if I find one.

----------

## charles17

 *Matkin wrote:*   

> dmesg says
> 
> ```
> 
> iwlwifi: Unknown symbol ieee80211_channel_to_frequency (err 0)
> ...

 

According to The Kernel Newbie Corner it looks like these symbols haven't been "exported".  You could grep the kernel sources for EXPORT_SYMBOL() with the symbols' names:

```
cd /usr/src/linux-4.1.15-gentoo-r1

$ grep -r 'EXPORT_SYMBOL(ieee80211_channel_to_frequency\|EXPORT_SYMBOL(ieee80211_hdrlen'

net/wireless/util.c:EXPORT_SYMBOL(ieee80211_channel_to_frequency);

net/wireless/util.c:EXPORT_SYMBOL(ieee80211_hdrlen);

```

So I guess It's net/wireless/util.c in your kernel where the problem is, not the iwlwifi driver.

For comparison, here is 

```
$ grep 80211 .config

CONFIG_CFG80211=y

# CONFIG_NL80211_TESTMODE is not set

# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set

# CONFIG_CFG80211_REG_DEBUG is not set

# CONFIG_CFG80211_CERTIFICATION_ONUS is not set

CONFIG_CFG80211_DEFAULT_PS=y

# CONFIG_CFG80211_DEBUGFS is not set

# CONFIG_CFG80211_INTERNAL_REGDB is not set

# CONFIG_CFG80211_WEXT is not set

# CONFIG_LIB80211 is not set

CONFIG_MAC80211=y

CONFIG_MAC80211_HAS_RC=y

CONFIG_MAC80211_RC_MINSTREL=y

CONFIG_MAC80211_RC_MINSTREL_HT=y

# CONFIG_MAC80211_RC_MINSTREL_VHT is not set

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_MESSAGE_TRACING is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_MAC80211_HWSIM is not set
```

----------

## Matkin

I need my laptop with wifi for work, so right now I "solved" the problem by installing Manjaro :/. But I definitely will come back to using Gentoo, so we will see whether the problem persists on a fresh install. I would've really liked to solve it. Sorry! And thanks again!

----------

