Package Details: r8125-dkms 9.014.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: 16
Popularity: 0.23
First Submitted: 2020-11-21 14:53 (UTC)
Last Updated: 2024-11-08 20:45 (UTC)

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

powerLien commented on 2024-08-14 05:44 (UTC) (edited on 2024-08-14 05:45 (UTC) by powerLien)

@barand3

Copy everything in the code block and save it as a text file with the extension .patch. Then run

patch /path/to/file/r8125_n.c yourfile.patch

where /path/to/file is most likely going to be /usr/src/r8125-<version>.

Then regenerate your kernel and you should be good to go.

barand3 commented on 2024-08-08 09:27 (UTC) (edited on 2024-08-08 09:32 (UTC) by barand3)

@devome, a stupid question, how do I apply this patch? he asks me for a file to patch

actionless commented on 2024-07-07 17:01 (UTC)

i forgot to mention the problem because of which i actually started looking into it :)

i have such systemd link config:

$ cat /etc/systemd/network/50-wired.link
[Match]
OriginalName=eno1

[Link]
NamePolicy=kernel database onboard slot path
AutoNegotiation=no
Duplex=full
BitsPerSecond=1G

and with both stock r8169 and this custom-built module i see this in boot logs:

(udev-worker)[434]: eno1: Could not disable auto negotiation, ignoring: Invalid argument
(udev-worker)[434]: eno1: Could not set speed to 1000Mbps, ignoring: Invalid argument
(udev-worker)[434]: eno1: Could not set duplex to full, ignoring: Invalid argument

actionless commented on 2024-07-07 16:49 (UTC) (edited on 2024-07-07 16:50 (UTC) by actionless)

also it seems that the readme is from extremely old version of the module (or even the module for another controller),

because documented kernel parameters are not recognized,

and advertise numbers not match between readme and actual code of the module

actionless commented on 2024-07-07 16:27 (UTC)

upstream url is dead, the new url should be:

https://www.realtek.com/Download/List?cate_id=584

or

https://www.realtek.com/Download/ToDownload?type=direct&downloadid=3763

Korialo commented on 2024-06-12 19:02 (UTC)

@devome Thanks for the patch.

evine commented on 2024-06-12 10:54 (UTC) (edited on 2024-07-24 01:42 (UTC) by evine)

Referring to r8168-dkms, I wrote a patch and it can be compiled now.

--- a/src/r8125_n.c
+++ b/src/r8125_n.c
@@ -7478,7 +7478,11 @@
 }

 static int
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata)
+#else
 rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(net);
         struct ethtool_eee *eee = &tp->eee;
@@ -7511,9 +7515,15 @@

         edata->eee_enabled = !!val;
         edata->eee_active = !!(supported & adv & lp);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+        ethtool_convert_legacy_u32_to_link_mode(edata->supported, supported);
+        ethtool_convert_legacy_u32_to_link_mode(edata->advertised, adv);
+        ethtool_convert_legacy_u32_to_link_mode(edata->lp_advertised, lp);
+#else
         edata->supported = supported;
         edata->advertised = adv;
         edata->lp_advertised = lp;
+#endif
         edata->tx_lpi_enabled = edata->eee_enabled;
         edata->tx_lpi_timer = tx_lpi_timer;

@@ -7521,11 +7531,18 @@
 }

 static int
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata)
+#else
 rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(net);
         struct ethtool_eee *eee = &tp->eee;
         u64 advertising;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+        u32 adv;
+#endif
         int rc = 0;

         if (!HW_HAS_WRITE_PHY_MCU_RAM_CODE(tp) ||
@@ -7557,6 +7574,18 @@
         */

         advertising = tp->advertising;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+        ethtool_convert_link_mode_to_legacy_u32(&adv, edata->advertised);
+        if (linkmode_empty(edata->advertised)) {
+                adv = advertising & eee->supported;
+                ethtool_convert_legacy_u32_to_link_mode(edata->advertised, adv);
+        } else if (!linkmode_empty(edata->advertised) & ~advertising) {
+                dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of autoneg advertised speeds %llu\n",
+                           adv, advertising);
+                rc = -EINVAL;
+                goto out;
+        }
+#else
         if (!edata->advertised) {
                 edata->advertised = advertising & eee->supported;
         } else if (edata->advertised & ~advertising) {
@@ -7565,13 +7594,23 @@
                 rc = -EINVAL;
                 goto out;
         }
+#endif

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+        if (!linkmode_empty(edata->advertised) & ~eee->supported) {
+                dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
+                           adv, eee->supported);
+                rc = -EINVAL;
+                goto out;
+        }
+#else
         if (edata->advertised & ~eee->supported) {
                 dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
                            edata->advertised, eee->supported);
                 rc = -EINVAL;
                 goto out;
         }
+#endif

         //tp->eee.eee_enabled = edata->eee_enabled;
         //tp->eee_adv_t = ethtool_adv_to_mmd_eee_adv_t(edata->advertised);
@@ -7579,7 +7618,11 @@
         dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE tx_lpi_timer %x must be a subset of support %x\n",
                    edata->tx_lpi_timer, eee->tx_lpi_timer);

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+        ethtool_convert_link_mode_to_legacy_u32(&eee->advertised, edata->advertised);
+#else
         eee->advertised = edata->advertised;
+#endif
         //eee->tx_lpi_enabled = edata->tx_lpi_enabled;
         //eee->tx_lpi_timer = edata->tx_lpi_timer;
         eee->eee_enabled = edata->eee_enabled;

PsiTrax commented on 2024-05-30 16:36 (UTC)

As suggest in Reddit:

  • Removed all of r8125-dkms, r8168-dkms, r8168
  • Removed r8169 module blacklisting (/etc/modprobe.d)

Tried sudo modprobe r8169 but system hangs / freezes

A simple reboot did the trick and it seems to work with r8169 now.

https://www.reddit.com/r/archlinux/comments/1cus8x4/comment/l5ozd5n/

tfl5034 commented on 2024-05-25 22:32 (UTC)

According to realtek documentation, this module only supports up to Linux 6.8. https://www.realtek.com/Download/List?cate_id=584