Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715784 - sys-kernel/gentoo-sources-5.4.28 regression in handling Realtek r8169 network card
Summary: sys-kernel/gentoo-sources-5.4.28 regression in handling Realtek r8169 network...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-01 17:07 UTC by Paul Osmialowski
Modified: 2020-05-07 09:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Osmialowski 2020-04-01 17:07:21 UTC
After upgrade to kernel 5.4.28 I've found the network has gone.
I've found following lines in dmesg:

[    1.063895] Run /init as init process
[    1.192409] r8169 0000:02:00.0: realtek.ko not loaded, maybe it needs to be added to initramfs?
[    1.192464] libata version 3.00 loaded.
[    1.192528] r8169: probe of 0000:02:00.0 failed with error -2
[    1.193541] ACPI: bus type USB registered[    1.063895] Run /init as init process
[    1.192409] r8169 0000:02:00.0: realtek.ko not loaded, maybe it needs to be added to initramfs?
[    1.192464] libata version 3.00 loaded.
[    1.192528] r8169: probe of 0000:02:00.0 failed with error -2
[    1.193541] ACPI: bus type USB registered

Both realtek.ko and r8169.ko were built and installed under /lib/modules/5.4.28-gentoo

Reproducible: Always

Steps to Reproduce:
1. upgrade to kernel 5.4.28
2. reboot your system
3. check if network works
Actual Results:  
Network is gone, no enp2s0 is present

Expected Results:  
Network interface enp2s0 should be visible on the systems equipped with Realtek r8169 network card.

I'm using sys-kernel/genkernel-next-69 to configure and build my kernel.

Also, I've found easy workaround: using `genkernel --menuconfig` I've forced r8168 driver to be statically linked into the kernel (instead of building a module), and this makes the network working again!

emerge --info output:

Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r7, 5.4.28-gentoo x86_64)
=================================================================
System uname: Linux-5.4.28-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    16398840 total,  10954004 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 01 Apr 2020 09:00:01 +0000
Head commit of repository gentoo: 911d51162c899624ed92791cae707eaa2c787aa5
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.7::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.10.3-r3::gentoo, 1.11.6-r3::gentoo, 1.12.6::gentoo, 1.13.4-r2::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

telred
    location: /var/lib/layman/telred
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 snail 2020-04-01 18:17:36 UTC

(In reply to Paul Osmialowski from comment #0)

I cannot reproduce your problem.

lspci:

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 07)

uname -a:

Linux dell 5.4.28-gentoo #2 SMP Tue Mar 31 14:04:55 CEST 2020 x86_64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz GenuineIntel GNU/Linux

config:

CONFIG_PHYLIB=m
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_REALTEK_PHY=m
CONFIG_R8169=m
CONFIG_GENERIC_PHY=y

dmesg:

[    5.117866] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    5.117894] r8169 0000:03:00.0: enabling device (0000 -> 0003)
[    5.119019] libphy: r8169: probed
[    5.119116] r8169 0000:03:00.0 eth0: RTL8106e, [...], XID 449, IRQ 126
[    5.169970] r8169 0000:03:00.0 enp3s0: renamed from eth0
[   12.450926] Generic PHY r8169-300:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=r8169-300:00, irq=IGNORE)
[   12.684337] r8169 0000:03:00.0 enp3s0: Link is Down
[   15.722674] r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx

lsmod:

r8169                  86016  0
libphy                 73728  3 r8169,realtek
Comment 2 Paul Osmialowski 2020-04-01 18:57:57 UTC
lspci:

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

configs (from /etc/kernels/kernel-config-x86_64-5.4.28-gentoo):

CONFIG_PHYLIB=m (now y due to workaround)
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_REALTEK_PHY=m (now y due to workaround)
CONFIG_R8169=m (now y due to workaround)
CONFIG_GENERIC_PHY=y

Could it be userspace problem, e.g. with systemd or modprobe?
Comment 3 Jonas Stein gentoo-dev 2020-04-03 19:31:19 UTC
It is sad to read that you have problems with the software. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 4 Paul Osmialowski 2020-05-07 09:39:30 UTC
The kernel version 5.4.38 suffers from the same issue. Which means there were no other complains from the others over time. Which means the problem can be reproduced only on this machine. As this machine is too busy for doing investigations and frequent reboots, I have made a mental upgrade of my current workaround to a permanent solution for this machine.