# [SOLVED] Driver missing for a Realtek network controller

## giocitta

Hi all,

my new PC (HP Pavilion AIO 24B200NL with i5-7400T CPU) shows through "lspci -k" the presence of a Network controller Realtek Device b822 (correctly recognized and working with Windows 10). The controller needs the driver "rtl8822be" not found in my Gentoo OpenRC Dantrell-Gnome (there is an rtl8821ae). I succeeded to download the firmware from github.com (rtl8822befw.bin), and saved it in /lib/firmware/rtlwifi. My kernel (4.12.12-gentoo) offers no option as regards the driver.

In my state of half-newbie, I'm very confused: what should I do now to have the card recognized by "ifconfig"?

Thanks for an help.

----------

## fedeliallalinea

You need both driver and firmware for correct working your NIC.

First check if your driver is compiled in your kernel

```
grep -ri rtl8821 /usr/src/linux/.config
```

For firmware you can also install package sys-kernel/linux-firmware instance of download it from github

----------

## giocitta

Thanks, fedeliallalinea, for your quick help.

I compiled in my kernel rtl8821ae, and now I have CONFIG_RTL8821AE=y.

Anyhow, after rebooting nothing changed as regards the recognition of the card by ifconfig.

Package sys-kernel/linux-firmware was already installed. From github I downloaded only the rtl8822befw.bin firmware (that is not present in linux-firmware).

What to do now?

----------

## Tony0945

see this:https://www.phoronix.com/scan.php?page=news_item&px=Linux-Realtek-RTL8822BE

----------

## NeddySeagoon

giocitta,

Are there any firmware loading errors in dmesg?

If you set CONFIG_RTL8821AE=y the firmware must be built into the kernel too.

----------

## fedeliallalinea

 *giocitta wrote:*   

> Package sys-kernel/linux-firmware was already installed. From github I downloaded only the rtl8822befw.bin firmware (that is not present in linux-firmware).

 

If you unmask version 20171206 this firmware is included

 *giocitta wrote:*   

> What to do now?

 

What NeddySeagoon has suggested

----------

## giocitta

In dmesgs I find two (unrelated) errors:

dmesg | grep firmware

```
[    1.075514] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_01.bin failed with error -2

[    1.075522] i915 0000:00:02.0: Failed to load DMC firmware [https://01.org/linuxgraphics/downloads/firmware], disabling runtime power management.
```

Now, I'll try to unmask version 20171206 of linux-firmware and see if a correct version of this firmware is there included.

My doubt is: rtl8891ae is the needed driver or should I find an rtl8892be?

Thanks for the help.

[Moderator edit: added [code] tags to preserve output layout. -Hu]

----------

## giocitta

Tony0945, thanks for the very important link. I understand that I must wait for 4.14 kernel.

----------

## fedeliallalinea

 *giocitta wrote:*   

> Tony0945, thanks for the very important link. I understand that I must wait for 4.14 kernel.

 

In amd64 now kernel 4.14.8 is marked stable

 *giocitta wrote:*   

> My doubt is: rtl8891ae is the needed driver or should I find an rtl8892be? 

 

Install new kernel and use correct driver rtl8892be

----------

## giocitta

fedeliallalinea,

in my updated Gentoo I don't find any 4.14.8 kernel (nor in gentoo-sources, nor in vanilla-sources): the most advanced is 4.14.7 (the one that I upgraded to), and has no rtl8822be driver. Did I make some error?

Thanks.

----------

## fedeliallalinea

 *giocitta wrote:*   

> in my updated Gentoo I don't find any 4.14.8 kernel (nor in gentoo-sources, nor in vanilla-sources): the most advanced is 4.14.7 (the one that I upgraded to), and has no rtl8822be driver. Did I make some error?

 

Probably is only your mirror that isn't already updated. Anyway also 4.14.7 as this driver

```
Device Drivers

    [*] Staging drivers  --->

        <M>   Realtek RTL8822BE Wireless Network Adapter (NEW)
```

----------

## giocitta

 *fedeliallalinea wrote:*   

>  *giocitta wrote:*   in my updated Gentoo I don't find any 4.14.8 kernel (nor in gentoo-sources, nor in vanilla-sources): the most advanced is 4.14.7 (the one that I upgraded to), and has no rtl8822be driver. Did I make some error? 
> 
> Probably is only your mirror that isn't already updated. Anyway also 4.14.7 as this driver
> 
> ```
> ...

 

Oh, thanks: I forgot to search in Staging drivers!!

How many things I'm learning day-by-day!!!

----------

## NeddySeagoon

giocitta,

Gentoo has a steep learning curve but be will point you in the right direction.

Notice the <M> 

```
<M>   Realtek RTL8822BE Wireless Network Adapter (NEW)
```

This builds your driver as a loadable module.  It avoids the complication of including firmware in the kernel.

As an aside, you Intel Graphics is not working properly.

```
 [ 1.075514] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_01.bin failed with error -2 
```

You have the driver built in but not the firmware.

Fix your Ethernet first, we can come back to this.  

Only work on one problem at a time.

----------

## giocitta

 *NeddySeagoon wrote:*   

> giocitta,
> 
> Gentoo has a steep learning curve but be will point you in the right direction.
> 
> Notice the <M> 
> ...

 

Hi NeddySeagoon,

I feel myself as a simple soldier in front of my General... and so I follow your dictates.

No more problem as regards the Realtek RTL8822BE Wireless Network Adapter : I choose the correct driver from Staging drivers (kernel 4.14.7), and added as a module. Now everything is normally running.

I do not understand what is the problem with my Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller. I found only a Realtek 8169 gigabit ethernet support, selected it to be compiled into the kernel, and it seems to work correctly (r8169 driver).

Wandering lonely as a cloud, I found and downloaded as .tar.bz2 file the RTL8168E/RTL8111F/RTL8411 driver for kernel up to 4.7. But now?

Waiting for your much appreciated suggestions, many thanks.

----------

## fedeliallalinea

 *giocitta wrote:*   

> I do not understand what is the problem with my Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller. I found only a Realtek 8169 gigabit ethernet support, selected it to be compiled into the kernel, and it seems to work correctly (r8169 driver).

 

The driver that you need is not in kernel but there's a package for it

```
* net-misc/r8168

     Available versions:  8.044.02 {KERNEL="linux"}

     Homepage:            http://www.realtek.com.tw

     Description:         r8168 driver for Realtek 8111/8168 PCI-E NICs
```

----------

## giocitta

 *fedeliallalinea wrote:*   

>  *giocitta wrote:*   I do not understand what is the problem with my Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller. I found only a Realtek 8169 gigabit ethernet support, selected it to be compiled into the kernel, and it seems to work correctly (r8169 driver). 
> 
> The driver that you need is not in kernel but there's a package for it
> 
> ```
> ...

 

Fantastic! I'd never have arrived to find out such a solution!

Please, suggest me an advanced book or text to proceed towards the finish line of this race!

Now I'll try to discover what to do for my graphic card driver.

Thanks, and again thanks

----------

## NeddySeagoon

giocitta,

The in kernel r8169 driver is to be preferred over the the out of kernel net-misc/r8168 kernel module.

Some network cards supported by the r8169 try to load firmware.  dmesg will tell you if it tries and fails.

Often there is a 60 sec timout before booting mover on.

If that is happening, you should provide the firmware.

----------

## giocitta

 *NeddySeagoon wrote:*   

> giocitta,
> 
> The in kernel r8169 driver is to be preferred over the the out of kernel net-misc/r8168 kernel module.
> 
> Some network cards supported by the r8169 try to load firmware.  dmesg will tell you if it tries and fails.
> ...

 

Many thanks. Now my system is using r8168 driver, and everything seems to work well.

Later, I'll try again the kernel r8169 driver I was used to use without any warning or error message in dmesg.

With my best regards,

Giorgio Cittadini

----------

## Tony0945

 *NeddySeagoon wrote:*   

> The in kernel r8169 driver is to be preferred over the the out of kernel net-misc/r8168 kernel module

 

I'd like to amplify this with my own experience. R8168 direct from Realtek is the latest, but as Neddy says, the inkernel r8169 is preferred. I think r8168 is a binary blob and it's a PITA to handle it. Over time, r8169 gets improved. So, if you need r8168, as I have had to on three machines, check maybe once or twice a year with the latest kernel and see if r8169 isn't now just as good. It may take several years for a brand new chip to be fully supported.

On two of my machines, I gave up and bought Intel add-in cards. One of those cards started acting up and I found that r8169 now works just as well as a working e1000e on my six year old mobos.

Hopefully, you won't have to wait six years and maybe mine were supported years ago. In fact, this weekend I'm going to check and see if r8169 doesn't work as well as r8168 on my Kaveri. When I first bought it, r8169 didn't work at all.

Part of the problem is that the Realtek chip is a family of chips and each mobo manufacturer implements it a little differently. Hats off to those kernel developers who research and account for all those tedious details. I can't for the life of me understand why hardware manufacturers don't make sample drivers available as they used to. The idea that someone is going to reverse engineer a driver into a silicon mask is ludicrous.

EDIT: editted for typoLast edited by Tony0945 on Thu Dec 21, 2017 8:44 pm; edited 1 time in total

----------

## fedeliallalinea

What NeddySeagoon and Tony0945 say is right. I just assumed that r8169 cann't working with your NIC.

----------

## giocitta

 *Tony0945 wrote:*   

>  *NeddySeagoon wrote:*   The in kernel r8169 driver is to be preferred over the the out of kernel net-misc/r8168 kernel module 
> 
> I'd like to amplify this with my own experience. R8168 direct from Realtek is the latest, but as Neddy says, the inkernel r8169 is preferred. I think r8168 is a binary blob and it's a PITA to handle it. Over time, r8169 gets improved. So, if you need r8168, as I have had to on three machines, check maybe once or twice a year with the latest kernel and see if r8169 isn't now just as good. It may take several years for a brand new chip to be fully supported.
> 
> On two of my machines, I gave up and bought Intel add-in cards. One of those cards started acting up and I found that r9169 now works just as well as a working e1000e on my six year old mobos.
> ...

 

Thanks: received and in knowledgeable digestion...

----------

## giocitta

 *NeddySeagoon wrote:*   

> giocitta,
> 
> Gentoo has a steep learning curve but be will point you in the right direction.
> 
> Notice the <M> 
> ...

 

Hi NeddySeagoon,

I did the whole job! Fixed the Ethernet problem; also fixed the Intel graphic card  incomplete configuration, adding  i915/kbl_dmc_ver1_01.bin to "Include in-kernel firmware blobs in kernel binary". As soon as possible, I'll control the correct operation of suspend-to-ram.

Now dmesg shows only: " udevd[2052] : ctx=0x1a4f349 path=/lib/modules/4.14.7-gentoo/kernel/drivers/gpu/drm/ttm/ttm.ko.gz  error=No such file or directory ".

I'll study what to do.

Your help, in these days as in the past, has been invaluable, and I thank you for your kindness and competency. The same applies to the other friends who apported their contribution to my newbie questions.

----------

## giocitta

 *giocitta wrote:*   

>  *NeddySeagoon wrote:*   giocitta,
> 
> Gentoo has a steep learning curve but be will point you in the right direction.
> 
> Notice the <M> 
> ...

 

SOLVED! I recompiled the kernel and the "udevd error" disappeared. Now, dmesg shows no error | Error | ERROR. I'm very happy for the help I received to solve all my problems.

----------

