RTL8125 2.5GbE NIC not working, PVE 8.2.7, Kernel 6.8.12-2-pve

wespiard

New Member
Oct 1, 2024
13
4
3
I recently installed a new motherboard (ASRock Z690 Extreme) that has an Intel 1 GbE NIC (works fine) and a 2.5 GbE NIC (Realtek RTL8125). I updated /etc/network/interfaces when I booted up the new motherboard for the first time to use the new interface name for the 1 GbE NIC and everything worked as usual.

However, when I switch to using the 2.5 GbE port, I get no internet connection when logged into the host terminal directly. I've seen people say it should work with the built-in r8169 driver, and some that have had to install a separate driver. I'd like to make sure it works with the default driver that is built into the kernel, if possible.

Some things I have looked at based on some Googling around:

The NIC is listed as disabled via lshw:
Bash:
root@pve:~# lshw -c network
  *-network DISABLED       
       description: Ethernet interface
       product: RTL8125 2.5GbE Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: enp1s0
       version: 05
       serial: a8:a1:59:e6:cd:fa
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list ethernet physical
       configuration: broadcast=yes driver=r8169 driverversion=6.8.12-2-pve latency=0 link=no multicast=yes
       resources: irq:17 ioport:3000(size=256) memory:70800000-7080ffff memory:70810000-70813fff
  *-network
       description: Ethernet interface
       product: Ethernet Connection (17) I219-V
       vendor: Intel Corporation
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       logical name: enp0s31f6
       version: 11
       serial: a8:a1:59:e6:cd:f8
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=6.8.12-2-pve duplex=full firmware=2.3-4 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:123 memory:70900000-7091ffff

I believe the built-in module that it should be using is r8169, which is loaded, but it is not being used by any devices:
Bash:
root@pve:~# lsmod | grep r8169
r8169                 110592  0


dmesg output:
Code:
root@pve:~# dmesg | grep -i r8169
[    0.745675] r8169 0000:01:00.0: enabling device (0000 -> 0003)
[    0.745756] r8169 0000:01:00.0: can't disable ASPM; OS doesn't have ASPM control
[    0.755664] r8169 0000:01:00.0 eth0: RTL8125B, a8:a1:59:e6:cd:fa, XID 641, IRQ 133
[    0.755667] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    0.779567] r8169 0000:01:00.0 enp1s0: renamed from eth0

ip output:
Code:
root@pve:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether a8:a1:59:e6:cd:fa brd ff:ff:ff:ff:ff:ff
3: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP group default qlen 1000
    link/ether a8:a1:59:e6:cd:f8 brd ff:ff:ff:ff:ff:ff
4: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether a8:a1:59:e6:cd:f8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.208/24 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::aaa1:59ff:fee6:cdf8/64 scope link
       valid_lft forever preferred_lft forever
5: tap100i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master fwbr100i0 state UNKNOWN group default qlen 1000
    link/ether de:d4:cc:41:5a:12 brd ff:ff:ff:ff:ff:ff
6: fwbr100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether ee:b2:40:9c:40:f5 brd ff:ff:ff:ff:ff:ff
7: fwpr100p0@fwln100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether aa:42:45:6e:48:4f brd ff:ff:ff:ff:ff:ff
8: fwln100i0@fwpr100p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
    link/ether ee:b2:40:9c:40:f5 brd ff:ff:ff:ff:ff:ff
9: veth102i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether fe:c3:70:55:0e:1d brd ff:ff:ff:ff:ff:ff link-netnsid 0
10: veth104i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether fe:eb:9e:f4:6d:49 brd ff:ff:ff:ff:ff:ff link-netnsid 1
 
Please show the contents of your /etc/network/interfaces file. Is the NIC set to activate in that file?
 
Please show the contents of your /etc/network/interfaces file. Is the NIC set to activate in that file?
I tried changing it, and that removes the "disabled" tag in the lshw output, but still didn't have internet access.

Here is the file:

Code:
root@pve:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp0s31f6 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.208/24
        gateway 192.168.0.1
        bridge-ports enp0s31f6
        bridge-stp off
        bridge-fd 0

Replacing both instances of "enp0s31f6" with "enp1s0", then switching the ethernet cable to the 2.5G port and running the following still results in no internet/GUI access:
Code:
ifdown enp0s31f6
ifup enp1s0

This does switch the "disabled" tag from the 2.5G NIC to the 1G NIC in lshw -c net, which makes sense I guess.

It also shows two inet6 addresses under the enp1s0 interface in the output of ip a, even though "inet" is specified in /etc/network/interfaces.

Additionally, the orange LED is illuminated on the 2.5G port, I assume this means the link is only at 1G?
 
I encountered the issue of r8125 NIC being disabled as well. In my case, I have a Z890 motherboard with a on-board 2.5G r8125, and it wasn't shown on the setting, I only saw it from lspci command.

And after typing:
Code:
lsmod | grep r8169
I got the output with 0 at the end as well, which indicated that the r8169 driver is loaded but not in use.

And after several try, I've managed to make it worked.
The solution:
Code:
# First remove the current driver
rmmod r8169

# (Optional, if you have tried to install the 6.5 kernal)
apt install pve-headers-$(uname -r)

# Install the .deb package (From https://github.com/awesometic/realtek-r8125-dkms/releases/tag/9.014.01-1)
wget https://github.com/awesometic/realtek-r8125-dkms/releases/download/9.014.01-1/realtek-r8125-dkms_9.014.01-1_amd64.deb
dpkg -i realtek-r8125-dkms_9.014.01-1_amd64.deb

# Load the new driver
modprobe r8125

i hope my solution is helpful, BTW this is my first time posting solution.