RTL8168 not able to establish link with Kernel 5.18/5.19

Dear Forum Member
I’m noticing since (not 100% sure) kernel 5.18.8 issues with my RTL8168H PHY on MSI X570 Gaming Egde WIFI mainboard.
Up to Kernel 5.18.14 the PHY were form time to time unable to establish a link. Since Kernel 5.18.15 the link cannot established at all. Also now with Kernel 5.19.1 and the latest r8168 driver from August 11th.

Cross checking and changing beginning with Kernel 5.18.15 the r8168 driver to the built in r8169 driver does recognizes the PHY but did not start at the interface. Meaning that there is no attempt at all to start up the device and try to establish a link.
Both driver show the interface:

ifconfig -a

enp39s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 42:ac:51:0b:b9:c6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 133 bytes 34686 (33.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 101 base 0x1000

I’m noticing the the loaded mod’s are different for r8168 and r8169.

lsmod for r8168 shows the following:

lsmod | grep 8168

r8168 225280 0

lsmod | grep 8169

r8169 102400 0
mdio_devres 16384 1 r8169
libphy 172032 3 r8169,mdio_devres,realtek
r8168 225280 0

dmesg shows for r8168 this:

dmesg | grep r8168

[ 4.071687] r8168 Gigabit Ethernet driver 8.050.03-NAPI loaded
[ 4.071705] r8168 0000:27:00.0: enabling device (0000 → 0003)
[ 4.084675] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[ 4.086704] r8168 Copyright (C) 2022 Realtek NIC software team nicfae@realtek.com
[ 4.231631] r8168 0000:27:00.0 enp39s0: renamed from eth0
[ 21.616882] r8168: enp39s0: link up
[ 22.640612] r8168: enp39s0: link down
[ 44.976806] r8168: enp39s0: link up
[ 46.000619] r8168: enp39s0: link down
[ 68.337117] r8168: enp39s0: link up
[ 69.361398] r8168: enp39s0: link down
[…]

but no message at all for r8169.

As the wiki say the driver has issues with IPv6 it was disabled specifically for the interface by creating the file 40-ipv6.conf in /usr/lib/modprode.d and added according to the wiki:

net.ipv6.conf.enp39s0.disable_ipv6 = 1

Does anyone have an idea how to further dissect this issue?

Best Alex

Have you tried using the r8169 kernel module instead of the r8168. The r8168 is an installed package that can be removed and then reboot and it will use the r8169 kernel module.

https://discovery.endeavouros.com/network/r8168-workaround/2021/03/

Not sure if you are talking about the wifi or ethernet connection problem.
8168 is an ethernet card, and I assume you are talking about it.

For the record, please show us the output (the URL especially) of command

inxi -zaN | eos-sendlog

Hey I’m facing a similar issue with the RTL88x2BU adapter and the rtl88x2bu-cilynx-dkms-git AUR package. After updating to kernel 5.19.1-arch2-1 the driver isn’t working… Is there a solution?

I think this board (MSI X570 Gaming Edge WiFi) has Intel AC 3168 WiFi chip. This is why i assumed it was Ethernet the OP was referring to.

1 Like

@manuel, @ricklinux

I dont want to be inpolite but I already mentioned that I tried to use both kernel builtin r8169 and external r8168 driver for this ethernet controller and described in detail the results.

Your tipps are well known but this was not the question I asked.

Here you seem to have both r8168 and r8169 in use… Only one of them is needed.

So if you install r8168 (and reboot), it is supposed to blacklist r8169, and only r8168 should show up on lsmod.
Vice versa, if you uninstall r8168 and reboot, only r8168 should show up on lsmod.

@manuel, i dont have both in use at the same time.
What you see are the different results if one or the another is loaded.

Edit: didnt noticed the last line in the lsmod for r8169.
Seem that blacklisting didn’t worked.
Will check this

For me i just remove the r8168 package all together so it doesn’t need to be blacklisted.

After a checking if the r8168 package has been removed and starting up the system this morning, the kernel driver r8169 recognizes the interface. Thats all. Link is still down, network-manage doesn’t up the device and in kernel log are only a Link down message is found.

# lsmod | grep r816*
r8169                 102400  0
mdio_devres            16384  1 r8169
libphy                172032  3 r8169,mdio_devres,realtek

# ifconfig -a
enp39s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:d8:61:a2:e4:a9  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

# dmesg | grep r8169
[    4.054788] r8169 0000:27:00.0: enabling device (0000 -> 0003)
[    4.074482] r8169 0000:27:00.0 eth0: RTL8168h/8111h, 00:d8:61:a2:e4:a9, XID 541, IRQ 101
[    4.074488] r8169 0000:27:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    4.199367] r8169 0000:27:00.0 enp39s0: renamed from eth0
[    5.113071] Generic FE-GE Realtek PHY r8169-0-2700:00: attached PHY driver (mii_bus:phy_addr=r8169-0-2700:00, irq=MAC)
[    5.316504] r8169 0000:27:00.0 enp39s0: Link is Down
[   21.246915] r8169 0000:27:00.0 enp39s0: Link is Down

This ended up with no interface to by network-manager.
With driver r8168 the network-manager sees a device but the controller is not able to establish a link.

Back to the original question - how to dissect this deeper?

We can close this question as I will follow up this on bugzilla.kernel.org.
If there is found the issue or provided a solution I will update this thread if possible.

Thank you very much for your effort and help.
Best Alex

1 Like