r8168-dmks instead of r8125-dmks perfectlly worked for ethernet connection of Ubuntu 22.04 on ASUS PRIME X870-P WIFI-CSM mother board

Introduction

Several days ago, I built my desktop computer with Ryzen 9 9950X and ASUS X870 mother board. It is now working good, but there are some problems. One of the problems is that onboard ethernet is not working. Another problem is Bluetooth connection is totally failed. However, the first problem is finally, and unexpectedly solved, and therefore I recorded here how and why I was able to solved it. I think the problem is very hard to be solved once it run into. Because the right driver is hard to be found, and which driver is totally worked for, especially Ubuntu. If it can not be solved, we need to wait next firmware update, probably. Therefore, I think this information is very valuable for people who got same issue, isn’t it?? Anyway, the following is the details.

PC configuration

Following are my PC configuration. This computer is mainly for bioinformatic analysis for fun. The 128GB memory is large enough for this purpose. OS is Ubuntu 22.04.5. I chose Ubuntu 22.04 rather than 24.04 because a lot of library should be stably working on ubuntu 22.04 and there are a lot of information about bug fix. Graphic board is not necessary so far, but I probably need to use CUDA for several libraries. Therefore, I purchased RTX3060 which was not so expensive. Replacing graphic board is more easier than mother board and CPU, so if I need more larger graphic board, I would prepare it.

ItemProductCompanyIssue
CPURyzen 9 9959XAMD
Mother boardASUS PRIME X870-P WIFI-CSMASUSethernet dysfunction
bluetooth dysfunction
Graphic boardMSI GeForce RTX 3060 VENTUS 2X 8G OCMSI
Physical MemoryCrucial PRO, DDR5-5600, CP2K32G56C46U5, 32GB x4Crucial
CPU fanNH-U12A chromax.black, 120mmNoctua
Chassis NZXT H7 FlowNZXT
Chassis fanWONDER TORNADO 120 PWM 2,000 rpmScythe
Strage 14TB m.2 x1Crucial
Strage 24TB SSD x1TEAM

Problems and symptoms

As mentioned above, one of the problems is ethernet can not connet to internet. As I mentioned at previous post, I tried something as possible as I can imagine, mainly trying to install right driver. I can see the blow outout when I hit “lspci” command in terms of ethernet connection.

The output tell me that Realtek RTL8125 looks installed on this mother board. and I tried to install the drivers driscribing at https://www.realtek.com/Download/List?cate_id=584, https://text.yusukesakai.com/entry/20240114/1705237997, https://qiita.com/yukitoro0101/items/94ea8cd8540b92a36746, https://github.com/Kalyzee/realtek-r8125-dkms, and so on. Of note, I did not try describing here https://askubuntu.com/questions/1263363/2-5g-ethernet-linux-driver-r8125-installation-guide, becuase it looks too hard to me. I am not the pro… Now I feel what they described looks worth doing… but it is OK. I will try to remember it.

Anyway, everything what I did were failed to connect to internet. Therefore, I purchased LAN card of TP-link (TP-Link 2.5Gbps LAN card PCI-E, TX201) without any careful consideration. Actually It is well working, so I satisfied then.

Second error is bluetooth connection error. However, this problem is still not solved. I will get fix this error hereafter if it is super boring weekend.

Solve ethernet connection of Ubuntu 22.04 on ASUS PRIME X870-P WIFI-CSM mother board

Recently, I remember it was Sunday (11/24/2024) on this week, it was super boring day and I did not want to do anything, and then I just gazed the Ubuntu repository by just hiting “apt search realtek”. The output was the below.

Of course, I already installed r8125-dkms because the device is RTL8125. But I gazed the next line, r8168-dkms, like, oh well, it really similar to r8125… Should I tri it??, I think I should, because it wont work at this rate….so try it anyway.

I hit just 1 line describing below.

Bash
# IMPORTANT; Of course, you need to install build-essential and other essential packages before installing r8125-dkms and r8168-dkms.

sudo apt install r8168-dkms # it installed over the installation of r8125-dkms, and then ethernet was finally worked. I did not removed r8125-dkms, I mean I did nothing to r8125-dkms after r8125-dkms installation.

Then, suprisingly, the internectconnection is finally established!! Who knows!!??? What was r8125??? I don’t know, but it is OK, it is totally working without any problem. this r8168-dkms was installed over the installation of r8125-dkms, and then ethernet was finally worked. I did not removed r8125-dkms, I mean I did nothing to r8125-dkms after r8125-dkms was installed, no remove and no any modification becuase I don’t know the detail….

I think this is good lessen for driver installation on Ubuntu with newer devices. Again, I will try to fix bluetooth connection when I will on super boring and lazy day. My bluetooth (Mediatek 7925) is still dysfunction. Probably it is caused by driver load at startup.