Package Details: r8125-dkms 9.009.00-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: ptb
Votes: 6
Popularity: 0.91
First Submitted: 2020-11-21 14:53 (UTC)
Last Updated: 2022-05-05 07:59 (UTC)

Latest Comments

simona commented on 2022-06-23 17:23 (UTC) (edited on 2022-06-23 17:23 (UTC) by simona)

this dkms is now required? or I can use kernel driver.

g749 commented on 2022-06-02 00:48 (UTC)

Add a patch file to make the driver work with 5.18 kernel. Also added linux-zen-headers as optional dependency.

diff --git a/5.18.patch b/5.18.patch
new file mode 100644
index 0000000..d4db6fc
--- /dev/null
+++ b/5.18.patch
@@ -0,0 +1,17 @@
+--- r8125_n.org.c  2022-06-02 01:43:21.746116107 +0200
++++ r8125_n.c  2022-06-02 01:38:14.408257684 +0200
+@@ -11952,11 +11952,11 @@
+ 
+         if ((sizeof(dma_addr_t) > 4) &&
+             use_dac &&
+-            !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
+-            !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
++            !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) &&
++            !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
+                 dev->features |= NETIF_F_HIGHDMA;
+         } else {
+-                rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
++                rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
+                 if (rc < 0) {
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+                         if (netif_msg_probe(tp))
diff --git a/PKGBUILD b/PKGBUILD
index 159f45e..16442c1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@

_pkgname=r8125
pkgname=${_pkgname}-dkms
-pkgver=9.009.00
+pkgver=9.009.01
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"
@@ -12,11 +12,24 @@ 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')
-sha256sums=('1f73d1b84372b82efa091eca5075b34ff622bf7f4385dc16359d1be828f54b14'
-            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')
+            'linux-lts-headers: Build the module for LTS Arch kernel'
+            'linux-zen-headers: Build the module for Arch kernel')
+source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2"
+        'dkms.conf'
+        '5.18.patch')
+sha256sums=('1bfc5b43a98c7b800fce4885d85e8f7eb4a9f3a245fd0f55eb3912634c2a04ff'
+            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f'
+            'b0cbf6d1bc392846c72f479947cf70ec186c4e2c4cd0b6668580eed02aba02ad')
+
+prepare() {
+  dir_name="${_pkgname}-${pkgver}"
+  org_path=`pwd`
+  cd "${dir_name}"/src/
+  patch <"${org_path}"/5.18.patch
+  cd "${org_path}"
+}

package() {
  dir_name="${_pkgname}-${pkgver}"

saitoRS commented on 2022-05-29 02:08 (UTC) (edited on 2022-05-29 02:09 (UTC) by saitoRS)

This stopped working for me after I upgraded to kernel 5.18. The default r8169 driver seems to be working now though, in case anyone else has blacklisted it like I did.

Karlson2k commented on 2022-04-19 11:49 (UTC)

The previous patch is incomplete and not fully correct. The better patch:

Compatibility with Linux Kernel 5.17+.

diff --git a/src/r8125_n.c b/src/r8125_n.c
--- a/src/r8125_n.c
+++ b/src/r8125_n.c
@@ -349,7 +349,7 @@ static int rtl8125_change_mtu(struct net_device *dev, int new_mtu);
 static void rtl8125_down(struct net_device *dev);

 static int rtl8125_set_mac_address(struct net_device *dev, void *p);
-static void rtl8125_rar_set(struct rtl8125_private *tp, uint8_t *addr);
+static void rtl8125_rar_set(struct rtl8125_private *tp, const uint8_t *addr);
 static void rtl8125_desc_addr_fill(struct rtl8125_private *);
 static void rtl8125_tx_desc_init(struct rtl8125_private *tp);
 static void rtl8125_rx_desc_init(struct rtl8125_private *tp);
@@ -1750,7 +1750,13 @@ static void rtl8125_proc_module_init(void)
 static int rtl8125_proc_open(struct inode *inode, struct file *file)
 {
         struct net_device *dev = proc_get_parent_data(inode);
-        int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
+        int (*show)(struct seq_file *, void *) =
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
+            PDE_DATA(inode);
+#else
+            pde_data(inode);
+#endif
+

         return single_open(file, show, dev);
 }
@@ -5234,8 +5240,15 @@ rtl8125_set_ring_size(struct rtl8125_private *tp, u32 rx, u32 tx)
 }

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
 static void rtl8125_get_ringparam(struct net_device *dev,
                                   struct ethtool_ringparam *ring)
+#else
+static void rtl8125_get_ringparam(struct net_device* dev,
+                                  struct ethtool_ringparam* ring,
+                                  struct kernel_ethtool_ringparam* kernel_ring,
+                                  struct netlink_ext_ack* extack)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(dev);

@@ -5245,8 +5258,15 @@ static void rtl8125_get_ringparam(struct net_device *dev,
         ring->tx_pending = tp->tx_ring[0].num_tx_desc;
 }

+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
 static int rtl8125_set_ringparam(struct net_device *dev,
                                  struct ethtool_ringparam *ring)
+#else
+static int rtl8125_set_ringparam(struct net_device* dev,
+                                 struct ethtool_ringparam* ring,
+                                 struct kernel_ethtool_ringparam* kernel_ring,
+                                 struct netlink_ext_ack* extack)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(dev);
         u32 new_rx_count, new_tx_count;
@@ -10889,6 +10909,9 @@ rtl8125_get_mac_address(struct net_device *dev)
         struct rtl8125_private *tp = netdev_priv(dev);
         int i;
         u8 mac_addr[MAC_ADDR_LEN];
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+        u8 addr[ETH_ALEN];
+#endif

         for (i = 0; i < MAC_ADDR_LEN; i++)
                 mac_addr[i] = RTL_R8(tp, MAC0 + i);
@@ -10916,9 +10939,17 @@ rtl8125_get_mac_address(struct net_device *dev)
         rtl8125_rar_set(tp, mac_addr);

         for (i = 0; i < MAC_ADDR_LEN; i++) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
                 dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
                 tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
+#else
+                addr[i] = RTL_R8(tp, MAC0 + i);
+                tp->org_mac_addr[i] = addr[i]; /* keep the original MAC address */
+#endif
         }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
+        eth_hw_addr_set(dev, addr);
+#endif
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
         memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 #endif
@@ -10944,7 +10975,11 @@ rtl8125_set_mac_address(struct net_device *dev,
         if (!is_valid_ether_addr(addr->sa_data))
                 return -EADDRNOTAVAIL;

+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+#else
+        eth_hw_addr_set(dev, addr->sa_data);
+#endif

         rtl8125_rar_set(tp, dev->dev_addr);

@@ -10959,7 +10994,7 @@ rtl8125_set_mac_address(struct net_device *dev,
  *****************************************************************************/
 void
 rtl8125_rar_set(struct rtl8125_private *tp,
-                uint8_t *addr)
+                const uint8_t *addr)
 {
         uint32_t rar_low = 0;
         uint32_t rar_high = 0;

https://github.com/Karlson2k/gentoo/blob/r8125-k5.17-fix/net-misc/r8125/files/r8125-9.008.00-linux-5.17.patch

ede1998 commented on 2022-04-09 16:31 (UTC) (edited on 2022-04-09 16:33 (UTC) by ede1998)

I had the same issue as jiffy1111. For now, I just cloned the repository and installed the driver manually from commit "Update to 9.008.00." (6156e027c127) with:

# on machine with working network drivers: download driver needed for package, see URL in PKGBUILD
curl "http://rtitwww.realtek.com/rtdrivers/cn/nic1/r8125-9.008.00.tar.bz2" -LO
git clone https://aur.archlinux.org/r8125-dkms.git

# on machine missing r8125 driver
cd /path/to/repository/r8125-dkms
cp /path/to/downloaded/driver .
git checkout 6156e027c127af961c89bad600546d234d82ccab
makepkg -si

That's what worked for me till we get an update.

jiffy1111 commented on 2022-04-06 12:52 (UTC) (edited on 2022-04-06 12:52 (UTC) by jiffy1111)

Hi, this update broke an lts kernel

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

~  cat /var/lib/dkms/r8125/9.008.00/build/make.log
DKMS make.log for r8125-9.008.00 for kernel 5.15.32-1-lts (x86_64)
Wed Apr  6 08:44:27 AM EDT 2022
make: Entering directory '/usr/lib/modules/5.15.32-1-lts/build'
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/r8125_n.o
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/rtl_eeprom.o
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/rtltool.o
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In function ‘rtl8125_proc_open’:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:1753:50: error: implicit declaration of function ‘pde_data’ [-Werror=implicit-function-declaration]
 1753 |         int (*show)(struct seq_file *, void *) = pde_data(inode);
      |                                                  ^~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:1753:50: warning: initialization of ‘int (*)(struct seq_file *, void *)’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: At top level:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5243:42: warning: ‘struct kernel_ethtool_ringparam’ declared inside parameter list will not be visible outside of this definition or declaration
 5243 |                                   struct kernel_ethtool_ringparam *kernel_ring,
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5261:42: warning: ‘struct kernel_ethtool_ringparam’ declared inside parameter list will not be visible outside of this definition or declaration
 5261 |                                   struct kernel_ethtool_ringparam *kernel_ring,
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5792:31: error: initialization of ‘void (*)(struct net_device *, struct ethtool_ringparam *)’ from incompatible pointer type ‘void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)’ [-Werror=incompatible-pointer-types]
 5792 |         .get_ringparam      = rtl8125_get_ringparam,
      |                               ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5792:31: note: (near initialization for ‘rtl8125_ethtool_ops.get_ringparam’)
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5793:31: error: initialization of ‘int (*)(struct net_device *, struct ethtool_ringparam *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)’ [-Werror=incompatible-pointer-types]
 5793 |         .set_ringparam      = rtl8125_set_ringparam,
      |                               ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5793:31: note: (near initialization for ‘rtl8125_ethtool_ops.set_ringparam’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:277: /var/lib/dkms/r8125/9.008.00/build/r8125_n.o] Error 1
make: *** [Makefile:1868: /var/lib/dkms/r8125/9.008.00/build] Error 2
make: Leaving directory '/usr/lib/modules/5.15.32-1-lts/build'

shanedav4 commented on 2022-04-03 23:57 (UTC)

Thank You jeker. Your patch worked perfectly and I was able to compile the code from Realtek's page without a problem.

jeker commented on 2022-04-02 09:18 (UTC)

This patch fixes the build errors for Linux 5.17:

--- r8125-9.008.00/src/r8125_n.c        2022-02-24 16:45:51.000000000 +0100
+++ r8125-9.008.00-linux5.17/src/r8125_n.c      2022-04-02 11:12:08.754829003 +0200
@@ -1750,7 +1750,7 @@
 static int rtl8125_proc_open(struct inode *inode, struct file *file)
 {
         struct net_device *dev = proc_get_parent_data(inode);
-        int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
+        int (*show)(struct seq_file *, void *) = pde_data(inode);

         return single_open(file, show, dev);
 }
@@ -5234,8 +5234,15 @@
 }

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
 static void rtl8125_get_ringparam(struct net_device *dev,
                                   struct ethtool_ringparam *ring)
+#else
+static void rtl8125_get_ringparam(struct net_device *dev,
+                                  struct ethtool_ringparam *ring,
+                                  struct kernel_ethtool_ringparam *kernel_ring,
+                                  struct netlink_ext_ack *extack)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(dev);

@@ -5245,8 +5252,15 @@
         ring->tx_pending = tp->tx_ring[0].num_tx_desc;
 }

+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
 static int rtl8125_set_ringparam(struct net_device *dev,
                                  struct ethtool_ringparam *ring)
+#else
+static int rtl8125_set_ringparam(struct net_device *dev,
+                                  struct ethtool_ringparam *ring,
+                                  struct kernel_ethtool_ringparam *kernel_ring,
+                                  struct netlink_ext_ack *extack)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(dev);
         u32 new_rx_count, new_tx_count;
@@ -10889,6 +10903,7 @@
         struct rtl8125_private *tp = netdev_priv(dev);
         int i;
         u8 mac_addr[MAC_ADDR_LEN];
+        u8 addr[ETH_ALEN];

         for (i = 0; i < MAC_ADDR_LEN; i++)
                 mac_addr[i] = RTL_R8(tp, MAC0 + i);
@@ -10916,9 +10931,10 @@
         rtl8125_rar_set(tp, mac_addr);

         for (i = 0; i < MAC_ADDR_LEN; i++) {
-                dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
+                addr[i] = RTL_R8(tp, MAC0 + i);
                 tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
         }
+        eth_hw_addr_set(dev, addr);
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
         memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 #endif

It's lazily cobbled together from similar patches for r8168 and r8125.

darose commented on 2022-04-01 18:23 (UTC)

I switched over to the r8169 module on 3/30 and haven't run into any issues so far.

ptb commented on 2022-04-01 18:18 (UTC)

Sadly I don't have time to have a look at this in the next two weeks. At the moment I'm testing if the r8169 driver is finally working with my network adapter. So far 2.5GbE is working fine without random interruptions, which it did not with the 5.16 kernel. Did anyone notice issues with the r8169 driver and a r8125 network adapter?

shanedav4 commented on 2022-04-01 11:34 (UTC)

Just another person here with no programming experience saying help. The r8125-dkms works fine with Kernel 5.16 but 5.17 totally hoses it. I try this and I also tried downloading the code from Realtek and that didn't work either with 5.17. When you get a chance could you look into this? Maybe we just need to wait for Realtek to update their code for 5.17. Thank You so much for working to provide this for us. I'll unblacklist r8169 for now.

mathes.s commented on 2022-03-30 12:18 (UTC)

I could fix the not working network for me by removing this package and re-enabling the r8169 module. Then the system used the build module directly from the kernel.

So thanks for your efforts in the past to build this package, but I think I no longer need it.

mathes.s commented on 2022-03-30 08:24 (UTC)

Hi, I am also getting build errors. This comes out of the "var/lib/dkms/r8125/9.008.00/build/make.log"



DKMS make.log for r8125-9.008.00 for kernel 5.17.1-arch1-1 (x86_64)
Mi 30. Mär 10:20:05 CEST 2022
make: Verzeichnis „/usr/lib/modules/5.17.1-arch1-1/build“ wird betreten
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/r8125_n.o
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/rtl_eeprom.o
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/rtltool.o
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_proc_open«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:1753:50: Fehler: Implizite Deklaration der Funktion »PDE_DATA«; meinten Sie »NODE_DATA«? [-Werror=implicit-function-declaration]
 1753 |         int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
      |                                                  ^~~~~~~~
      |                                                  NODE_DATA
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:1753:50: Warnung: Initialisierung von »int (*)(struct seq_file *, void *)« von »int« wandelt eine Zahl in einen Zeiger um, ohne explizite Typkonvertierung [-Wint-conversion]
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: Auf höchster Ebene:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5778:31: Fehler: Initialisierung von »void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)« von inkompatiblem Zeigertyp »void (*)(struct net_device *, struct ethtool_ringparam *)« [-Werror=incompatible-pointer-types]
 5778 |         .get_ringparam      = rtl8125_get_ringparam,
      |                               ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5778:31: Anmerkung: (nahe der Initialisierung für »rtl8125_ethtool_ops.get_ringparam«)
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5779:31: Fehler: Initialisierung von »int (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)« von inkompatiblem Zeigertyp »int (*)(struct net_device *, struct ethtool_ringparam *)« [-Werror=incompatible-pointer-types]
 5779 |         .set_ringparam      = rtl8125_set_ringparam,
      |                               ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5779:31: Anmerkung: (nahe der Initialisierung für »rtl8125_ethtool_ops.set_ringparam«)
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_get_mac_address«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10919:34: Fehler: Zuweisung der schreibgeschützten Speicherstelle »*(dev->dev_addr + (sizetype)i)«
10919 |                 dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
      |                                  ^
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_set_mac_address«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10947:19: Warnung: Übergabe des Arguments 1 von »memcpy« entfernt Kennzeichner »const« von Zeiger-Ziel-Typ [-Wdiscarded-qualifiers]
10947 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |                ~~~^~~~~~~~~~
In Datei, eingebunden von ./include/linux/string.h:253,
                 von ./include/linux/bitmap.h:11,
                 von ./include/linux/cpumask.h:12,
                 von ./arch/x86/include/asm/cpumask.h:5,
                 von ./arch/x86/include/asm/msr.h:11,
                 von ./arch/x86/include/asm/processor.h:22,
                 von ./arch/x86/include/asm/timex.h:5,
                 von ./include/linux/timex.h:65,
                 von ./include/linux/time32.h:13,
                 von ./include/linux/time.h:60,
                 von ./include/linux/stat.h:19,
                 von ./include/linux/module.h:13,
                 von /var/lib/dkms/r8125/9.008.00/build/r8125_n.c:39:
./include/linux/fortify-string.h:212:37: Anmerkung: »void *« erwartet, aber Argument hat Typ »const unsigned char *«
  212 | __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
      |                               ~~~~~~^
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10949:32: Warnung: Übergabe des Arguments 2 von »rtl8125_rar_set« entfernt Kennzeichner »const« von Zeiger-Ziel-Typ [-Wdiscarded-qualifiers]
10949 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:352:66: Anmerkung: »uint8_t *« {alias »unsigned char *«} erwartet, aber Argument hat Typ »const unsigned char *«
  352 | static void rtl8125_rar_set(struct rtl8125_private *tp, uint8_t *addr);
      |                                                         ~~~~~~~~~^~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_resume«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:15582:32: Warnung: Übergabe des Arguments 2 von »rtl8125_rar_set« entfernt Kennzeichner »const« von Zeiger-Ziel-Typ [-Wdiscarded-qualifiers]
15582 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10962:26: Anmerkung: »uint8_t *« {alias »unsigned char *«} erwartet, aber Argument hat Typ »const unsigned char *«
10962 |                 uint8_t *addr)
      |                 ~~~~~~~~~^~~~
cc1: Einige Warnungen werden als Fehler behandelt
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/r8125/9.008.00/build/r8125_n.o] Fehler 1
make: *** [Makefile:1831: /var/lib/dkms/r8125/9.008.00/build] Fehler 2
make: Verzeichnis „/usr/lib/modules/5.17.1-arch1-1/build“ wird verlassen


darose commented on 2022-03-29 21:57 (UTC)

I'm getting build errors on kernel 5.17.1

ptb commented on 2021-11-14 15:16 (UTC) (edited on 2021-11-14 15:16 (UTC) by ptb)

@fierce_brake My link is currently full duplex 2,5 GBit/s. I would assume your cable is damaged 100 MBit/s requires 4 wires and >1000 GBit/s requires 8 wires in your Ethernet cable.

fierce_brake commented on 2021-11-14 14:47 (UTC)

Greetings everyone!

anyone unable to go 1000 full duplex ?

in my case the NIC will only connect at 100 full duplex. If i try to force it to 1000 full duplex it will simply fail to connect to the router.

johntdavis commented on 2021-03-02 18:39 (UTC)

@ptb Thanks! I've deleted my comment. I don't even know how I ended up posting it here.

ptb commented on 2021-03-02 16:33 (UTC)

@johntdavis I don't think you intended to write the comment to this package, sounds more like https://aur.archlinux.org/packages/r8152-dkms/ .

aravance commented on 2020-11-24 16:46 (UTC) (edited on 2020-11-24 18:24 (UTC) by aravance)

I found one more potential bug fiddling with another dkms package (similar comment here: https://aur.archlinux.org/packages/it87-dkms-git). I also updated it to use my own github fork with an explicit release rather than relying on the master branch of ibmibmibm's repo.

According to https://linux.die.net/man/8/dkms

DEST_MODULE_LOCATION[#]=

This directive specifies the destination where a module should be installed to, once compiled. It also is used for finding original_modules. This is a required directive, except as noted below. This directive must start with the text "/kernel" which is in reference to /lib/modules/<kernelversion>/kernel.
...

This git diff will address that:

EDIT: fix a bad reference to master

```diff
index d7de73c..6608080 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
 _pkgname=r8125
 pkgname=${_pkgname}-dkms
 pkgver=9.004.01
-pkgrel=4
+pkgrel=5
 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')
@@ -14,14 +14,14 @@ depends=('dkms')
 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/ibmibmibm/r8125/archive/master.tar.gz" 'dkms.conf')
-sha256sums=('c25ec4ea817bd00108b023afbc19383ea177c042e6ee52c8c386c17615bb9b98'
-            '8a10787ee95ef4279408dc9711c23863926a8e6b9081161b47f56b78b0c54a9f')
+source=("https://github.com/aravance/${_pkgname}/archive/${pkgver}.tar.gz" 'dkms.conf')
+sha256sums=('00ed124510ccf7bcaa6972a2e3ce527c83aa9f6aa35a4d23abbb61b6916f60cb'
+            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')

 package() {
   dir_name="${_pkgname}-${pkgver}"
   install -d "${pkgdir}"/usr/src/${dir_name}/
-  install -Dm644 dkms.conf "${_pkgname}-master"/src/* "${pkgdir}/usr/src/${dir_name}/"
+  install -Dm644 dkms.conf "${_pkgname}-${pkgver}"/src/* "${pkgdir}/usr/src/${dir_name}/"

   sed -e "s/@_PKGNAME@/${_pkgname}/g" \
       -e "s/@PKGVER@/${pkgver}/g" \
diff --git a/dkms.conf b/dkms.conf
index 74b22d8..d6b26d9 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -3,5 +3,5 @@ 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]="/extramodules"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek"
 AUTOINSTALL="yes"

```

aravance commented on 2020-11-23 15:52 (UTC) (edited on 2020-11-23 15:59 (UTC) by aravance)

I have 3 kernels installed, linux, zen, and lts. Whenever it triggers a dkms reinstall, it fails on the first attempt. This is what I did to fix it:

EDIT: I also downloaded the bz2 directly from the realtek website and copied it into the build directory. It could make sense to do it from a git repo instead.

PKGBUILD
_pkgbase=r8125
pkgname=r8125-dkms
pkgver=9.004.01
pkgrel=1
pkgdesc="r8125 kernel driver sources for linux"
depends=('dkms')
makedepends=(sed)
optdepends=('linux-headers: Build the module for Arch kernel'
            'linux-lts-headers: Build the module for LTS Arch kernel'
            'linux-zen-headers: Build the module for ZEN Arch kernel')
provides=("${_pkgbase}")
conflicts=("${_pkgbase}")
arch=('x86_64')
url="https://www.realtek.com/"
license=('GPL2')
source=("$_pkgbase-$pkgver.tar.bz2"
        'dkms.conf')
sha256sums=('6885485e09b5cf9fdb1ae1d1763f095f1c13566b88cde7d120c8c59baadad090'
            'd4efb0d51aa56b9b2c04d91be8d43866506a155965a5437fe458c4221003fd50')

package() {
  install -d "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
  install -Dm644 "${srcdir}"/$_pkgbase-$pkgver/src/* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/

  install -Dm644 "${srcdir}"/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  sed -e "s/@_PKGBASE@/${_pkgbase}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
}
dkms.conf
PACKAGE_NAME="@_PKGBASE@"
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]="@_PKGBASE@"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek"
AUTOINSTALL="yes"

ptb commented on 2020-11-21 15:30 (UTC)

If somebody has an idea why dkms autoinstall/install needs to be executed twice let me know.