No Network Connection with 24.04 and r8125 Ethernet

Ubuntu Version:

Ubuntu Server 24.04.2 LTS

Problem Description:

I am unable to get a wired ethernet connection on my server. The interface is not recognized by the standard install, but I followed the instructions posted in this thread.

I can see the hardware is now detected:

> lscpi -k

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 0c)
	Subsystem: ASUSTeK Computer Inc. RTL8125 2.5GbE Controller
	Kernel driver in use: r8125
	Kernel modules: r8169, r8125

I’ve edited /etc/netplan/50-cloud-init.yaml as follows:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp1s0:
      dhcp4: true

I then use:

> sudo netplan apply

However, I don’t get an IP address after rebooting.

> 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,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether <mac_address> brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4a21:bff:fe71:2c5e/64 scope link 
       valid_lft forever preferred_lft forever

I’m not able to ping my gateway at 192.168.1.1 and receive a “network is unreachable” error.

Relevant System Information:
ASUS NUC Essential 14 Barebones with Intel Core 3 (N355) CPU.

Screenshots or Error Messages:

The output from dmesg below:

> sudo dmesg | grep r8125

[    2.305168] r8125: loading out-of-tree module taints kernel.
[    2.317699] r8125 2.5Gigabit Ethernet driver 9.011.00-NAPI loaded
[    2.320433] r8125 0000:01:00.0: enabling device (0000 -> 0003)
[    2.336087] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[    2.339565] r8125  Copyright (C) 2022 Realtek NIC software team <nicfae@realtek.com> 
[    2.351432] r8125 0000:01:00.0 enp1s0: renamed from eth0
[    6.891455] r8125: enp1s0: link up
[ 1226.808145] r8125 0000:01:00.0 enp1s0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 10395 ms
[ 1226.842574] r8125: enp1s0: link down
[ 1229.191529] r8125: enp1s0: link up
[ 2686.008247] r8125 0000:01:00.0 enp1s0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 7872 ms
[ 2686.041830] r8125: enp1s0: link down
[ 2688.378633] r8125: enp1s0: link up
[ 3759.160321] r8125 0000:01:00.0 enp1s0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 7424 ms
[ 3759.195296] r8125: enp1s0: link down
[ 3761.595706] r8125: enp1s0: link up

What I’ve Tried:

Followed the instructions in the following thread. To summarize, I did a fresh install using the wlan card, and then performed the following:

sudo apt update
sudo apt full-upgrade
sudo apt install r8125-dkms

I set up the netplan file as described above and reboot.

I’ve also performed the following steps:

  • Updated the BIOS to the latest version (0021) available at the ASUS website
  • Confirmed the ethernet cable works with another system
  • Confirmed other systems are assigned addresses via DHCP
  • Blacklisted the r8169 driver suggested in the in the referenced thread
  • Powered off and held the power button for 30 s to clear residual settings

1 Like

Hi, John.

Be sure the ethernet adapter is enabled in the BIOS/UEFI. It’s under Advanced >> Onboard Devices. I’m not sure, but I think the default is disabled. No, I can’t imagine why disabled might be the default.

After following the instructions from @Jeremy31, as I reported in [ RTL8125 2.5GbE Ethernet port not working in Ubuntu 24.04 ], my ethernet started working immediately, and it has worked fine for about three months, and then it quit again last week. I did not do any of those recommended DKMS things because it was working.

I also did not do any of those things you describe with “I’ve edited /etc/netplan/50-cloud-init.yaml” and renaming your ethernet connection, and I have no idea if your problem might be in those things.

I think I understand that the DKMS method is recommended because then system updates won’t break the fix I installed, but I haven’t tested that yet.

I noticed that you and I have identical hardware, and essentially identical ethernet problems with Ubuntu 24.04.x. What you probably don’t know is that I’ve filed several support cases with ASUS and they have never replied with any helpful information, only to acknowledge that they know about the problem.

I only have time to work on my system intermittently, and I don’t have any urgent need for it, so I can’t say when I will work on it again, but I will report if I discover anything interesting, and I hope you will too.

I think I will install Ubuntu 25.04 ASAP; I think I read somewhere that that might fix the problem, and if it does, then I think I will just do a clean install at that point and hope this problem is behind us.

Jim

The dkms will automatically compile a new driver whenever a newer kernel is installed, without dkms you will have to compile manually until you install a kernel with the driver built in

1 Like

I just realized there’s another difference or two between your system and mine: yours is Server, and mine is Desktop with the default, Gnome, and you have done a full-upgrade, and I have only done an upgrade.

Thanks for the replies. I did have some success, but as Jim points out, the hardware seems pretty finicky. My issue seems to have been that I was going back to disable the WLAN (not the LAN) in the BIOS and this seems to break all networking on the system. I left wireless enabled for the time being and created a second netplan file for the ethernet. This seems to hold in a stable state, but I’m really not sure what was “breaking” previously.

I tried a Ubuntu Desktop install as well, but saw the same issue. The difference between server and desktop is that Desktop uses Network Manager and Server uses networkd to configure the network, which is why I had to create the netplan file.

Too bad that ASUS isn’t doing more considering they list Ubuntu 24.04 as officially supported. I had hoped to use this hardware for a lightweight home server running a few Docker containers. I’m reconsidering since I want it to sit in a far off corner connected via wired Ethernet and have it remain up and connected 24/7.

I have to be gone for a few days starting in a few hours, but before hitting the sack this evening, I thought I should try a couple things and report, so I did try and the report is “interesting” but no joy:

First I tried what Jeremy recommended in my old thread, then I re-did what worked before, and the results are all the same: I see in Settings >> Network both Wi-Fi and Network (Wired) (Wired was absent before this latest work) and the WiFi always works (that’s how I’m posting this), and the Wired one says “Connecting- 1,000 Mb/s” as expected, and the 1,000 Mbps LED on my unmanaged switch constantly shows solid connection and passing traffic, but in fact if I turn off the Wi-Fi connection I have no Internet. Another computer plugged in to that same switch works fine. I also swapped ports and cables on the switch; no change. I also keep getting a message at the top of my Screen, “System (Just now) >> Connection failed: Activation of network connection failed”. Obviously it keeps re-trying with no input from me.

Here is what I did to get to this point (at least the system now admits there is a Wired connection possible, whereas before it was missing entirely):

1
install r8125-dkms and reboot:
sudo apt install r8125-dkms

Completed without errors. I think the Wired connection option appeared at this point. Here’s the end of the response:

r8125.ko.zst:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.11.0-21-generic/updates/dkms/
      depmod…
      Processing triggers for initramfs-tools (0.142ubuntu25.5) …
      update-initramfs: Generating /boot/initrd.img-6.11.0-21-generic
      james@NUC14Ess:~$

I rebooted and now the Wired connection shows and it tries to initialize/connect but fails. So then I did

2

git clone GitHub - notpeelz/r8125: Mirror for Realtek r8125 2.5G Ethernet Linux drivers

(done previously, when it succeeded in fixing my issue, so I thought I should not re-do it)
cd r8125/src
make

Ignore some errors, then
zstd r8125.ko
sudo cp r8125.ko.zst /lib/modules/$(uname -r)/kernel/drivers/net/ethernet/realtek/
echo “blacklist r8169” | sudo tee /etc/modprobe.d/r8169.conf
sudo depmod -a

All commands completed without errors (except where Jeremy said, “Ignore some errors”).

Rebooted; no change; no joy.

I agree with John, as I had (have?) similar goals; I want a WWW server always up, and WiFi is too slow to serve the videos I want to serve.

IHTH

I would also appreciate some more help.

Jim

I forgot to mention: I also did

sudo apt full-upgrade

IHTH

It is likely best to use r8125-dkms from the repos and if any issues occur, file a ubuntu bug report

I know this is not my topic, I just posted a couple of things trying to help John, but I can’t tell if you are replying to him or to me. Anyway, I don’t think it matters, because my question is the same either way:

You said:

And my question is: Isn’t that what I did? I said above:

Here is what I did to get to this point
apt install r8125-dkms
I rebooted and now the Wired connection shows and it tries to initialize/connect but fails.

Please let me (or John) know exactly what else you think we/I should do before determining it’s time to file a bug report. BTW, there are no error messages to report on my system, except the Wired Internet connection doesn’t work.

Thanks again for all your help, Jeremy; I know you show up in a lot of of these topics and you’re always trying to help, and we in need appreciate it.

I found at least one way to get my RTL8125 to work. Here is a fairly long explanation; I hope you find something useful in it:

[ Realtek RTL8125 Ubuntu 24.04 Ethernet Fix – r8125 new driver; purge r8125-dkms ]

IHTH

Jim