Incorrect kernel driver detected on my system.
Incorrect kernel driver detected on my system.
They have a 2.5GB NIC with the Realtek RTL8125 chipset, but it’s currently using the r8169 driver for Ethernet. You want to switch to the r8125 driver instead. I checked online but didn’t find any guidance. The system shows r8169 as active, with r8125 listed in kernel modules. You might need to adjust the driver settings or contact your network hardware vendor for further help.
You can block the device driver in that slot to prevent issues. This approach isn't perfect since relocating the NIC later would require config adjustments, though it should prompt Linux to load the alternative driver.
This approach might not be ideal, but that's what I understand. I haven't tried it on Ubuntu 20.04.1 or .2 LTS, but it seems to function on 19.04 and PROXMOX, so it should work here. Begin by modifying your /etc/modules file and insert the line r8125. This will load the r8125 driver at system startup. To apply this change to the initialization process, save your file and execute update-initramfs -u -k all. Check the initramfs output with lsinitramfs /boot/initrd.img-5.0.15-1-pve | grep r8125 to confirm loading. Keep in mind your kernel version may differ, so adjust the command accordingly. If the driver appears in the output, you're ready. Next, identify the device address—this is the key: ##:##.# at the start of the line. Remember this value. Then create a script that forces the driver for that device at startup. Use nano /etc/initramfs-tools/scripts/init-top/r8125-driver-override.sh. You don’t need to name the file exactly, but it should reflect its purpose. Add these commands: #!/bin/sh PREREQS="" DEVS="0000:##:##.#" for DEV in $DEVS; do echo "r8125" > /sys/bus/pci/devices/$DEV/driver_override done modprobe -i r8125 Ensure the prefix matches your kernel (e.g., 0000:##:##.#). It could be 0001 or 000a depending on your setup. Insert the correct address there. After that, run chmod 755 /etc/initramfs-tools/scripts/init-top/vfio-driver-override.sh and chown root:root /etc/initramfs-tools/scripts/init-top/vfio-driver-override.sh. Update the kernel with the script using update-initramfs -u -k all. You should finish now. Restart the machine and hope the system loads the r8125 module and replaces the default driver for the 2.5Gbit NIC. Recheck with lspci-vnn to verify the driver is active.
I kept the same instructions but adjusted the wording. The script mentioned a DEVS value, but it seemed unclear. When trying to update the initramfs, the system reported a missing directory. Your DEVS setting was likely 0200 based on the lspci output. The script used that value, so it should work if you're targeting that device. Check if the driver is actually loaded and adjust paths accordingly.
Well, maybe not? I don't know if the error I received could cause issues, but at least the good driver is installed in the nic, which is great!