FS#67314 - [r8168-lts] Realtek 8111/8168/8411 problems

Attached to Project: Community Packages
Opened by Thomas (tomsam) - Saturday, 18 July 2020, 06:51 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Wednesday, 22 July 2020, 09:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

As a matter of fact, my Realtek 8111/8168/8411 onboard Gigabit network adapter did not work with the r8169 driver provided on the current arch install disk (ip a
showed NO CARRIER and state DOWN). The forum's hint was to install linux-lts (i.e. install by using a different distro) and the corresponding r8168-lts module and have r8168 blacklisted. That module came up with the interface in state UP, but no incoming traffic was seen until the cable was plugged out and in again at the pc side (this is the short summary of a longer search).

For some reason (parallel install of Mint 20 with the r8168 driver compiled and installed by myself), I found by chance that the NetworkManager was able to use the device correctly, whenever you set the "Auto-negotiation" flag to Auto in the Advance Network settings (this was not the default!). This also works in Arch !

At this point it has to be mentioned that the r8168 module startup options were already set to
options r8168 speed_mode=100 duplex_mode=1 autoneg_mode=1

Arch users using systemd-networkd can use
NWI=enp5s0f0
/usr/sbin/ethtool -s $NWI autoneg on
to trigger the interface to come up (i.e. setting autoneg to on, even if it is already on !!!,
NWI must contain the name of the network interface of the respective system)
So, this is first bug in the driver, but most probably has to be solved by Realtek (which are not really helpful).

The second point is: The Mint system (using NetworkManager) comes up and reboots correctly,
while the Arch system powers_down/shuts_down the interface on system shutdown or reboot, and after that the interface
is not working at all anymore (i.e. the pc _and_ the network switch have to be disconnected from the outlet for minutes)

If I set

options r8168 speed_mode=100 duplex_mode=1 autoneg_mode=1 s5wol=1

however, this problem disappears!

A closer look at the modules Makefile (Realtek original source, same version) shows me that
ENABLE_S5WOL = y
should be enabled by default.
But obviously, the current r8168-lts module does not have this setting enabled.

Can you please check your sources for this and fix the issue?


Additional info:
r8168-lts-8.048.03-8-x86_64.pkg.tar.zst
current linux-lts

Steps to reproduce:
Have a system with an onboard Realtek 8111/8168/8411
install linux-lts r8168-lts, blacklist r8169
boot the system and get the network card to run
(note: the above mentioned settings are in /etc/modprobe.d/r8168.conf)
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Wednesday, 22 July 2020, 09:16 GMT
Reason for closing:  Fixed
Additional comments about closing:  r8168-lts-8.048.03-11
Comment by Thomas (tomsam) - Saturday, 18 July 2020, 06:53 GMT
The blacklist is of course for the r8169
Comment by Massimiliano Torromeo (mtorromeo) - Tuesday, 21 July 2020, 15:29 GMT
The ENABLE_S5WOL in the Makefile is not modified by the PKGBUILD but we are not using the Makefile when compiling the module.
I'm going to change the PKGBUILD to replicate the default flags present in the Makefile I just want to point out that I no longer have a realtek card to test so I won't be able to verify if any change will work or even have a negative impact.
Comment by Massimiliano Torromeo (mtorromeo) - Tuesday, 21 July 2020, 15:34 GMT
Please test r8168-8.048.03-12 and/or r8168-lts-8.048.03-11 and let me know if it works correctly. Thanks
Comment by Thomas (tomsam) - Tuesday, 21 July 2020, 16:47 GMT
Thanks Massimiliano. With the *03-11, the s5wol problem is gone.
However, now the interface does not connect anymore at all (even with NetworkManager).
I will have a closer look again tomorrow.
Comment by Thomas (tomsam) - Tuesday, 21 July 2020, 18:07 GMT
Mea culpa. I updated just the driver, which led to the situation that the module was in the wrong extramodules directory.
With 5.4.52-1 and the *03-11, the interface comes up, and does not fully shutdown during reboot.
Tomorrow, I will test a bit more.
Comment by Thomas (tomsam) - Wednesday, 22 July 2020, 08:58 GMT
Tests today, including speed tests, were running fine.
I guess, you can close this issue.
If further problems occur, I will reopen it or a new one.
Thanks.

Loading...