Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
migrate from rtl8169 to rtl8168... [solved]
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
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Tue Jul 27, 2021 9:34 am    Post subject: migrate from rtl8169 to rtl8168... [solved] Reply with quote

Trying again something that failed long time ago.
Important steps I think of I'm asking advice on:
Some module may have to be temporary blacklisted here:
Code:
grep 8169 /usr/src/linux/.config
CONFIG_R8169=m
Code:
lsmod
Module                  Size  Used by
fuse                  122880  0
af_packet              49152  2
sha256_ssse3           28672  0
sha256_generic         12288  1 sha256_ssse3
libsha256              12288  1 sha256_generic
cfg80211              368640  0
rfkill                 24576  1 cfg80211
binfmt_misc            12288  1
snd_aloop              24576  1
vhba                   16384  0
mousedev               20480  0
hid_generic            12288  0
usbhid                 24576  0
hid                    69632  2 usbhid,hid_generic
coretemp               12288  0
ums_realtek            16384  0
usb_storage            61440  1 ums_realtek
hwmon                  16384  1 coretemp
snd_hda_codec_hdmi     57344  1
snd_hda_codec_realtek   114688  1
intel_tcc_cooling      12288  0
crc32c_intel           16384  2
aesni_intel           335872  0
snd_hda_codec_generic    73728  1 snd_hda_codec_realtek
ledtrig_audio          12288  1 snd_hda_codec_generic
libaes                 12288  1 aesni_intel
led_class              12288  1 snd_hda_codec_generic
crypto_simd            12288  1 aesni_intel
snd_hda_intel          28672  3
cryptd                 16384  1 crypto_simd
snd_intel_dspcfg       12288  1 snd_hda_intel
rapl                   12288  0
snd_hda_codec          90112  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           57344  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
intel_cstate           12288  0
xhci_pci               12288  0
intel_uncore          139264  0
xhci_hcd              126976  1 xhci_pci
r8169                  86016  0 <<<<<<<<<<<<<<<<<<<<<
snd_pcm                86016  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_aloop,snd_hda_core
realtek                20480  1 <<<<<<<<<<<<<<<<<<<<<
snd_timer              28672  2 snd_aloop,snd_pcm
bfq                    49152  2
mdio_devres            12288  1 r8169 <<<<<<<<<<<<<<<<<<<
snd                    65536  12 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_timer,snd_aloop,snd_pcm
libphy                 77824  3 r8169,mdio_devres,realtek
usbcore               212992  5 xhci_hcd,usbhid,usb_storage,xhci_pci,ums_realtek
soundcore              12288  1 snd
intel_pch_thermal      12288  0
evdev                  20480  15
usb_common             12288  1 usbcore
intel_pmc_core         24576  0
i2c_i801               24576  0
rtc_cmos               16384  1
pcspkr                 12288  0
i2c_smbus              12288  1 i2c_i801
unix                   40960  997
More especially:
Code:
r8169                  86016  0
realtek                20480  1
mdio_devres            12288  1 r8169
Code:
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 11)
Should previous module proper blacklisting magically load one of the following?
Code:
grep 8168 /etc/portage/savedconfig/sys-kernel/linux-firmware-20210629
rtl_nic/rtl8168fp-3.fw
rtl_nic/rtl8168h-2.fw
rtl_nic/rtl8168h-1.fw
rtl_nic/rtl8168g-3.fw
rtl_nic/rtl8168g-2.fw
rtl_nic/rtl8168g-1.fw
rtl_nic/rtl8168f-2.fw
rtl_nic/rtl8168f-1.fw
rtl_nic/rtl8168e-3.fw
rtl_nic/rtl8168e-2.fw
rtl_nic/rtl8168e-1.fw
rtl_nic/rtl8168d-2.fw
rtl_nic/rtl8168d-1.fw
or should the proper one be set in-lernel? Which firmware to use?

Maybe an important step is missing there?

Thks 4 ur attention, interest & support
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Tue Jul 27, 2021 7:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Tue Jul 27, 2021 7:00 pm    Post subject: Reply with quote

Finally did it:
Code:
diff linux-5.13.5-gentoo-classic/.config linux-5.13.5-gentoo-r8168/.config
3c3
< # Linux/x86 5.13.5-gentoo-classic Kernel Configuration
---
> # Linux/x86 5.13.5-gentoo-r8168 Kernel Configuration
760c760
< CONFIG_UNUSED_KSYMS_WHITELIST="/usr/local/share/kernel-patches/vhba/5.9.x/5.9.0-gentoo-vhba_UNUSED_KSYMS.txt"
---
> CONFIG_UNUSED_KSYMS_WHITELIST="/usr/local/share/kernel-patches/vhba/5.9.x/5.9.0-gentoo-r8168-vhba_UNUSED_KSYMS.txt"
1505c1505
< CONFIG_R8169=m
---
> # CONFIG_R8169 is not set
Code:
emerge -1 net/r8168
where
Code:
ll *8168*
-rw-r--r-- 1 root root 114824 juil. 27 19:45 r8168.ko.xz.large
-rw-r--r-- 1 root root  59916 juil. 27 19:15 r8168.ko.xz.small
small is built with USE=use-firmware which requires >=net-misc/r8168-8.049.02-r1.

Both module builds load automagically. 8)

Side notes: linux-firmware content not required.
Kernel initial module size:
Code:
ll /lib/modules/5.13.5-gentoo-classic/kernel/drivers/net/ethernet/realtek/r8169.ko.xz
-rw-r--r-- 1 root root 34020 juil. 25 23:12 /lib/modules/5.13.5-gentoo-classic/kernel/drivers/net/ethernet/realtek/r8169.ko.xz


No idea if it worths it.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Wed Jul 28, 2021 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Wed Jul 28, 2021 2:33 pm    Post subject: Reply with quote

Realtek labels r8168 linux driver as GBE Ethernet LINUX driver r8168 for kernel up to 5.6
Good enough with 5.13.5 here, though.
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Sun Aug 01, 2021 2:59 pm    Post subject: Reply with quote

Code:
USE=use-firmware net-misc/r8168
has caused Gentoo forum
Thks ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Sun Aug 01, 2021 4:09 pm    Post subject: Reply with quote

CaptainBlood wrote:
Code:
USE=use-firmware emerge net-misc/r8168
has caused Gentoo forum
EDIT: USE=-use-firmware emerge net-misc/r8168 fixed it, I can't believe it...
Thks ur attention, interest & support.

_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3412
Location: Rasi, Finland

PostPosted: Mon Aug 02, 2021 5:55 pm    Post subject: Reply with quote

So. Your solution is not to install firmware?

I have at least two nics which do use the same driver. I'd like to know the solution before I go and perform world update. Thanks.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Mon Aug 02, 2021 6:47 pm    Post subject: Reply with quote

Code:
emerge USE=-use-firmware net-misc/r8168
install a bigger r8168.ko.
Once loaded it doesn't seem to be bigger in RAM, iirc.

Sorry for not having collected the exact numbers for each use case yet.
Planning to do so in a near future.

One possible source of error for USE=-use-firmware could be incorrect CONFIG_UNUSED_KSYMS_WHITELIST symbol list for CONFIG_TRIM_UNUSED_KSYMS=y.

Thks 4 trying, as it seem very likely you will report error, should such a case raises.
FYI, with net-misc/r8168-8.049.02-r1
Code:
dmesg | grep r8168
[    0.000000] Linux version 5.13.7-gentoo-r8168 (root@amd64) (gcc (Gentoo 11.2.0 p1) 11.2.0, GNU ld (Gentoo 2.35.2 p1) 2.35.2) #2 SMP Sat Jul 31 19:43:41 EAT 2021
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.13.7-gentoo-r8168 root=/dev/sda1 ro quiet splash=silent,theme:livedvd-12.0 console=tty1 l1tf=flush,nosmt mds=full mitigations=off randomize_kstack_offset=1 nosmt_
[    0.017011] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.7-gentoo-r8168 root=/dev/sda1 ro quiet splash=silent,theme:livedvd-12.0 console=tty1 l1tf=flush,nosmt mds=full mitigations=off randomize_kstack_offset=1 nosmt_
[    1.038565]     BOOT_IMAGE=/boot/vmlinuz-5.13.7-gentoo-r8168
[   18.933336] r8168: loading out-of-tree module taints kernel.
[   18.933769] r8168 Gigabit Ethernet driver 8.049.02-NAPI loaded
[   18.950103] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[   18.952127] r8168  Copyright (C) 2021 Realtek NIC software team <nicfae@realtek.com>
[   18.952619] r8168 0000:01:00.0 enp1s0: renamed from eth0
[   39.570372] r8168: enp1s0: link up
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Thu May 30, 2024 4:06 am    Post subject: Reply with quote

Fix update

Thks 4 ur attention, interest & support.[/url]
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3412
Location: Rasi, Finland

PostPosted: Sun Jun 02, 2024 9:55 am    Post subject: Reply with quote

I don't really care if ram usage were to raise by few kbs.
As long as it works realiably.

I assume it has been working for you now with the kernel config patch you linked?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3676

PostPosted: Sun Jun 02, 2024 2:00 pm    Post subject: Reply with quote

Zucca wrote:
I don't really care if ram usage were to raise by few kbs.
As long as it works realiably.

I assume it has been working for you now with the kernel config patch you linked?


It works with anna's patch from the bug report.

I personally only added a file for slimmer kernel.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
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