Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] net-misc/r8168 build issue

202 views
Skip to first unread message

Hasan Ç.

unread,
Nov 15, 2018, 10:10:04 AM11/15/18
to
Hi All,

This is a known problem kernel uses r8169 ethernet firmware for r8168 chips and causes connectivity issues.Thanks gentoo there is a r8168 package in net-misc but i encountered a problem.

James Le CuirotSat, 28 Apr 2018 00:09, commit ee232457

-CONFIG_CHECK="!R8169"
-ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED"

emerge --ask net-misc/r8168

* Messages for package net-misc/r8168-8.045.08:
 *   r8168-8.045.08 requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED

It seems not allow to build r8168 if kernel compiled with r8169 module.Do we need to re-compile kernel without r8169?  
After i disabled r8169 in /usr/src/linux-$(uname -r)/.config manually, build works.

#CONFIG_R8169=m

 emerge --ask net-misc/r8168

lspci -v
 
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Kernel driver in use: r8169
Kernel modules: r8169, r8168

modprobe -r r8169
modprobe r8168
 
modprobe: ERROR: could not insert 'r8168': Required key not available

[*]   Module signature verification
[*]     Require modules to be validly signed
[*]     Automatically sign all modules
      Which hash algorithm should modules be signed with? (Sign modules with SHA-512) --->

I signed r8168 manually and disabled r8169:

/usr/src/linux-$(uname -r)/scripts/sign-file sha512 /usr/src/linux-$(uname -r)/certs/signing_key.pem /usr/src/linux-$(uname -r)/certs/signing_key.x509 /lib/modules/$(uname -r)/net/r8168.ko

modprobe r8168
 
echo "blacklist r8169" >> /etc/modprobe.d/blacklist.conf # This is not working for me something forcing to it load.

GRUB_CMDLINE_LINUX_DEFAULT="modprobe.blacklist=r8169" #This is working way to push r8168 instead of r8169 for me.

grub-mkconfig -o /boot/grub/grub.cfg
 
dracut --force --regenerate-all

lspci -v
 
 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Kernel driver in use: r8168
Kernel modules: r8169, r8168

dmesg | grep r8168

[    3.951450] r8168: loading out-of-tree module taints kernel.
[    3.951732] calling  init_module+0x0/0x1000 [r8168] @ 564
[    3.951750] r8168 Gigabit Ethernet driver 8.045.08-NAPI loaded
[    3.967857] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[    3.967861] r8168  Copyright (C) 2017  Realtek NIC software team <nic...@realtek.com
[    3.967893] initcall init_module+0x0/0x1000 [r8168] returned 0 after 15775 usecs
[    3.993330] r8168 0000:02:00.0 eno1: renamed from eth0
[  808.484879] r8168: eno1: link up

ifconfig 

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.34.105.20  netmask 255.255.255.0  broadcast 10.34.105.255
        inet6 fe80::f9e1:641f  prefixlen 64  scopeid 0x20<link>
        ether 48:ba:4e  txqueuelen 1000  (Ethernet)
        RX packets 408  bytes 119641 (116.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 507  bytes 84037 (82.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 127  base 0x5000  

It seems stable but i don't know why it is restricted for r8169 enabled kernel.
Sincerely.

 

Neil Bothwick

unread,
Nov 15, 2018, 6:30:03 PM11/15/18
to
On Thu, 15 Nov 2018 18:06:26 +0300, Hasan Ç. wrote:

> This is a known problem kernel uses r8169 ethernet firmware for r8168
> chips and causes connectivity issues.Thanks gentoo there is a r8168
> package in net-misc but i encountered a problem.
>
> James Le Cuirot <ch...@gentoo.org>, Sat, 28 Apr 2018 00:09, commit
> ee232457
> <https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee232457ed7bad1c3d62c4c509419086b6ea3a65>
>
> -CONFIG_CHECK="!R8169"
> -ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter
> (CONFIG_R8169) to be DISABLED"
>
> emerge --ask net-misc/r8168

You can't have two r8168 modules installed at the same time. Use either
the in-kernel one or thebinary driver from Realtek, that's what the ebuild
is checking for. For the 8168 firmware, install linux-firmware.

% qlist linux-firmware | grep 8168
/lib/firmware/rtl_nic/rtl8168h-2.fw
/lib/firmware/rtl_nic/rtl8168h-1.fw
/lib/firmware/rtl_nic/rtl8168g-3.fw
/lib/firmware/rtl_nic/rtl8168g-2.fw
/lib/firmware/rtl_nic/rtl8168g-1.fw
/lib/firmware/rtl_nic/rtl8168f-2.fw
/lib/firmware/rtl_nic/rtl8168f-1.fw
/lib/firmware/rtl_nic/rtl8168e-3.fw
/lib/firmware/rtl_nic/rtl8168e-2.fw
/lib/firmware/rtl_nic/rtl8168e-1.fw
/lib/firmware/rtl_nic/rtl8168d-2.fw
/lib/firmware/rtl_nic/rtl8168d-1.fw


--
Neil Bothwick

WORM: (n.) acronym for Write Once, Read Mangled. Used to describe a
normally-functioning computer disk of the very latest design.
0 new messages