CachyOS / CachyOS/linux-cachyos
[BUG] linux-cachyos-r8125: install hook fails to bind r8125 to device — fallback to r8169
- Dominant language
- Shell
- Stars
- 4.5k
- Forks
- 160
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
### Pre-flight checklist
- [x] I have searched existing issues and this is not a duplicate.
- [x] I have read the [Contributing Guidelines](https://github.com/CachyOS/linux-cachyos/blob/master/CONTRIBUTING.md).
- [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)
```text
https://paste.cachyos.org/p/bd31d60.log
```
### Manual system information (if cachyos-bugreport.sh is unavailable)
```text
```
### 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
```text
```
### Additional system information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.