The r8125 module is not working anymore after today's update

Hi,

I am using the TP-Link TX201 2.5 Gigabit PCIe Network Adapter since last year in my dual boot machine (Endeavour and Windows 10).
I am updating Endeavour OS daily. After today’s[date=2024-05-18 timezone=“America/Los_Angeles”] update the network card stopped working (still works fine under Windows).

I turned my onboard LAN controller back on to search the web and write this post.
I think I need some help now. Here’s where I am currently:

inxi -Na

Network:
  Device-1: 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
  Device-2: Intel I211 Gigabit Network vendor: Gigabyte driver: igb
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 06:00.0
    chip-ID: 8086:1539 class-ID: 0200
  Device-3: Realtek RTL8125 2.5GbE driver: N/A modules: r8169 pcie: gen: 2
    speed: 5 GT/s lanes: 1 port: d000 bus-ID: 07:00.0 chip-ID: 10ec:8125
    class-ID: 0200

I made sure that the r8169 module is black listed:

$ cat /etc/modprobe.d/r8169.conf
blacklist r8169

Then I tried to re-install the r8125-dkms via yay -S r8125-dkms and since it exited with 0 I thought everything went fine and rebooted.

Unfortunately, it still didn’t work and I looked around for other causes quite a bit more.
What kind of steered me back to the re-install was that lsmod | grep r8125 and journalctl -b | grep r8125 didn’t return anything.

So I ran yay -S r8125-dkms again and this time went over every line of the output. That way I finally saw that installing the DKMS module failed:

[...]
:: Running post-transaction hooks...                                                                                    
(1/5) Arming ConditionNeedsUpdate...                                                                                    
(2/5) Install DKMS modules                                                                                              
==> dkms install --no-depmod r8125/9.013.02 -k 6.9.1-arch1-1                                                            
Error! Bad return status for module build on kernel: 6.9.1-arch1-1 (x86_64)                                             
Consult /var/lib/dkms/r8125/9.013.02/build/make.log for more information.                                               
==> WARNING: `dkms install --no-depmod r8125/9.013.02 -k 6.9.1-arch1-1' exited 10                                       
(3/5) Updating linux initcpios...
[...]

Then I checked out /var/lib/dkms/r8125/9.013.02/build/make.log and saw what looks like a compiler error:

DKMS make.log for r8125-9.013.02 for kernel 6.9.1-arch1-1 (x86_64)                                                      
Sat May 18 04:42:12 PM PDT 2024                                                                                         
make: Entering directory '/usr/lib/modules/6.9.1-arch1-1/build'                                                         
  CC [M]  /var/lib/dkms/r8125/9.013.02/build/r8125_n.o                                                                  
  CC [M]  /var/lib/dkms/r8125/9.013.02/build/rtl_eeprom.o                                                               
  CC [M]  /var/lib/dkms/r8125/9.013.02/build/rtltool.o                                                                  
/var/lib/dkms/r8125/9.013.02/build/r8125_n.c:7682: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]
 7682 |         .get_eee = rtl_ethtool_get_eee,                                                                         
      |                    ^~~~~~~~~~~~~~~~~~~                                                                          
/var/lib/dkms/r8125/9.013.02/build/r8125_n.c:7682:20: note: (near initialization for ‘rtl8125_ethtool_ops.get_eee’)        
/var/lib/dkms/r8125/9.013.02/build/r8125_n.c:7683: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]
 7683 |         .set_eee = rtl_ethtool_set_eee,                                                                         
      |                    ^~~~~~~~~~~~~~~~~~~                                                                          
/var/lib/dkms/r8125/9.013.02/build/r8125_n.c:7683:20: note: (near initialization for ‘rtl8125_ethtool_ops.set_eee’)        
make[2]: *** [scripts/Makefile.build:244: /var/lib/dkms/r8125/9.013.02/build/r8125_n.o] Error 1                         
make[1]: *** [/usr/lib/modules/6.9.1-arch1-1/build/Makefile:1919: /var/lib/dkms/r8125/9.013.02/build] Error 2           
make: *** [Makefile:240: __sub-make] Error 2                                                                            
make: Leaving directory '/usr/lib/modules/6.9.1-arch1-1/build'

The r8125-dkms site says the package was last updated 2024-04-07, so I don’t think the issue is coming from the module itself, but rather maybe the compiler or some default setting the compiler uses.
Am I on the correct path here or am I completely misunderstanding what the issue is?

Does anyone have any pointers to how I can get the module and thus the network adapter working again?

Have a look here, please.

Though, based on the solution there, blacklisting like you did should produce the same result.

Strange…

@ricklinux or @manuel may be able to troubleshoot with you.

Thanks for the reply.
I looked at that post earlier today. It is talking about removing r8168, which I did not reference at all.
I removed it anyway, but re-installing r8125-dkms still fails with the same error. So I don’t think we’ve the same issue.

1 Like

Have you tried the LTS kernel? (just woken up, so if I missed it…).

Have you tried unblacklisting the r8169 module and uninstalling the r8125-dkms package and rebooting to see if it works on the r8169 module with the latest 6.9.1-arch1-1 kernel?

Thanks for the replies!
I’ll try Rick’s suggestions first, since that’s simple enough that I know how to do it.
I don’t know yet how to switch to the LTS kernel (or even the previous one that still worked with r8125). So I’ve to look that up. I’ll try that if Rick’s suggestion doesn’t work.
Will report back here afterwards.

1 Like

OK, Rick’s solution worked!
I did a sudo rm /etc/modprobe.d/r8169.conf and a yay -R r8125-dkms and then rebooted.
Looks like the network adapter is now supported by r8169.
Thanks to everyone for the replies and suggestions! Really appreciate it.

1 Like

This might be an unrelated issue, but for me r8169 failed to load because r8168 was installed. I did not have r8125 installed at all.

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