# [Solved] Thinkpad T520 Wireless Issues

## canada-water

Hey community. I just finished installling Gentoo yesterday morning and have been struggling to get the WiFi to work on my Thinkpad since then. I currently only have it working through the LAN cable, but I need the WiFi functionality. I've looked at the forums here and the Gentoo Wiki, but can't find anything on it there. Any help will be much appreciated.

ip link:

```

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

    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 f0:de:f1:d1:85:94 brd ff:ff:ff:ff:ff:ff

3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000

    link/sit 0.0.0.0 brd 0.0.0.0

```

dmesg | grep -i -E '03:00.0|wlp|iwl|80211':

```

[    0.848501] pci 0000:03:00.0: [8086:0085] type 00 class 0x028000

[    0.849130] pci 0000:03:00.0: reg 0x10: [mem 0xf2400000-0xf2401fff 64bit]

[    0.851016] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold

[    1.684173] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    1.686761] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    2.898472] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    2.906938] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   14.867565] cfg80211: Loading compiled-in X.509 certificates for regulatory database

[   14.871794] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

```

iwd also won't find any network devices. Station doens't find any devices or anything, while it's worked perfectly on Arch. Something I couldn't get installed was the linux-firmware package. I'll post the output of the errors below if you can help with that here too, even though I know this isn't the right place for that.

```

!!! All ebuilds that could satisfy "sys-kernel/linux-firmware" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-kernel/linux-firmware-99999999::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s), missing keyword)

A copy of the 'linux-fw-redistributable' license is located at '/var/db/repos/gentoo/licenses/linux-fw-redistributable'.

A copy of the 'no-source-code' license is located at '/var/db/repos/gentoo/licenses/no-source-code'.

- sys-kernel/linux-firmware-20210315::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20210208::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20201218::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20201022-r3::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200918::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200817::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200721::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200619::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200519::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200421::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

- sys-kernel/linux-firmware-20200316::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

For more information, see the MASKED PACKAGES section in the emerge

man page or refer to the Gentoo Handbook.

```

Last edited by canada-water on Fri Apr 02, 2021 12:01 pm; edited 1 time in total

----------

## halcon

Hi canada-water,

Welcome to Gentoo.

Did you see that topic? Maybe some information from it will be helpful for you.

Regarding linux-firmware: do you have sys-kernel/linux-firmware ** in you /etc/portage/package.accept_keywords ?

----------

## sdauth

As root :

```
echo "sys-kernel/linux-firmware linux-fw-redistributable no-source-code" >> /etc/portage/package.license

dispatch-conf

emerge -an linux-firmware
```

And for kernel conf :

```
Networking support

-*- Wireless --->

   <*>   cfg80211 - wireless configuration API

   [*]     enable powersave by default

   [*]     support CRDA

   [*]     cfg80211 wireless extensions compatibility

   <*>   Generic IEEE 802.11 Networking Stack (mac80211)

   [*]   Minstrel

      Default rate control algorithm (Minstrel)  --->

<*>   RF switch subsystem support  --->

   [*]   RF switch input support

Device Drivers  --->

[*] Network device support  --->

   [*]   Wireless LAN  --->

      [*]   Intel devices

         <M>     Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
```

Also, I guess you also need  FW_LOADER=y

You can find that in Devices Drivers -> Generic Driver Options -> Firmware loader

I assume your are using the default Intel card here.

----------

## Hu

 *halcon wrote:*   

> Regarding linux-firmware: do you have sys-kernel/linux-firmware ** in you /etc/portage/package.accept_keywords ?

 The output tells us that he does not.  Generally, he should not.  Were you suggesting that he should?  His problem with the firmware is that he has not accepted the license restrictions on the firmware.

----------

## canada-water

 *halcon wrote:*   

> Hi canada-water,
> 
> Welcome to Gentoo.
> 
> Did you see that topic? Maybe some information from it will be helpful for you.
> ...

 

I attempted to follow the directions in that post, but nothing from it worked. I believe the user there was using a different driver.

 *sdauth wrote:*   

>  As root : 
> 
> Code:
> 
> echo "sys-kernel/linux-firmware linux-fw-redistributable no-source-code" >> /etc/portage/package.license 
> ...

 

Thanks, I managed to get the firmware package installed. Unfortunately, my kernel config didn't necessarily match up with what you had listed there, and I couldn't find those specific options for powersave, CRDA, etc. However, I'm going to use the method you listed for installing the firmware package to install the firmware for the wifi card itself and see if that works. Thanks for the help so far though.

----------

## halcon

 *Hu wrote:*   

> Generally, he should not.  Were you suggesting that he should?

 

No, I didn't mean that.

 *Hu wrote:*   

> His problem with the firmware is that he has not accepted the license restrictions on the firmware.

 

Yes, I see that now. I had misread the original post.

----------

## sdauth

 *canada-water wrote:*   

> 
> 
> Thanks, I managed to get the firmware package installed. Unfortunately, my kernel config didn't necessarily match up with what you had listed there, and I couldn't find those specific options for powersave, CRDA, etc. However, I'm going to use the method you listed for installing the firmware package to install the firmware for the wifi card itself and see if that works. Thanks for the help so far though.

 

What kernel are you using ? I'm on 5.4.97, current stable. Maybe the menu or wording changed slightly with recent kernel, I'm not sure. What you really want though is cfg80211, mac80211 and RF switch enabled and of course the iwlwifi driver. Built-in or as module, your call. These days, I prefer to have it built-in. But since it iwlwifi requires firmware, maybe as a module would be better.

----------

## canada-water

 *sdauth wrote:*   

>  What kernel are you using ? I'm on 5.4.97, current stable. Maybe the menu or wording changed slightly with recent kernel, I'm not sure. What you really want though is cfg80211, mac80211 and RF switch enabled and of course the iwlwifi driver. Built-in or as module, your call. These days, I prefer to have it built-in. But since it iwlwifi requires firmware, maybe as a module would be better.

 

Currently using 5.4.97 stable as well, so I'm not too sure why the wording might be different either. I'll have to check on the other firmware stuff this evening as I don't have the time right now.

----------

## canada-water

 *sdauth wrote:*   

> What you really want though is cfg80211, mac80211 and RF switch enabled and of course the iwlwifi driver. Built-in or as module, your call. These days, I prefer to have it built-in. But since it iwlwifi requires firmware, maybe as a module would be better.

 

Just checked the kernel, and I have all those enabled already. Still not showing up. Is there a different kernel module I need to enable that I haven't enabled yet? Or perhaps there may be something that could be a module conflict that's keeping it from loading properly?

----------

## Buffoon

Perhaps you didn't boot correct kernel, check with 'uname -v'. Timestamp what expected?

----------

## canada-water

 *Buffoon wrote:*   

> Perhaps you didn't boot correct kernel, check with 'uname -v'. Timestamp what expected?

 

I'm not too sure. It outputs 12:47 but it was probably closer to 3 if anything. I'm not too sure how I would boot the proper kernel though since I've recompiled it multiple times now for this and I don't have any other kernels.

----------

## Buffoon

There are several ways to boot kernel and there are many ways to install it. Whatever is your preferred method, you are making a mistake somewhere.

----------

## canada-water

I'm still relatively new to this, telling me that there are many ways without explaining the methods doesn't exactly help much. I've tried reading through some of the handbook on this but nothing's worked, and this doesn't seem to be working much either.

----------

## canada-water

Also, if this helps, here is dmesg | grep wifi:

```
[    0.727368] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control

[    0.727823] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-6000g2a-6.ucode failed with error -2

[    0.727832] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-6000g2a-5.ucode failed with error -2

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

[    0.727835] iwlwifi 0000:03:00.0: minimum version required: iwlwifi-6000g2a-5

[    0.727836] iwlwifi 0000:03:00.0: maximum version supported: iwlwifi-6000g2a-6

[    0.727836] iwlwifi 0000:03:00.0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
```

----------

## Buffoon

 *canada-water wrote:*   

> I'm still relatively new to this, telling me that there are many ways without explaining the methods doesn't exactly help much. I've tried reading through some of the handbook on this but nothing's worked, and this doesn't seem to be working much either.

 

I said it because I do not know how you do it, therefore can't tell you what you are doing wrong. We still don't know how you install and boot your kernel.

----------

## sdauth

@canada-water :

Are you using genkernel to build your kernel ? Or do you build it manually ?

You say "Just checked the kernel, and I have all those enabled already"

then, assuming iwlwifi has been built as a module, what :

modprobe -v iwlwifi

says ?

Also, since 5.4.109 just turned stable, maybe try to switch to it and start fresh.

I'm sorry I can't help you much than that. If you said it works on Arch, then it has to be the kernel.

----------

## canada-water

Hey, that worked! I'll tackle a kernel upgrade maybe in the next couple weeks, but right now I'm going to leave it like this because I don't want to break anything again. Thanks for the help again!

----------

## sdauth

 *canada-water wrote:*   

> Also, if this helps, here is dmesg | grep wifi:
> 
> ```
> [    0.727368] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
> 
> ...

 

Good, we know iwlwifi is here so it is an issue with the firmware.. Unfortunately, since I don't use Intel crap, I really don't know what could be wrong here. This might be relevant : https://forums.gentoo.org/viewtopic-t-1062462-start-0.html

EDIT:

 *canada-water wrote:*   

> Hey, that worked! I'll tackle a kernel upgrade maybe in the next couple weeks, but right now I'm going to leave it like this because I don't want to break anything again. Thanks for the help again!

 

Magic ?   :Surprised:  So now your card is detected ?

----------

