Issue with RTL8125 Ethernet driver on Manjaro Linux

Hello everyone,

I’m facing an issue with the RTL8125 Ethernet driver on my Manjaro Linux system. I have tried installing the driver using the AUR package r8125-dkms, but it doesn’t seem to load properly, and the Ethernet interface isn’t working.

Here’s an overview of the situation:

  • I have installed the r8125-dkms driver version 9.013.02 on Manjaro Linux with kernel 6.9.5-1-MANJARO (x86_64).
  • The driver appears to be installed correctly according to dkms status, but it does not show up in lsmod output.
  • I checked the build log (/var/lib/dkms/r8125/9.013.02/build/make.log) and found errors related to incompatible pointers in the r8125_n.c file.

I have tried blacklisting the previous r8169 driver and reinstalling the r8125 driver multiple times without success. Even after rebooting, the driver doesn’t seem to be active.

I kindly ask for your help in resolving this issue. Do you have any suggestions on how I can get the r8125 driver to work properly?

Thank you in advance for your assistance!

Hi @Awhitewall,

See

There is a section for Manjaro.

Hope this helps!

My bad. Never mind.

Note:

Since this isn’t the -dkms package, you’ll have to rebuild it after each kernel upgrade.

so far everything is ok:
$ sudo pacman -Syyu
$ sudo pacman -Sy base-devel
$ sudo pacman -S $(pacman -Qsq “^linux” | grep “^linux[0-9][-rt]$” | awk ‘{print $1"-headers"}’ ORS=’ ')
$reboot

$ git clone GitHub - kac89/r8125: Archlinux/Manjaro Ethernet Driver for Odroid H2 Plus RTL8125B chipset
$ cd r8125

in this command (makepkg) the output is as follows:

makepkg                                       ✔ 
==> Creazione del pacchetto: r8125 9.003.05-0 (dom 14 lug 2024, 12:41:50)
==> Controllo delle dipendenze durante l'avvio in corso...
==> Controllo delle dipendenze durante la compilazione in corso...
==> Download dei sorgenti in corso...
  -> Download di 9.003.05.tar.gz in corso...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 88475    0 88475    0     0   106k      0 --:--:-- --:--:-- --:--:--  106k
  -> È stato trovato dkms.conf
==> Validazione di source file con sha256sums...
    9.003.05.tar.gz ... Verificato
    dkms.conf ... Verificato
==> Estrazione dei sorgenti in corso...
  -> Estrazione di 9.003.05.tar.gz usando bsdtar in corso...
==> Avvio di build() in corso...
make: ingresso nella directory «/usr/lib/modules/6.9.5-1-MANJARO/build»
  CC [M]  /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.o
  CC [M]  /home/davide/r8125/src/r8125-9.003.05/src/rtl_eeprom.o
/home/davide/r8125/src/r8125-9.003.05/src/rtl_eeprom.c:95:5: warning: no previous prototype for ‘rtl8125_eeprom_cmd_done’ [-Wmissing-prototypes]
   95 | int rtl8125_eeprom_cmd_done(struct rtl8125_private *tp)
      |     ^~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/davide/r8125/src/r8125-9.003.05/src/rtltool.o
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_proc_open’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1393:50: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Wimplicit-function-declaration]
 1393 |         int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
      |                                                  ^~~~~~~~
      |                                                  NODE_DATA
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1393:50: error: initialization of ‘int (*)(struct seq_file *, void *)’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: At top level:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1756:6: warning: no previous prototype for ‘ClearEthPhyOcpBit’ [-Wmissing-prototypes]
 1756 | void ClearEthPhyOcpBit(struct rtl8125_private *tp, u16 addr, u16 mask)
      |      ^~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1765:6: warning: no previous prototype for ‘SetEthPhyOcpBit’ [-Wmissing-prototypes]
 1765 | void SetEthPhyOcpBit(struct rtl8125_private *tp,  u16 addr, u16 mask)
      |      ^~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1809:1: warning: no previous prototype for ‘ClearAndSetMcuAccessRegBit’ [-Wmissing-prototypes]
 1809 | ClearAndSetMcuAccessRegBit(
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1825:1: warning: no previous prototype for ‘ClearMcuAccessRegBit’ [-Wmissing-prototypes]
 1825 | ClearMcuAccessRegBit(
      | ^~~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1839:1: warning: no previous prototype for ‘SetMcuAccessRegBit’ [-Wmissing-prototypes]
 1839 | SetMcuAccessRegBit(
      | ^~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4695:20: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Wincompatible-pointer-types]
 4695 |         .get_eee = rtl_ethtool_get_eee,
      |                    ^~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4695:20: note: (near initialization for ‘rtl8125_ethtool_ops.get_eee’)
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4696:20: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Wincompatible-pointer-types]
 4696 |         .set_eee = rtl_ethtool_set_eee,
      |                    ^~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4696:20: note: (near initialization for ‘rtl8125_ethtool_ops.set_eee’)
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_get_mac_address’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9130:34: error: assignment of read-only location ‘*(dev->dev_addr + (sizetype)i)’
 9130 |                 dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
      |                                  ^
In file included from ./include/linux/string.h:369,
                 from ./include/linux/bitmap.h:13,
                 from ./include/linux/cpumask.h:13,
                 from ./arch/x86/include/asm/paravirt.h:21,
                 from ./arch/x86/include/asm/cpuid.h:62,
                 from ./arch/x86/include/asm/processor.h:19,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:38:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_set_mac_address’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:19: warning: passing argument 1 of ‘__builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |                ~~~^~~~~~~~~~
./include/linux/fortify-string.h:633:27: note: in definition of macro ‘__fortify_memcpy_chk’
  633 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:9: note: in expansion of macro ‘memcpy’
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |         ^~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:19: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |                ~~~^~~~~~~~~~
./include/linux/fortify-string.h:633:27: note: in definition of macro ‘__fortify_memcpy_chk’
  633 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:9: note: in expansion of macro ‘memcpy’
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |         ^~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9163:32: warning: passing argument 2 of ‘rtl8125_rar_set’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 9163 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:293:66: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
  293 | static void rtl8125_rar_set(struct rtl8125_private *tp, uint8_t *addr);
      |                                                         ~~~~~~~~~^~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_init_board’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10061:14: error: implicit declaration of function ‘pci_set_dma_mask’ [-Wimplicit-function-declaration]
10061 |             !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
      |              ^~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10062:14: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Wimplicit-function-declaration]
10062 |             !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:82:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_init_one’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125.h:543:57: error: too many arguments to function ‘netif_napi_add’
  543 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
      |                                                         ^~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10427:9: note: in expansion of macro ‘RTL_NAPI_CONFIG’
10427 |         RTL_NAPI_CONFIG(dev, tp, rtl8125_poll, R8125_NAPI_WEIGHT);
      |         ^~~~~~~~~~~~~~~
In file included from /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:41:
./include/linux/netdevice.h:2631:1: note: declared here
 2631 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10458:17: error: implicit declaration of function ‘netif_set_gso_max_size’; did you mean ‘netif_set_tso_max_size’? [-Wimplicit-function-declaration]
10458 |                 netif_set_gso_max_size(dev, LSO_64K);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
      |                 netif_set_tso_max_size
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘r8125_csum_workaround’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:11844:24: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘skb_gso_reset’? [-Wimplicit-function-declaration]
11844 |                 segs = skb_gso_segment(skb, features);
      |                        ^~~~~~~~~~~~~~~
      |                        skb_gso_reset
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:11844:22: error: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
11844 |                 segs = skb_gso_segment(skb, features);
      |                      ^
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_rx_interrupt’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:12237:57: warning: the comparison will always evaluate as ‘false’ for the address of ‘Rx_skbuff’ will never be NULL [-Waddress]
12237 |         if ((tp->RxDescArray == NULL) || (tp->Rx_skbuff == NULL))
      |                                                         ^~
/home/davide/r8125/src/r8125-9.003.05/src/r8125.h:1506:25: note: ‘Rx_skbuff’ declared here
 1506 |         struct sk_buff *Rx_skbuff[NUM_RX_DESC]; /* Rx data buffers */
      |                         ^~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_resume’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:12717:32: warning: passing argument 2 of ‘rtl8125_rar_set’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
12717 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9178:26: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
 9178 |                 uint8_t *addr)
      |                 ~~~~~~~~~^~~~
make[2]: *** [scripts/Makefile.build:244: /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.o] Error 1
make[2]: *** Attesa per i processi non terminati....
make[1]: *** [/usr/lib/modules/6.9.5-1-MANJARO/build/Makefile:1918: /home/davide/r8125/src/r8125-9.003.05/src] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: uscita dalla directory «/usr/lib/modules/6.9.5-1-MANJARO/build»
==> ERRORE: Si è verificato un errore in build().

thanks for the help

:bangbang::bangbang:

Since your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

(I can’t make heads or tails out there.)

sorry.


 LC_ALL=C makepkg                              ✔ 
==> Making package: r8125 9.003.05-0 (Sun Jul 14 13:11:45 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading 9.003.05.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 88475    0 88475    0     0   111k      0 --:--:-- --:--:-- --:--:-- 1083k
  -> Found dkms.conf
==> Validating source files with sha256sums...
    9.003.05.tar.gz ... Passed
    dkms.conf ... Passed
==> Extracting sources...
  -> Extracting 9.003.05.tar.gz with bsdtar
==> Starting build()...
make: Entering directory '/usr/lib/modules/6.9.5-1-MANJARO/build'
  CC [M]  /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.o
  CC [M]  /home/davide/r8125/src/r8125-9.003.05/src/rtl_eeprom.o
/home/davide/r8125/src/r8125-9.003.05/src/rtl_eeprom.c:95:5: warning: no previous prototype for ‘rtl8125_eeprom_cmd_done’ [-Wmissing-prototypes]
   95 | int rtl8125_eeprom_cmd_done(struct rtl8125_private *tp)
      |     ^~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/davide/r8125/src/r8125-9.003.05/src/rtltool.o
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_proc_open’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1393:50: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Wimplicit-function-declaration]
 1393 |         int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
      |                                                  ^~~~~~~~
      |                                                  NODE_DATA
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1393:50: error: initialization of ‘int (*)(struct seq_file *, void *)’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: At top level:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1756:6: warning: no previous prototype for ‘ClearEthPhyOcpBit’ [-Wmissing-prototypes]
 1756 | void ClearEthPhyOcpBit(struct rtl8125_private *tp, u16 addr, u16 mask)
      |      ^~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1765:6: warning: no previous prototype for ‘SetEthPhyOcpBit’ [-Wmissing-prototypes]
 1765 | void SetEthPhyOcpBit(struct rtl8125_private *tp,  u16 addr, u16 mask)
      |      ^~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1809:1: warning: no previous prototype for ‘ClearAndSetMcuAccessRegBit’ [-Wmissing-prototypes]
 1809 | ClearAndSetMcuAccessRegBit(
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1825:1: warning: no previous prototype for ‘ClearMcuAccessRegBit’ [-Wmissing-prototypes]
 1825 | ClearMcuAccessRegBit(
      | ^~~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:1839:1: warning: no previous prototype for ‘SetMcuAccessRegBit’ [-Wmissing-prototypes]
 1839 | SetMcuAccessRegBit(
      | ^~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4695:20: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Wincompatible-pointer-types]
 4695 |         .get_eee = rtl_ethtool_get_eee,
      |                    ^~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4695:20: note: (near initialization for ‘rtl8125_ethtool_ops.get_eee’)
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4696:20: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Wincompatible-pointer-types]
 4696 |         .set_eee = rtl_ethtool_set_eee,
      |                    ^~~~~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:4696:20: note: (near initialization for ‘rtl8125_ethtool_ops.set_eee’)
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_get_mac_address’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9130:34: error: assignment of read-only location ‘*(dev->dev_addr + (sizetype)i)’
 9130 |                 dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
      |                                  ^
In file included from ./include/linux/string.h:369,
                 from ./include/linux/bitmap.h:13,
                 from ./include/linux/cpumask.h:13,
                 from ./arch/x86/include/asm/paravirt.h:21,
                 from ./arch/x86/include/asm/cpuid.h:62,
                 from ./arch/x86/include/asm/processor.h:19,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:38:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_set_mac_address’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:19: warning: passing argument 1 of ‘__builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |                ~~~^~~~~~~~~~
./include/linux/fortify-string.h:633:27: note: in definition of macro ‘__fortify_memcpy_chk’
  633 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:9: note: in expansion of macro ‘memcpy’
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |         ^~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:19: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |                ~~~^~~~~~~~~~
./include/linux/fortify-string.h:633:27: note: in definition of macro ‘__fortify_memcpy_chk’
  633 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9161:9: note: in expansion of macro ‘memcpy’
 9161 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |         ^~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9163:32: warning: passing argument 2 of ‘rtl8125_rar_set’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 9163 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:293:66: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
  293 | static void rtl8125_rar_set(struct rtl8125_private *tp, uint8_t *addr);
      |                                                         ~~~~~~~~~^~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_init_board’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10061:14: error: implicit declaration of function ‘pci_set_dma_mask’ [-Wimplicit-function-declaration]
10061 |             !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
      |              ^~~~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10062:14: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Wimplicit-function-declaration]
10062 |             !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:82:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_init_one’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125.h:543:57: error: too many arguments to function ‘netif_napi_add’
  543 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
      |                                                         ^~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10427:9: note: in expansion of macro ‘RTL_NAPI_CONFIG’
10427 |         RTL_NAPI_CONFIG(dev, tp, rtl8125_poll, R8125_NAPI_WEIGHT);
      |         ^~~~~~~~~~~~~~~
In file included from /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:41:
./include/linux/netdevice.h:2631:1: note: declared here
 2631 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:10458:17: error: implicit declaration of function ‘netif_set_gso_max_size’; did you mean ‘netif_set_tso_max_size’? [-Wimplicit-function-declaration]
10458 |                 netif_set_gso_max_size(dev, LSO_64K);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
      |                 netif_set_tso_max_size
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘r8125_csum_workaround’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:11844:24: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘skb_gso_reset’? [-Wimplicit-function-declaration]
11844 |                 segs = skb_gso_segment(skb, features);
      |                        ^~~~~~~~~~~~~~~
      |                        skb_gso_reset
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:11844:22: error: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
11844 |                 segs = skb_gso_segment(skb, features);
      |                      ^
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_rx_interrupt’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:12237:57: warning: the comparison will always evaluate as ‘false’ for the address of ‘Rx_skbuff’ will never be NULL [-Waddress]
12237 |         if ((tp->RxDescArray == NULL) || (tp->Rx_skbuff == NULL))
      |                                                         ^~
/home/davide/r8125/src/r8125-9.003.05/src/r8125.h:1506:25: note: ‘Rx_skbuff’ declared here
 1506 |         struct sk_buff *Rx_skbuff[NUM_RX_DESC]; /* Rx data buffers */
      |                         ^~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c: In function ‘rtl8125_resume’:
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:12717:32: warning: passing argument 2 of ‘rtl8125_rar_set’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
12717 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/home/davide/r8125/src/r8125-9.003.05/src/r8125_n.c:9178:26: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
 9178 |                 uint8_t *addr)
      |                 ~~~~~~~~~^~~~
make[2]: *** [scripts/Makefile.build:244: /home/davide/r8125/src/r8125-9.003.05/src/r8125_n.o] Error 1
make[2]: *** Attesa per i processi non terminati....
make[1]: *** [/usr/lib/modules/6.9.5-1-MANJARO/build/Makefile:1918: /home/davide/r8125/src/r8125-9.003.05/src] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.9.5-1-MANJARO/build'
==> ERROR: A failure occurred in build().
    Aborting...

Thanks for your help. I forgot to use LC_ALL

1 Like

No problems.

Unfortunately I have no idea where to go from here.

But, I see you’re using

so instead of using just

makepkg

try it with the -si arguments:

LC_ALL=C makepkg -si

If that doesn’t work, then I have absolutely NO idea where to go from here.

I’m so sad about this. WiFi and Ethernet continue to disconnect. I can’t use the pc …

It is wellknown that some devices - part of Windows systems - does not play well with Linux. There is really nothing to be said or done.

If your custom package build of drivers necesary for you network to be work fails - this has nothing to do with Manjaro Linux as distribution.

Did you remember to sync the headers for your current kernel?

It looks like you did not.

Please see → [root tip] [How To] Kernel - Headers - DKMS

dkms mandates the correct headers … if your build doesn’t work it is very likely you did not select the correct headers.

Possibly you were challenged to select the correct headers package - but didn’t specify - thus the default - number 1 was synced - that is usually the wrong headers package.

Also see → - [Need-To-Know] About Manjaro and AUR

I just built the module using:
yay -S r8125-dkms

No errors.
but also no such file as you posted above:
ls -al /var/lib/dkms/r8125/9.013.02/
no make.log there.

The driver is in
/lib/modules/_kernel_name_/updates/dkms

for instance:

ls -l /lib/modules/5.15.161-1-MANJARO/updates/dkms/
total 84
-rw-r--r-- 1 root root 83440 Jul 14 15:45 r8125.ko.xz

and:
grep r8125.ko /lib/modules/5.15.161-1-MANJARO/modules.dep
shows it’s presence:
updates/dkms/r8125.ko.xz:

I can’t load it/test it, of course, because I don’t actually have the hardware.

All this suggests to me that the driver build wasn’t successful which is why you could not load it.

The other driver you tried to build is way too old (4-5 years) in my opinion.

ps:
are you sure that this is the driver you need?

inxi -Fazy

could tell you and us more

I have used ubuntu, debian and manjaro without network problems, I don’t know what it could be in this case. if there is anything that can help make you understand, tell me anything you need

totally unexpectedly this driver stopped working correctly, so I’m trying in every way to fix this problem

Your claim that

is not working - that would imply the wrong kernel modules - perhaps I am wrong - then you have to correct

What about this?

As I said - I built it without problems, I just can’t test whether it works because I don’t have that card.

How can I understand if they are correct or not?

System:
  Kernel: 6.9.5-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.9-x86_64
    root=UUID=0c7bf2de-e0f8-4a7f-9aee-5086dba2e438 rw quiet splash apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: GNOME v: 46.2 tk: GTK v: 3.24.42 wm: gnome-shell
    tools: gsd-screensaver-proxy dm: GDM v: 46.2 Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop System: Micro-Star product: MPG B460 Trident AS (MS-B926)
    v: 1.0 serial: <superuser required>
  Mobo: Micro-Star model: MPG B460I GAMING EDGE WIFI (MS-7C86) v: 1.0
    serial: <superuser required> part-nu: B926.D uuid: <superuser required>
    UEFI: American Megatrends v: D.10 date: 05/31/2021
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Touch Keyboard K400 Plus
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: Intel Core i7-10700 bits: 64 type: MT MCP arch: Comet Lake
    gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
    model-id: 0xA5 (165) stepping: 5 microcode: 0xFA
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB L3: 16 MiB
    desc: 1x16 MiB
  Speed (MHz): avg: 800 min/max: 800/4800 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800 16: 800
    bogomips: 92838
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional;
    RSB filling; PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW loop
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070] vendor: Micro-Star MSI
    driver: nvidia v: 550.90.07 alternate: nouveau,nvidia_drm non-free: 550.xx+
    status: current (as of 2024-06; EOL~2026-12-xx) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-2023 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 2 link-max: gen: 4 speed: 16 GT/s lanes: 16 ports: active: none
    off: DP-2 empty: DP-1,DP-3,HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:2484
    class-ID: 0300
  Display: x11 server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: gnome-shell driver: X: loaded: N/A failed: nvidia
    gpu: nvidia,nvidia-nvswitch note: X driver n/a, try sudo/root
    display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-size: <missing: xdpyinfo>
  Monitor-1: DP-2 res: 1920x1080 dpi: 94 size: 521x293mm (20.51x11.54")
    diag: 598mm (23.53") modes: N/A
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: kms_swrast surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.90.07
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2
    memory: 7.81 GiB
Audio:
  Device-1: Intel Comet Lake PCH-V cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_avs,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:a3f0 class-ID: 0403
  Device-2: NVIDIA GA104 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 2 link-max:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228b
    class-ID: 0403
  API: ALSA v: k6.9.5-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: JACK v: 1.9.22 status: off tools: N/A
  Server-3: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 05:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp5s0 state: up mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX200 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-9:5 chip-ID: 8087:0029
    class-ID: e001
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
  Local Storage: total: 2.74 TiB used: 1.61 TiB (58.8%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLQ512HALU-00000
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: FXV7000Q temp: 32.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM049-2GH172
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: <filter> fw-rev: SDM1 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: HM500LI
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 2.0 spd: 480 Mb/s lanes: 1 mode: 2.0 tech: N/A serial: <filter>
  ID-4: /dev/sdc maj-min: 8:32 vendor: Western Digital
    model: WD10SMZW-11Y0TS0 size: 931.48 GiB block-size: physical: 512 B
    logical: 512 B tech: HDD rpm: 5400 serial: <filter> fw-rev: 1021
    scheme: ATARI
Partition:
  ID-1: / raw-size: 245.04 GiB size: 240.14 GiB (98.00%)
    used: 98.32 GiB (40.9%) fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 36.2 MiB (37.7%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 51.0 C mobo: N/A gpu: nvidia temp: 41 C
  Fan Speeds (rpm): N/A gpu: nvidia fan: 30%
Info:
  Memory: total: 16 GiB available: 15.55 GiB used: 3.65 GiB (23.5%)
  Processes: 394 Power: uptime: 1h 2m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 6.19 GiB services: gsd-power,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: pm: pacman pkgs: 1427 libs: 403 tools: gnome-software,pamac,yay
    pm: flatpak pkgs: 0 Compilers: clang: 17.0.6 gcc: 14.1.1 Shell: Zsh v: 5.9
    running-in: gnome-terminal inxi: 3.3.35

The ethernet interface is listed as being in “up” state, and using the r8169 driver.

I suppose it is not working?
It looks totally fine.

But I wonder why the driver is even loaded - you said:

Since this doesn’t appear to have worked:
how did you do that (blacklisting)?

Your build attempt was apparently not successful. :man_shrugging:

In my post you can see how you can check whether that r8125 module is actually present.

sorry guys. it was a hardware problem. God, I feel so stupid.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.