linux-cachyos icon indicating copy to clipboard operation
linux-cachyos copied to clipboard

[BUG] linux-cachyos-r8125: install hook fails to bind r8125 to device — fallback to r8169

Open maeddesg opened this issue 7 months ago • 6 comments

Pre-flight checklist

  • [x] I have searched existing issues and this is not a duplicate.
  • [x] I have read the Contributing Guidelines.
  • [x] I have verified the issue is reproducible with the latest available CachyOS kernel.
  • [x] I have tried to reproduce the issue on Arch Linux's linux kernel.

Upstream / vanilla kernel check

I have not tested with a vanilla/upstream kernel

Kernel variant

linux-cachyos (EEVDF, Clang)

System information (cachyos-bugreport.sh)

https://paste.cachyos.org/p/bd31d60.log

Manual system information (if cachyos-bugreport.sh is unavailable)


Bug description

Tested on linux-cachyos 6.19.11-1 and linux-cachyos-rc 7.0.rc7-1 — same behavior on both. Bug description So the hook that was introduced in #778 doesn't do what it's supposed to. Here's what I'm seeing: The hook in /usr/lib/modprobe.d/linux-cachyos-r8125.conf: install r8169 /usr/bin/modprobe r8125 || /usr/bin/modprobe --ignore-install r8169 At boot, r8125 gets loaded by the hook — I can see it in lsmod — but it never actually binds to the device. No r8125 0000:07:00.0 ... lines in dmesg, nothing. Just this: $ dmesg | grep r8125 [ 8.749484] r8125: loading out-of-tree module taints kernel. That's it. No device binding, no interface. And since modprobe r8125 technically succeeds (exit 0, module is loaded), the fallback to r8169 never kicks in either. But r8169 still ends up claiming the device through udev/PCI anyway: $ ethtool -i enp7s0 driver: r8169

$ lsmod | grep r8125 r8125 425984 0 # loaded but 0 users — not bound to anything I also tested this manually — unloaded r8169, loaded r8125 by hand, same result. The module loads fine but the interface just disappears. No enp7s0, no network. Loading r8169 back brings everything up again. The problem is timing: by the time r8125 is ready to probe, r8169 has already grabbed the PCI device. Workaround Same as before in #773 — add r8125 to the initramfs: MODULES=(crc32c r8125) in /etc/mkinitcpio.conf, then sudo mkinitcpio -P && reboot. With that, r8125 loads at ~0.8s in boot and properly claims the device: $ dmesg | grep r8125 [ 0.802085] r8125: loading out-of-tree module taints kernel. [ 0.806304] r8125 Ethernet controller driver 9.017.01-NAPI-DASH loaded [ 8.799415] r8125 0000:07:00.0 enp7s0: renamed from eth0 [ 13.416775] r8125: enp7s0: link up

$ ethtool -i enp7s0 driver: r8125 Works on both 6.19 and 7.0-rc7 this way. So the module itself is fine, it just needs to be there before r8169 gets a chance.

Steps to reproduce

  1. Install linux-cachyos + linux-cachyos-r8125
  2. Make sure MODULES=() in mkinitcpio.conf does NOT contain r8125
  3. Reboot
  4. ethtool -i enp7s0 → r8169
  5. lsmod | grep r8125 → loaded with 0 users
  6. dmesg | grep r8125 → only "loading out-of-tree module", no device binding

Expected behavior

r8125 should claim the RTL8125B device on every boot without needing manual mkinitcpio config.

Actual behavior

r8125 loads but doesn't bind to the device (0 users in lsmod). r8169 ends up claiming it instead. The modprobe install hook doesn't catch this because modprobe r8125 returns 0 — the module loaded, it just never probed anything.

Logs / stack traces


Additional system information

No response

maeddesg avatar Apr 09 '26 15:04 maeddesg

Is r8169 in the initramfs? You can check with lsinitcpio.

1Naim avatar Apr 09 '26 15:04 1Naim

❯ sudo lsinitcpio /boot/initramfs-linux-cachyos.img | grep -E 'r8125|r8169' usr/lib/modprobe.d/linux-cachyos-r8125.conf usr/lib/modprobe.d/linux-cachyos-rc-r8125.conf

maeddesg avatar Apr 09 '26 16:04 maeddesg

I guess will need to add a dropin config for mkinitcpio too.

1Naim avatar Apr 09 '26 16:04 1Naim

Can confirm having same problem, any ETA on the fix?

RazerPC avatar Apr 24 '26 17:04 RazerPC

anyone able to replicate on 7.2?

simiscoool-afk avatar Aug 31 '26 00:08 simiscoool-afk

I am still seeing an issue here. I think this was a non-issue for a while for me, but at some point a system update must have changed something about my setup to where the module isn't loading. After doing some investigating, I found that I now may need to install linux-cachyos-r8125 which I hadn't before, and installing this and rebooting did not fix it. I then rebuilt my initramfs manually using sudo mkinitcpio -P and rebooted and it's still not working.

Below is the latest output from a few sources. If you need any more info I'm happy to provide! I have a USB ethernet adapter I am using in the meantime.

~ lspci -k G -A 3 Ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
        Subsystem: Realtek Semiconductor Co., Ltd. Device 0123
        Kernel modules: r8169
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
--
06:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
        Subsystem: ASRock Incorporation Device 1539
        Kernel driver in use: igb
        Kernel modules: igb
~ paru -Q linux-cachyos-r8125
linux-cachyos-r8125 7.2.3-1
~ lsinitcpio /boot/initramfs-linux-cachyos-deckify.img G -E r81
usr/lib/modprobe.d/linux-cachyos-r8125.conf
~ cat /usr/lib/modprobe.d/linux-cachyos-r8125.conf
─────┬───────────────────────────────────────────────────────────────────────────────────
     │ File: /usr/lib/modprobe.d/linux-cachyos-r8125.conf
─────┼───────────────────────────────────────────────────────────────────────────────────
   1 │ install r8169 /usr/bin/modprobe r8125 || /usr/bin/modprobe --ignore-install r8169
─────┴───────────────────────────────────────────────────────────────────────────────────
~ lsmod G r8
r8152                 204800  0
r8169                 172032  0
mii                    20480  2 usbnet,r8152
mdio_devres            12288  1 r8169
libphy                237568  4 r8169,mdio_devres,realtek,phy_package
mdio_bus               32768  4 r8169,libphy,realtek,phy_package

danielwaltz avatar Sep 11 '26 01:09 danielwaltz