Package Details: r8125-dkms 9.017.01-1

Git Clone URL: https://aur.archlinux.org/r8125-dkms.git (read-only, click to copy)
Package Base: r8125-dkms
Description: Kernel module for RTL8125
Upstream URL: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
Licenses: GPL2
Conflicts: r8125
Submitter: ptb
Maintainer: aravance
Last Packager: aravance
Votes: 23
Popularity: 0.98
First Submitted: 2020-11-21 14:53 (UTC)
Last Updated: 2026-02-26 21:52 (UTC)

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

1 2 3 4 5 6 7 Next › Last »

vp1981 commented on 2026-01-25 04:49 (UTC)

@HurricanePootis, thank you.

I think I get what is wrong. I didn't use the original dkms.conf file of the package, but changed the MAKE line as you suggested below, so right now I have the following for dkms.conf:

PACKAGE_NAME="r8125"
PACKAGE_VERSION="9.016.01"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build EXTRA_CFLAGS='-DCONFIG_SOC_LAN -DENABLE_FIBER_SUPPORT -DCONFIG_ASPM -DENABLE_S5WOL -DENABLE_EEE -DENABLE_TX_NO_CLOSE -DENABLE_USE_FIRMWARE_FILE -DENABLE_GIGA_LITE' r8125-objs='r8125_n.o rtl_eeprom.o rtltool.o r8125_fiber.o r8125_firmware.o' modules"
# CLEAN="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build clean"
BUILT_MODULE_NAME[0]="r8125"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek"
AUTOINSTALL="yes"

It makes sense that if you are using something like yay -S r8125-dkms (or similar), then you are using the original dkms.conf

PACKAGE_NAME="@_PKGNAME@"
PACKAGE_VERSION="@PKGVER@"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
CLEAN="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build clean"
BUILT_MODULE_NAME[0]="@_PKGNAME@"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek"
AUTOINSTALL="yes"

and ENABLE_USE_FIRMWARE_FILE is not defined.

So, should I assume that your suggestion was a bit more advanced, and I stumbled upon a code error?

HurricanePootis commented on 2026-01-23 03:27 (UTC)

@vp1981

I am able to install r8125-dkms and I don't experience any problems during compilation of the DKMS package. This is both on linux, linux-zen, linux618-tkg-eevdf, and linux-lts.

vp1981 commented on 2026-01-23 02:41 (UTC)

Hello.

Has anyone encountered any issues with the current r8125-dkms version?

I prepared a package for my colleague and when he tried to install it, an error occurred compiling the file r8125_n.c (the function rtl8125_test_phy_ocp_v5, line 16593, call to rtl8125_set_phy_mcu_8125d_1_efuse). I checked the code, and the function rtl8125_set_phy_mcu_8125d_1_efuse is defined in the “conditionally compiled code” (#ifndef ENABLE_USE_FIRMWARE_FILE), and since dkms.conf defines this variable, an error occurs during compilation.

I managed to resolve the immediate issue with a minor fix.

diff --git a/src/r8125_n.c b/src/r8125_n.c
index 3d77597..7dcc8a9 100755
--- a/src/r8125_n.c
+++ b/src/r8125_n.c
@@ -16589,8 +16589,10 @@ rtl8125_test_phy_ocp_v5(struct rtl8125_private *tp)

         rtl8125_wait_phy_state_ready(tp, HW_PHY_STATUS_INI, 5000000);

+#ifndef ENABLE_USE_FIRMWARE_FILE
         if (tp->mcfg == CFG_METHOD_10)
                 rtl8125_set_phy_mcu_8125d_1_efuse(tp->dev);
+#endif

         rtl8125_set_eth_phy_ocp_bit(tp, 0xA468, BIT_0);

However, I'm still curious if anyone else has faced a similar compilation error.

<deleted-account> commented on 2025-12-05 08:05 (UTC)

thank you for making this dkms package. it is the only working driver for my realtek ethernet controller:

0a: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 driver in use: r8125
   Kernel modules: r8169, r8125

evine commented on 2025-11-18 15:03 (UTC) (edited on 2025-11-20 04:22 (UTC) by evine)

This patch can fix errors that cannot be compiled in kernel 6.17+ for r8125 9.016.01.

--- a/src/r8125_ptp.c
+++ b/src/r8125_ptp.c
@@ -1213,8 +1213,13 @@
         switch (tp->HwSuppPtpVer) {
         case 3:
                 tp->pps_enable = 0;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)
+                hrtimer_setup(&tp->pps_timer, rtl8125_phy_hrtimer_for_pps,
+                              CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+#else
                 hrtimer_init(&tp->pps_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
                 tp->pps_timer.function = rtl8125_phy_hrtimer_for_pps;
+#endif
                 break;
         default:
                 break;

Moonbase59 commented on 2025-08-15 12:21 (UTC)

Realtek just updated to v9.016.01 on 2025-08-15, see https://www.realtek.com/Download/List?cate_id=584.

Seems this driver is still needed for the RTL8125BG, couldn’t find the bg variant in the r8169 kernel sources yet.

starblursd commented on 2025-06-03 01:10 (UTC) (edited on 2025-06-03 01:15 (UTC) by starblursd)

@HurricanePootis so i tried making this patch on my own but the sha256sums didnt pass check (im noob and may have botched it), generated new sha256sums, ran makepkg -si and the build failed resulting in no ethernet... reinstalled the current version to get that back. im curious if the issue im having with steam download speed being up and down is related to the lack of the patch you're bringing up. i have 8125 revision 0c

HurricanePootis commented on 2025-03-18 00:25 (UTC) (edited on 2025-03-18 00:31 (UTC) by HurricanePootis)

@aravance

Hello, in the dkms.conf file, you are calling the Kernel module make directly. This, however, ignores the default flags and features realtek sets in their Makefile. This patch enables the default features set in Makefile, such as Firmware support, Giga Lite, S5 WoL, etc. The r8125-objs has to be manually defined as you cannot add to it like the extra_cflags from dkms.

This patch also makes the license() SPDX compliant.

I have already went through this process with r8168-dkms.

diff --git a/PKGBUILD b/PKGBUILD
index bfc3e4f..71b05bd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,15 +8,15 @@ pkgver=9.015.00
 pkgrel=1
 url="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
 pkgdesc="Kernel module for RTL8125"
-license=('GPL2')
+license=('GPL-2.0-or-later')
 arch=('any')
-depends=('dkms')
+depends=('dkms' 'linux-firmware')
 conflicts=("${_pkgname}")
 optdepends=('linux-headers: Build the module for Arch kernel'
             'linux-lts-headers: Build the module for LTS Arch kernel')
 source=("https://github.com/aravance/${_pkgname}/archive/refs/tags/${pkgver}.tar.gz" 'dkms.conf')
 sha256sums=('351643d8edd59aacdab4a187201ffbb6da474fc1d667d4f55f380434ab8fcd56'
-            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')
+            'fc1a9b4323230713955cfc2cfb9a83607965384d03ee8f1010e190186cdb8433')

 package() {
   dir_name="${_pkgname}-${pkgver}"
diff --git a/dkms.conf b/dkms.conf
index d6b26d9..c6179c3 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -1,6 +1,6 @@
 PACKAGE_NAME="@_PKGNAME@"
 PACKAGE_VERSION="@PKGVER@"
-MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
+MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build EXTRA_CFLAGS='-DCONFIG_SOC_LAN -DENABLE_FIBER_SUPPORT -DCONFIG_ASPM -DENABLE_S5WOL -DENABLE_EEE -DENABLE_TX_NO_CLOSE -DENABLE_USE_FIRMWARE_FILE -DENABLE_GIGA_LITE' r8125-objs='r8125_n.o rtl_eeprom.o rtltool.o r8125_fiber.o r8125_firmware.o' modules"
 CLEAN="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build clean"
 BUILT_MODULE_NAME[0]="@_PKGNAME@"
 DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek"

erdnuesse commented on 2025-01-18 10:43 (UTC) (edited on 2025-01-18 10:44 (UTC) by erdnuesse)

I just said, I have external factors that are responsible. So I'm not even looking at linux/windows systems, but my network as a whole. None of my lxc containers on a different host get dynamic IPs anymore on the relevant VLAN /subnet in question. I didn't go into more detail, bc/ don't wat to hijack this package for my personal troubleshooting as my issue is outside of this package, the aur, even arch - so please no more OT, it's already bad enough as it is.

(if any admin wants me to delete the comments, happy to do so)

actionless commented on 2025-01-18 10:37 (UTC)

erdnuesse 1) what happens if you use r8169 kernel module instead? 2) what happens if you boot to windows? (nowadays you can install it for free without pirating)