How to Install Realtek RTL8126 Drivers on Linux

Hello folks,

Recently, I bought a brand new computer with the PRO-X870-P-WIFI motherboard. It has a Realtek® 8126VB 5G LAN port.

I have been running Linux for a while, especially Solus. I was surprised when I realized that my 5GbE port was not natively supported.

I started looking for drivers on Realtek or MSI, but with no luck—I couldn't find anything for Linux.

Then I came across this repository (thanks to openwrt):

GitHub - openwrt/rtl8126: Realtek 8126 Linux driver
Realtek 8126 Linux driver. Contribute to openwrt/rtl8126 development by creating an account on GitHub.

Realtek 8126 Linux driver

It is basically the driver I need for my 5Gbe LAN port.

How to Install Realtek RTL8126 Drivers for the 5GbE LAN Port on Linux

Disclaimer: My Solus installation is brand new, so I needed to install a couple of prerequisites first:

  1. linux-current-headers - version 6.11.10
  2. binutils - version 2.43.1

Steps to Install the Driver

  1. Clone the repository
git clone https://github.com/openwrt/rtl8126.git
  1. Navigate to the folder containing the source:
cd rtl8126
  1. Run the following commands
sudo make  
sudo make install  
sudo modprobe rtl8126

Then voilà! Your Ethernet interface will be recognized, and you'll have access to the internet through the port.

Note: My port was recognized as a 2.5GbE port on my Solus setup. I believe this is mainly because my Ethernet connection delivers 2.5GbE, and I don’t have higher bandwidth throughput to test beyond that.

I hope this helps!