Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Driver missing for a Realtek network controller
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Wed Dec 20, 2017 8:18 pm    Post subject: [SOLVED] Driver missing for a Realtek network controller Reply with quote

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.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21546
Location: here

PostPosted: Wed Dec 20, 2017 8:35 pm    Post subject: Reply with quote

You need both driver and firmware for correct working your NIC.
First check if your driver is compiled in your kernel
Code:
grep -ri rtl8821 /usr/src/linux/.config

For firmware you can also install package sys-kernel/linux-firmware instance of download it from github
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Wed Dec 20, 2017 9:09 pm    Post subject: Reply with quote

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?
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2943
Location: Illinois, USA

PostPosted: Wed Dec 20, 2017 10:56 pm    Post subject: Reply with quote

see this:https://www.phoronix.com/scan.php?page=news_item&px=Linux-Realtek-RTL8822BE
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42841
Location: 56N 3W

PostPosted: Wed Dec 20, 2017 11:00 pm    Post subject: Reply with quote

giocitta,

Are there any firmware loading errors in dmesg?

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

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21546
Location: here

PostPosted: Thu Dec 21, 2017 6:40 am    Post subject: Reply with quote

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
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 7:03 am    Post subject: Reply with quote

In dmesgs I find two (unrelated) errors:

dmesg | grep firmware
Code:
[    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]
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 7:09 am    Post subject: Reply with quote

Tony0945, thanks for the very important link. I understand that I must wait for 4.14 kernel.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21546
Location: here

PostPosted: Thu Dec 21, 2017 7:36 am    Post subject: Reply with quote

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
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 9:01 am    Post subject: Reply with quote

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.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21546
Location: here

PostPosted: Thu Dec 21, 2017 9:22 am    Post subject: Reply with quote

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
Code:
Device Drivers
    [*] Staging drivers  --->
        <M>   Realtek RTL8822BE Wireless Network Adapter (NEW)

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 9:41 am    Post subject: Reply with quote

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
Code:
Device Drivers
    [*] Staging drivers  --->
        <M>   Realtek RTL8822BE Wireless Network Adapter (NEW)


Oh, thanks: I forgot to search in Staging drivers!!
How many things I'm learning day-by-day!!!
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42841
Location: 56N 3W

PostPosted: Thu Dec 21, 2017 9:53 am    Post subject: Reply with quote

giocitta,

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

Notice the <M>
Code:
<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.
Code:
 [ 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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 1:16 pm    Post subject: Reply with quote

NeddySeagoon wrote:
giocitta,

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

Notice the <M>
Code:
<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.
Code:
 [ 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.


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.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21546
Location: here

PostPosted: Thu Dec 21, 2017 1:34 pm    Post subject: Reply with quote

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
Code:
* 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

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 4:34 pm    Post subject: Reply with quote

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
Code:
* 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


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
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42841
Location: 56N 3W

PostPosted: Thu Dec 21, 2017 4:40 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 5:04 pm    Post subject: Reply with quote

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.
Often there is a 60 sec timout before booting mover on.

If that is happening, you should provide the firmware.


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
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2943
Location: Illinois, USA

PostPosted: Thu Dec 21, 2017 5:12 pm    Post subject: Reply with quote

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 typo


Last edited by Tony0945 on Thu Dec 21, 2017 8:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21546
Location: here

PostPosted: Thu Dec 21, 2017 5:23 pm    Post subject: Reply with quote

What NeddySeagoon and Tony0945 say is right. I just assumed that r8169 cann't working with your NIC.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 5:23 pm    Post subject: Reply with quote

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


Thanks: received and in knowledgeable digestion...
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Thu Dec 21, 2017 6:37 pm    Post subject: Reply with quote

NeddySeagoon wrote:
giocitta,

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

Notice the <M>
Code:
<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.
Code:
 [ 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.


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.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
giocitta
n00b
n00b


Joined: 11 Dec 2013
Posts: 67
Location: Località Cheirasca, 21 -15066 Gavi (AL)

PostPosted: Wed Dec 27, 2017 8:55 am    Post subject: Solved Reply with quote

giocitta wrote:
NeddySeagoon wrote:
giocitta,

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

Notice the <M>
Code:
<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.
Code:
 [ 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.


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.


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.
_________________
Giorgio Cittadini
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum