Package Details: r8125-dkms 9.013.02-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: 16
Popularity: 0.69
First Submitted: 2020-11-21 14:53 (UTC)
Last Updated: 2024-04-07 19:01 (UTC)

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

1 2 3 4 Next › Last »

aravance commented on 2024-04-07 19:10 (UTC)

I've copied the source code into my own github so it can be distributed using github release source tarballs. You should be able to build directly again without having to do a manual download through the realtek presigned url.

eskimokk commented on 2024-04-01 08:23 (UTC) (edited on 2024-04-07 06:58 (UTC) by eskimokk)

follow the steps manually:

0. install pre-requirements like dkms, linux-headers...

  1. git clone https://aur.archlinux.org/r8125-dkms.git

  2. cd r8125-dkms download the source code here (https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software) and put it under this dir.

  3. edit PKGBUILD change the line from: source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2" to source=("${_pkgname}-${pkgver}.tar.bz2"

  4. makepkg -si

  5. exec by root: echo "blacklist r8169" >> /etc/modprobe.d/dkms.conf

  6. reboot

  7. check by: ethtool -i YOUR_DEV

devome commented on 2024-03-20 04:46 (UTC)

@barand3 , The official website of REALTEK has enabled pre download verification, and you can go here to download the source code and place it in the root directory of the package.

barand3 commented on 2024-02-07 14:37 (UTC) (edited on 2024-02-07 14:42 (UTC) by barand3)

The installation cannot be carried out because the download url is invalid.

curl: (22) The requested URL returned error: 404
==> FEHLER: Fehler beim Download von http://rtitwww.realtek.com/rtdrivers/cn/nic1/r8125-9.012.04.tar.bz2
Breche ab...
-> Fehler beim Erstellen: r8125-dkms-exit status 1
-> Die folgenden Pakete konnten nicht installiert werden. Ein manueller Eingriff ist erforderlich:
r8125-dkms - exit status 1
PAKtC

boogiepop commented on 2023-08-31 20:30 (UTC)

@aravance.

I need this driver for radxa rock5b SBC. It is using an older vendor kenel based on linux 5.10. For linux < 5.12 the module needs below patch. Could you please apply?

https://raw.githubusercontent.com/radxa-pkg/r8125-dkms/debian/sid/debian/patches/linux5.12.patch

xiuxiu10201 commented on 2023-04-13 03:18 (UTC) (edited on 2023-04-13 03:19 (UTC) by xiuxiu10201)

Throughput monitoring issue

https://github.com/awesometic/realtek-r8125-dkms/issues/33

Ran into the same problem.

stratusfear commented on 2023-01-20 04:43 (UTC)

To match the original functionality from <6.1, the patch should probably change the function from netif_napi_add to netif_napi_add_weight rather than remove the weight parameter. The api was changed in 6.1 to generalize the netif_napi_add function (by removing the weight parameter) and the netif_napi_add_weight function was added in its place for calls where a weight is required/desired.

diff --git 1/6.1.patch 2/6.1.patch
new file mode 100644
index 0000000..da9f9ea
--- /dev/null
+++ 2/6.1.patch
@@ -0,0 +1,15 @@
+diff -Naur r8125-9.011.00-a/src/r8125.h r8125-9.011.00-b/src/r8125.h
+--- r8125-9.011.00-a/src/r8125.h
++++ r8125-9.011.00-b/src/r8125.h
+@@ -676,7 +676,11 @@
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
++#else
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add_weight(ndev, &priv->napi, function, weight)
++#endif
+ #define RTL_NAPI_QUOTA(budget, ndev)            min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct)        container_of(stuct_ptr, priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr)            struct net_device *dev = priv_ptr->dev;

atk commented on 2023-01-17 18:30 (UTC) (edited on 2023-01-17 18:30 (UTC) by atk)

With modifications I got bundi78's patch working. The area that caused me some grief was:

+diff -Naur r8125-9.011.00-a/src/r8125.h r8125-9.011.00-b/src/r8125.h
+--- r8125-9.011.00-a/src/r8125.h
++++ r8125-9.011.00-b/src/r8125.h

Are the -a and -b suffixes meant to be included? Removing them (and then skipping the sha256 check) meant I could build and install this. Thanks for doing posting it!

bundi78 commented on 2023-01-17 17:57 (UTC)

Hi, the following patch is working:

diff --git i/PKGBUILD w/PKGBUILD
index 2638681..2408b1e 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -3,22 +3,27 @@
 # Contributor: Shen-Ta Hsieh <ibmibmibm(at)gmail(dot)com>

 _pkgname=r8125
 pkgname=${_pkgname}-dkms
 pkgver=9.011.00
-pkgrel=1
+pkgrel=2
 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')
 arch=('any')
 depends=('dkms')
 conflicts=("${_pkgname}")
 optdepends=('linux-headers: Build the module for Arch kernel'
             'linux-lts-headers: Build the module for LTS Arch kernel')
-source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2" 'dkms.conf')
+source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2" 'dkms.conf' '6.1.patch')
 sha256sums=('01fbdb249b7ba2984df93a4bd11aecddd1ed904c6be10fc5d776e94b3110b2bf'
-            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')
+            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f'
+            '093bee6237012ec1d24fdaaf385a1b17f485e44a2150f8eb2e84e2211e5bfd00')
+
+prepare() {
+  patch -p0 < 6.1.patch
+}

 package() {
   dir_name="${_pkgname}-${pkgver}"
   install -d "${pkgdir}"/usr/src/${dir_name}/
   install -Dm644 dkms.conf "${dir_name}"/src/* "${pkgdir}/usr/src/${dir_name}/"
diff --git 1/6.1.patch 2/6.1.patch
new file mode 100644
index 0000000..da9f9ea
--- /dev/null
+++ 2/6.1.patch
@@ -0,0 +1,15 @@
+diff -Naur r8125-9.011.00-a/src/r8125.h r8125-9.011.00-b/src/r8125.h
+--- r8125-9.011.00-a/src/r8125.h
++++ r8125-9.011.00-b/src/r8125.h
+@@ -676,7 +676,11 @@
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
++#else
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function)
++#endif
+ #define RTL_NAPI_QUOTA(budget, ndev)            min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct)        container_of(stuct_ptr, priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr)            struct net_device *dev = priv_ptr->dev;

AlmaMater commented on 2023-01-14 08:55 (UTC) (edited on 2023-01-14 09:02 (UTC) by AlmaMater)

Greetings, there are issues for linux (6.1.5.arch2-1) and linux-zen (6.1.5.zen2-1) kernels

==> dkms install --no-depmod r8125/9.009.02 -k 6.1.5-arch2-1
Error! Bad return status for module build on kernel: 6.1.5-arch2-1 (x86_64)
Consult /var/lib/dkms/r8125/9.009.02/build/make.log for more information.
==> WARNING: `dkms install --no-depmod r8125/9.009.02 -k 6.1.5-arch2-1' exited 10
==> dkms install --no-depmod r8125/9.009.02 -k 6.1.5-zen2-1-zen
Error! Bad return status for module build on kernel: 6.1.5-zen2-1-zen (x86_64)
Consult /var/lib/dkms/r8125/9.009.02/build/make.log for more information.
==> WARNING: `dkms install --no-depmod r8125/9.009.02 -k 6.1.5-zen2-1-zen' exited 10

make.log

DKMS make.log for r8125-9.011.00 for kernel 6.1.5-arch2-1 (x86_64)
Sat 14 Jan 09:54:09 CET 2023
make: Entering directory '/usr/lib/modules/6.1.5-arch2-1/build'
  CC [M]  /var/lib/dkms/r8125/9.011.00/build/r8125_n.o
  CC [M]  /var/lib/dkms/r8125/9.011.00/build/rtl_eeprom.o
  CC [M]  /var/lib/dkms/r8125/9.011.00/build/rtltool.o
In file included from /var/lib/dkms/r8125/9.011.00/build/r8125_n.c:83:
/var/lib/dkms/r8125/9.011.00/build/r8125_n.c: In function ‘rtl8125_init_napi’:
/var/lib/dkms/r8125/9.011.00/build/r8125.h:679:57: error: too many arguments to function ‘netif_napi_add’
  679 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
      |                                                         ^~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.011.00/build/r8125_n.c:13776:17: note: in expansion of macro ‘RTL_NAPI_CONFIG’
13776 |                 RTL_NAPI_CONFIG(tp->dev, r8125napi, poll, R8125_NAPI_WEIGHT);
      |                 ^~~~~~~~~~~~~~~
In file included from /var/lib/dkms/r8125/9.011.00/build/r8125_n.c:42:
./include/linux/netdevice.h:2569:1: note: declared here
 2569 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:250: /var/lib/dkms/r8125/9.011.00/build/r8125_n.o] Error 1
make: *** [Makefile:1992: /var/lib/dkms/r8125/9.011.00/build] Error 2
make: Leaving directory '/usr/lib/modules/6.1.5-arch2-1/build'

It does works for linux-lts 5.15.87