# wifi setup: realtek 8821AE

## wolly01

Hi

I'm trying to set up wifi on a Lenovo Ideapad. The Laptop uses a realtek 8821AE card. I was following the tutorial:

https://wiki.gentoo.org/wiki/Wifi

to set up the wifi, which for my card instructs me to manually install the firmware for my card, however there is no linuix firmware for this card on realteks' website.

I'm a bit stuck now as what to do, please help.

----------

## fedeliallalinea

Your firmware is present in sys-kernel/linux-firmware package.

```
$ ls /lib/firmware/rtlwifi/rtl8821aefw*

/lib/firmware/rtlwifi/rtl8821aefw_29.bin  /lib/firmware/rtlwifi/rtl8821aefw.bin  /lib/firmware/rtlwifi/rtl8821aefw_wowlan.bin
```

----------

## wolly01

Thanks fedeliallalinea

I've done as suggested and double checked that the firmware is present, all seems good there.

However I've just ran lspci:

```

02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter

   Subsystem: Lenovo RTL8821AE 802.11ac PCIe Wireless Network Adapter

   Flags: fast devsel, IRQ 255

   I/O ports at 2000 [size=256]

   Memory at 91200000 (64-bit, non-prefetchable) [size=16K]

   Capabilities: [40] Power Management version 3

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

   Capabilities: [70] Express Endpoint, MSI 00

02:00.0 0280: 10ec:8821

```

Seems I don't have a driver loaded up, apologies for not mentioning at the beginning - I hadn't realised.

When generating my kernel I ensured:

```

Device Drivers : Network device support : Wireless LAN : Realtek rtlwifi family of devices : Realtek RTL8821AE / RTL 8812AE wireless network adaptor

```

was set to modular, so I should have a driver ready to load right?

Searching through my kernel modules gives the following realtek modules:

```

./kernel/drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8187.ko

./kernel/drivers/net/wireless/realtek/rtl818x/rtl8180/rtl818x_pci.ko

```

however they don't seem to be the right ones.

If they arn't can you please instruct me on how to obtain them / which modules to include in the kernel.

If they are can you please instruct me on how to load the correct module.

----------

## charles17

Did you set those drivers mentioned in https://www.startpage.com/do/search?query=%228821AE%20realtek%22+site%3Acateee.net?

```
CONFIG_WLAN=y

CONFIG_RTLWIFI=m

CONFIG_RTL8821AE=m
```

----------

## wolly01

charles17, just checked the config file I used to gen the kernel, it agrees with what you have mentioned.

----------

## charles17

Please ensure the kernel from which you are booting is the one which you have configured. Running  uname -a could help.

----------

## fedeliallalinea

You have added firmware in kernel?

Post output of

```
$ zgrep -i 'WLAN\|RTL88\|FIRMWARE' /proc/config.gz
```

----------

