Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

incorrect driver loaded for ethernet NIC[solved]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
20 posts • Page 1 of 1
Author
Message
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

incorrect driver loaded for ethernet NIC[solved]

  • Quote

Post by Adel Ahmed » Sat Dec 20, 2014 1:10 pm

I have recently installed a new realtek pci ethernet NIC as a second ethernet NIC:
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03) => motherboard
05:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8129 (rev 10) => pci

I configured the 8139too as a module with
support for older rtl-8129/8130 boards

gentoo seems to be loading an incorrect driver:
lspci -k:
05:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8129 (rev 10)
Subsystem: Coreco Inc RTL8111/8168 PCIe Gigabit Ethernet (misconfigured)
Kernel driver in use: r8169
Kernel modules: 8139too


what went wrong and how can I fix things?


thanks
Last edited by Adel Ahmed on Sun Jan 04, 2015 1:50 pm, edited 1 time in total.
Top
SDNick484
Apprentice
Apprentice
Posts: 231
Joined: Mon Dec 05, 2005 9:43 am

  • Quote

Post by SDNick484 » Mon Dec 22, 2014 7:12 pm

Try forcing the module to be used as described in this post. Assuming that (i.e. it lets you force the correct driver), then we'll need to figure out how to set it correctly on boot (should be easy to hack with a script but perhaps there's an easier way).

Personally, I've found setting up Realtek NICs to always be a pain although once you find the winning config, you should be good to go.
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Mon Dec 22, 2014 10:35 pm

four things you can do

1) the in-kernel r8169 is perfectly fine for the r8168 chipset *IF* you have the firmware (emerge linux-firmware and at boot it will load the 8168 firmware and will be good)
2) use the in-tree r8168 drivers (emerge r8168 )
3) download the drivers from realtek (but thats just what emerge r8168 does)
4) use this r8169too kernel driver and make use of the module blacklist functionality to choose your prefered module:

Code: Select all

cat /etc/modprobe.d/blacklist.conf 
blacklist r8168

I personally went the r8169 drivers + firmware blobs

Code: Select all

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
	Subsystem: Gigabyte Technology Co., Ltd Motherboard
	Flags: bus master, fast devsel, latency 0, IRQ 56
	I/O ports at be00 [size=256]
	Memory at fbaff000 (64-bit, prefetchable) [size=4K]
	Memory at fbaf8000 (64-bit, prefetchable) [size=16K]
	[virtual] Expansion ROM at fbb00000 [disabled] [size=128K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Endpoint, MSI 01
	Capabilities: [ac] MSI-X: Enable- Count=4 Masked-
	Capabilities: [cc] Vital Product Data
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 03-00-00-00-68-4c-e0-00
	Kernel driver in use: r8169
	Kernel modules: r8169, r8168
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Tue Dec 23, 2014 2:14 am

Good choices, Naib. I've been down this road and finally took another path that I haven't regreted.

5. Buy an Intel ethernet card and add module e1000 to kernel config while blacklisting 8168 and r8169.

Cost me twenty bucks plus a spare PCI slot and my connection troubles are over. Boots quickly and dependably. Realtek drivers are a mess. Not blaming the devs, Realtek design and nomenclature is a mess.
Last edited by Tony0945 on Tue Dec 23, 2014 6:27 pm, edited 2 times in total.
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Tue Dec 23, 2014 8:40 am

There is that :) and that's why I have a good old tulip based nic in my PC as well.

I never understood why something as simple and old as an nic needs firmware
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Wed Dec 24, 2014 11:06 pm

echo 10ec 8169 > /sys/bus/pci/drivers/8139too/new_id => does nothing I still have incorrect drivers loaded

1- linux-firmware is blocked by radeon ucode
2- * Checking for suitable kernel configuration options...
* r8168-8.028.00 requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED
I cannot disable r8169, my other card is already using that
3 if that 's the same as 2, there's no point there
4 cant blacklist r8169

I'm still lost, problem is with the other ethernet card

thanks for your help
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Wed Dec 24, 2014 11:18 pm

ok try #1 but selectively pull out the 8186 firmware blob, at least to see if it will work
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sat Dec 27, 2014 6:07 pm

you lost me :D what does pull out the 8186 firmware blob mean?
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Sat Dec 27, 2014 7:05 pm

blakdeath wrote:you lost me :D what does pull out the 8186 firmware blob mean?
Well... you are saying you cannot emerge linux-firmware because the radeon ucode blocks it (which is odd...)

Soo... what I am suggesting is manually put in the firmware for the network card to see if this is a viable solution. If it is the correct method can be determined

Take for instance my dmesg output:

Code: Select all

[    5.939703] r8169 0000:03:00.0 eth0: RTL8168d/8111d at 0xffffc90000c70000, 6c:f0:49:e6:b0:ac, XID 083000c0 IRQ 40
This is telling me that the r8169 kernel driver is a RTL8168d.
If I do a:
equery f linux-firmware | grep 8168
/lib/firmware/rtl_nic/rtl8168d-1.fw
/lib/firmware/rtl_nic/rtl8168d-2.fw

/lib/firmware/rtl_nic/rtl8168e-1.fw
/lib/firmware/rtl_nic/rtl8168e-2.fw
/lib/firmware/rtl_nic/rtl8168e-3.fw
/lib/firmware/rtl_nic/rtl8168f-1.fw
/lib/firmware/rtl_nic/rtl8168f-2.fw
/lib/firmware/rtl_nic/rtl8168g-1.fw
/lib/firmware/rtl_nic/rtl8168g-2.fw
/lib/firmware/rtl_nic/rtl8168g-3.fw
/lib/firmware/rtl_nic/rtl8168h-1.fw
/lib/firmware/rtl_nic/rtl8168h-2.fw
One of these two are probably being used - for me.

So..

1) download
ftp://ftp.wh2.tu-dresden.de/pub/mirrors ... 009.tar.xz (or use whatever mirror you are happy with)

2) extract the rtl_nic directory

3) copy the rtl_nic directory to /lib/firmware

4) reboot (or /etc/init.d/net.eth0 down && rmmod r8169 && modprobe r8169 && /etc/init.d/net.eth0 up


it should come up alot quicker
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sun Dec 28, 2014 1:05 am

thanks for the explanation first of all, I have tried these steps, and I have extracted the 8168 firmware files into /lib/firmawre:

localhost ~ # ls /lib/firmware/rtl_nic/
rtl8168d-1.fw rtl8168e-1.fw rtl8168e-3.fw rtl8168f-2.fw rtl8168g-2.fw
rtl8168d-2.fw rtl8168e-2.fw rtl8168f-1.fw rtl8168g-1.fw rtl8168g-3.fw


I am ending up with the same result however(r8169 kernel driver being used)

thanks
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Wed Dec 31, 2014 11:48 pm

bump
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Fri Jan 02, 2015 10:37 pm

help
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Sat Jan 03, 2015 1:17 am

As I understood Naib, the r8169 driver is correct. One just uses it with different firmware for the 8168 variants.

As I said previously, I personally gave up and bought this card:
www.amazon.com/gp/product/B001CY0P7G/re ... UTF8&psc=1
and used the e1000 driver.

The card is also available in plain PCI variants as well as PCI-E.

It doesn't really solve your problem, but of course, I couldn't solve it either.
Top
bammbamm808
Guru
Guru
User avatar
Posts: 558
Joined: Sun Dec 08, 2002 7:09 am
Location: Hawaii

  • Quote

Post by bammbamm808 » Sat Jan 03, 2015 9:40 am

I'm doing just fine on the kernel's r8169 driver with the same ethernet chip.
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 4070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sat Jan 03, 2015 10:28 am

bammbamm, can I see your lspci -k, and do you have any other realtek cards?
Top
bammbamm808
Guru
Guru
User avatar
Posts: 558
Joined: Sun Dec 08, 2002 7:09 am
Location: Hawaii

  • Quote

Post by bammbamm808 » Sat Jan 03, 2015 9:18 pm

linux-3.17.7-gentoo, BTW

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B) (rev 02)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B)
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port B)
Kernel driver in use: pcieport
00:03.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port C)
Kernel driver in use: pcieport
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port D)
Kernel driver in use: pcieport
00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port E)
Kernel driver in use: pcieport
00:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port G)
Kernel driver in use: pcieport
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
Subsystem: ASUSTeK Computer Inc. Device 84dd
Kernel driver in use: ahci
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
Kernel driver in use: ohci-pci
Kernel modules: ohci_pci
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
Kernel driver in use: ohci-pci
Kernel modules: ohci_pci
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller
Kernel driver in use: piix4_smbus
Kernel modules: i2c_piix4
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
Kernel driver in use: ohci-pci
Kernel modules: ohci_pci
00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
Kernel driver in use: ohci-pci
Kernel modules: ohci_pci
00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control
Kernel driver in use: k10temp
Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control
01:00.0 VGA compatible controller: NVIDIA Corporation GF104 [GeForce GTX 460] (rev a1)
Subsystem: Device 196e:0865
Kernel driver in use: nvidia
Kernel modules: nvidia
01:00.1 Audio device: NVIDIA Corporation GF104 High Definition Audio Controller (rev a1)
Subsystem: Device 196e:0865
02:00.0 Audio device: Creative Labs EMU20k2 [X-Fi Titanium Series] (rev 04)
Subsystem: Creative Labs SB0880 [SoundBlaster X-Fi Titanium PCI-e]
Kernel driver in use: snd_ctxfi
Kernel modules: snd_ctxfi
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
Subsystem: ASUSTeK Computer Inc. P8P67 and other motherboards
Kernel driver in use: r8169
Kernel modules: r8169

04:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
Subsystem: ASUSTeK Computer Inc. P8B WS Motherboard
Kernel driver in use: xhci_hcd
Kernel modules: xhci_hcd
05:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
Subsystem: ASUSTeK Computer Inc. P8B WS Motherboard
Kernel driver in use: xhci_hcd
Kernel modules: xhci_hcd
06:06.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)
Subsystem: ASUSTeK Computer Inc. Motherboard
Kernel driver in use: firewire_ohci
Kernel modules: firewire_ohci

No other Realtek devices
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 4070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sat Jan 03, 2015 10:10 pm

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
Subsystem: Gigabyte Technology Co., Ltd Motherboard
Kernel driver in use: r8169
05:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8129 (rev 10)
Subsystem: Coreco Inc RTL8111/8168 PCIe Gigabit Ethernet (misconfigured)
Kernel driver in use: r8169
Kernel modules: 8139too
I'm having problems with the second NIC
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Sat Jan 03, 2015 10:16 pm

I guessing the two card need different firmware. I think you might have to clone the driver and give it a different name and use a udev rule to load the correct one.
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sun Jan 04, 2015 12:56 pm

I've removed the r8169 module from the kernel and it's working fine, this confirms that the problem is caused by incorrect module loading
I'll keep looking in that direction:
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
Subsystem: Gigabyte Technology Co., Ltd Motherboard
05:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8129 (rev 10)
Subsystem: Coreco Inc RTL8111/8168 PCIe Gigabit Ethernet (misconfigured)
Kernel driver in use: 8139too
Kernel modules: 8139too
Top
Adel Ahmed
Veteran
Veteran
Posts: 1616
Joined: Fri Sep 21, 2012 7:59 am

  • Quote

Post by Adel Ahmed » Sun Jan 04, 2015 1:28 pm

built in the 8139too module and modularized the 8169 module, everything is working fine now, I tried removing the 8139too module completely, the NIC is detected but no functionality is supported
this solves it.
thanks everyone
Top
Post Reply

20 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic