Cannot install RealTek Ethernet driver

My Asus mini-PC uses a RealTek ethernet driver in addition to wi-fi. On Zorin Pro 17.3, the wi-fi works fine but I cannot get the ethernet driver working.

$ sudo lshw -C network
  *-network                 
       description: Wireless interface
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 14.3
       bus info: pci@0000:00:14.3
       logical name: wlo1
       version: 00
       serial: 98:5f:41:5d:f7:8c
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=6.8.0-57-generic firmware=86.fb5c9aeb.0 so-a0-gf-a0-86.uc ip=192.168.0.108 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: iomemory:600-5ff irq:16 memory:60e8164000-60e8167fff
  *-network UNCLAIMED
       description: Ethernet controller
       product: RTL8125 2.5GbE Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list
       configuration: latency=0
       resources: ioport:3000(size=256) memory:80900000-8090ffff memory:80910000-80913fff

lspci shows the kernel module required:

$ lspci -knn | grep -i Eth -A3
	DeviceName: Onboard - Ethernet
	Subsystem: Intel Corporation Device [8086:0094]
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi
--
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 0c)
	Subsystem: ASUSTeK Computer Inc. RTL8125 2.5GbE Controller [1043:88ee]
	Kernel modules: r8169

I can see I have this:

$ ls /lib/modules/6.8.0-57-generic/kernel/drivers/net/ethernet/realtek/r8169.ko 
-rw-r--r-- 1 root root 270769 Mar 19 14:17 /lib/modules/6.8.0-57-generic/kernel/drivers/net/ethernet/realtek/r8169.ko

But modprobe does nothing:

$ sudo modprobe r8169

Am I missing something?

I think you may have to compile the driver using this unofficial patch from GitHub:

1 Like

Ouch! That was painful.

That link wasn't hugely useful but this one was: GitHub - awesometic/realtek-r8125-dkms: A DKMS package for easy use of Realtek r8125 driver, which supports 2.5 GbE.

It took quite a lot of building and adding a module key for boot to get it to work. I also had to blacklist the 8169 driver. I'm not sure if all this will survive the next Zorin OS upgrade though but I hope so.

The 8215 isn't exactly an old piece of hardware so it would be nice if it could be rolled into the Zorin kernel.

But thanks though!

1 Like

Did You take a Look in the ''Additional Drivers'' Tab in Software & Updates if there is a Driver offered?

Yes, I did. It said "No additional drivers" unfortunately.

1 Like

If you used DKMS to install the driver, then yes it should survive future kernel upgrades.

2 Likes

Two reboots later and the ethernet port has stopped working. :frowning:

Network Settings shows that the Wired port is visible but it says "Cable unplugged". It is not. The cable is plugged in the same place as when it was working, and switching it to another PC shows that the data link is fine.

lspci shows that the driver is loaded and running. dmesg shows no errors and there are log entries showing the r8125 driver is loaded. I've tried apt-get install r8125-dkms, which I probably ought to have done in the first place, but it made no difference. So either the ethernet port has blown up, which seems unlikely, or there's some other issue. At the moment, I'm beat but I'll keep looking.

After some investigation, I suspect that I'm going to need to wait until a newer version of Zorin OS based on a newer kernel/Ubuntu LTS and hopefully r8125 provided out of the box. I can live with wi-fi for now.

It has been suggested I do a re-install but, honestly, I've got my setup working too nicely apart from some niggling issues to risk my /home directory even with a backup. There are settings in /etc which I don't know if they will survive.

Are you open to manually updating to a newer kernel? That's not usually a difficult process.

I'd consider it, once I've reviewed the steps and risks. I'm reasonably familiar with Linux at that level but it isn't something I tend to do often.

As Sources, I can suggest these:

1 Like

It is possible to do with one or two commands and there is very low risk. If anything goes wrong, you can just boot into the previous kernel and remove the newly installed one.

1 Like

Thanks. I've got mainline installed, run and upgraded to Building for 6.14.3. However now I've got another issue when trying to install the r8152 driver again:

Building for 6.14.3-061403-generic
Building for architecture amd64
Module build for kernel 6.14.3-061403-generic was skipped since the
kernel headers for this kernel does not seem to be installed.

How do I get past this? I can see headers for 6.14.3-061403 in the cache but not for 6.14.3-061403-generic.

Could You use Synaptic or open the Terminal and type apt list linux-headers-6.14.3-061404-generic to look if it is installed?

It is not installed, no. Synaptic does not show it either. I can ask on StackOverflow as this sounds like a general issue even though I can't find anybody else running into this so far.

You can retrieve the headers from the same source:
https://kernel.ubuntu.com/mainline/v6.14.3/amd64/linux-headers-6.14.3-061403_6.14.3-061403.202504200838_all.deb

The rest of the kernel packages on the tree (for reference or for need):

1 Like