Realtek RTL8125 2.5GbE Controller not supported

I bought an ASUS TUF Gaming Motherboard (X870-PLUS WIFI) in January and I am trying to setup Rocky Linux on it.
Sadly, I have an issue with the Network Adapter on the Motherboard. It seems it is not supported by default. So I am trying to get the driver software and build it.
Today, I even tried installing Linux Mint and Ubuntu and they have the same support issue with it.

The OS detect the network adapter and tries to run the driver.
dmesg contains:
[ 0.853518] r8169 0000:06:00.0: error -ENODEV: unknown chip XID 688, contact r8169 maintainers (see MAINTAINERS file)

lspci -nnk | grep -A3 -i “8125”
06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 0c)
DeviceName: Realtek RTL8125D LAN
Subsystem: ASUSTeK Computer Inc. Device [1043:88e1]
Kernel modules: r8169

RealTek RTL8125 rev0c seems to be somehow problematic according to what I find on the net so far.

This is a fresh installation of Rocky Linux, and I also updated all to latest as of today

uname -r
5.14.0-503.26.1.el9_5.x86_64

I downloaded the package r8125-9.014.01.tar from the RealTek web site

autorun.sh returns the following:

sudo ./autorun.sh

Check old driver and unload it.
rmmod r8169
Build the module and install
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: In function ‘rtl8125_proc_open’:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:2903:50: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Werror=implicit-function-declaration]
2903 | int (*show)(struct seq_file *, void ) = PDE_DATA(inode);
| ^~~~~~~~
| NODE_DATA
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:2903:50: warning: initialization of ‘int (
)(struct seq_file *, void )’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: At top level:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7767:31: error: initialization of ‘void (
)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack )’ from incompatible pointer type ‘void ()(struct net_device *, struct ethtool_ringparam )’ [-Werror=incompatible-pointer-types]
7767 | .get_ringparam = rtl8125_get_ringparam,
| ^~~~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7767:31: note: (near initialization for ‘rtl8125_ethtool_ops.get_ringparam’)
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7768:31: error: initialization of ‘int (
)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_ringparam )’ [-Werror=incompatible-pointer-types]
7768 | .set_ringparam = rtl8125_set_ringparam,
| ^~~~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7768:31: note: (near initialization for ‘rtl8125_ethtool_ops.set_ringparam’)
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7828:20: error: initialization of ‘int (
)(struct net_device *, struct ethtool_keee )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_eee )’ [-Werror=incompatible-pointer-types]
7828 | .get_eee = rtl_ethtool_get_eee,
| ^~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7828:20: note: (near initialization for ‘rtl8125_ethtool_ops.get_eee’)
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7829:20: error: initialization of ‘int (
)(struct net_device *, struct ethtool_keee )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
7829 | .set_eee = rtl_ethtool_set_eee,
| ^~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7829:20: note: (near initialization for ‘rtl8125_ethtool_ops.set_eee’)
In file included from /home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:87:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: In function ‘rtl8125_init_napi’:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125.h:880:57: error: too many arguments to function ‘netif_napi_add’
880 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight)
| ^~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:17215:17: note: in expansion of macro ‘RTL_NAPI_CONFIG’
17215 | RTL_NAPI_CONFIG(tp->dev, r8125napi, poll, R8125_NAPI_WEIGHT);
| ^~~~~~~~~~~~~~~
In file included from /home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:42:
./include/linux/netdevice.h:2694:1: note: declared here
2694 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
| ^~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: In function ‘rtl8125_init_one’:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:17357:17: error: implicit declaration of function ‘netif_set_gso_max_size’; did you mean ‘netif_set_tso_max_size’? [-Werror=implicit-function-declaration]
17357 | netif_set_gso_max_size(dev, LSO_64K);
| ^~~~~~~~~~~~~~~~~~~~~~
| netif_set_tso_max_size
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:249: /home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.o] Error 1
make[2]: *** [Makefile:1944: /home/patsim/SIMON/r8125-9.014.01.tar/src] Error 2
make[1]: *** [Makefile:193: modules] Error 2
make: *** [Makefile:41: modules] Error 2

Any help with this will be very appreciated.

1 Like

Can you create a ticket in ELRepo’s bug tracker: My View - ELRepo Bugs

Please put it under the channel: elrepo/el9

Thanks for quick reply toracat
Issue 0001512 created.
Regards

For information, elrepo dev team made a fix for this issue.

Fix is included in this RPM: kmod-r8125-9.015.00-1.el9_5.elrepo.x86_64.rpm

To get it:
Register to the ELREPO repository.
Please set up the elrepo repository by following the instructions on https://elrepo.org/ .

Then install the fix:
sudo dnf install --enablerepo elrepo-testing kmod-r8125
Reboot PC and you should get the net adapter working.

It is not clear for now if a permanent fix will be made and future RockyLinux releases will support the RTL8125 rev0c net adapter.

Note that I did not have to blacklist r8169 default Realtek driver to get the fix to work.
Note2, the dev team also made a preventive fix (untested by me since I do not have the hardware) regarding RTL8126 net adapter (kmod-r8126-10.015.00-1.el9_5.elrepo.x86_64.rpm)

Thanks to @toracat and its dev team for that quick answer and fix. This is really appreciated.

4 Likes
sudo dnf install elrepo-release

Alas, all the dnf install from online repos when network is not operational are … fascinating.
One basically needs another system that has functional network, download the RPM-packages,
and removable storage media (e.g. USB) to transfer the packages to the isolated system.
When package is on local drive, one can:

sudo dnf install kmod-r8126-10.015.00-1.el9_5.elrepo.x86_64.rpm
3 Likes