Realtek r8125 vs r8169 Driver - Performance Issues

Just stumbled onto this old Realtek r8125 issue, and was curious if there was any up to date methods of getting the r8125 driver installed on Rocky? Lots of documentation out there for Debian brands, but not seeing much for us.

Main issue is poor performance when using Rocky Linux on this Realtek 2.5 Gbps NIC. Download speeds are cut nearly in half or worse, compared to other OSes.

sudo lshw -C network

       description: Ethernet interface
       product: RTL8125 2.5GbE Controller
       vendor: Realtek Semiconductor Co., Ltd.
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=4.18.0-553.27.1.el8_10.x86_64 duplex=full firmware=rtl8125b-2_0.0.2 07/13/20 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s

Attempted to compile the latest r8125-9.014.01 downloaded from Realtek’s site, but coming up with the familiar “fatal error: linux/pci-aspm.h: No such file or directory” issue. So, before I travel down this path any further, anybody have any updated methods of getting the latest drivers for the RTL8125 NICs?

The baseline is that Rocky has what corresponding RHEL has. Period.

ELRepo start [ELRepo Wiki] maintains many kernel modules that Red Hat has omitted from RHEL, and perhaps some “improved” ones too. They definitely know how to build modules for Enterprise Linux.

1 Like

ELRepo has the kmod-r8125 package that provides the r8125 driver.

Run ‘lspci -nn’ to find the device IDs and check it on ELRepo’s devidID page to make sure your hardware is supported.

OK, so just the normal ELRepo method:

sudo dnf -y install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
sudo dnf -y install kmod-r8125
sudo vim /etc/modprobe.d/blacklists.conf 

# /etc/modprobe.d/blacklists.conf

blacklist r8169

sudo vim /etc/default/grub 

GRUB_CMDLINE_LINUX=“crashkernel=auto resume=UUID=blahblahblah rd.driver.blacklist=r8169 modprobe.blacklist=r8169”

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot
sudo lshw -C network

configuration: autonegotiation=on broadcast=yes driver=r8125 driverversion=9.013.02-NAPI-PTP duplex=full latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s

Unfortunately, even with the r8125 driver, my speedtest checks are still worse than expected compared to other devices on the same LAN (Intel cards getting ~900 Mbps, but poor Realtek still stuck below ~400 Mbps). I’ll have to keep tshooting this issue.

Thank you though for the quick replies, and at least the driver update process was smooth. Appreciate the guidance.