# realtek-r8125-dkms: the 2.5 GbE driver that survives kernel upgrades

> realtek-r8125-dkms packages the Realtek RTL8125 driver for Linux in the DKMS form, so the newest driver keeps working after a kernel upgrade, and it is installable from a Debian package, a Launchpad PPA or a script. The judgement is that the packaging work is the real contribution, and that the module priority problem between r8125 and r8169 is the thing every user has to solve by hand.

**awesometic/realtek-r8125-dkms** — A DKMS package for easy use of Realtek r8125 driver, which supports 2.5 GbE.

- Repository: https://github.com/awesometic/realtek-r8125-dkms
- Stars: 716 · Forks: 105
- Language: C
- License: GPL-2.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/awesometic-realtek-r8125-dkms

## A driver that is rebuilt when the kernel changes

realtek-r8125-dkms provides the Realtek r8125 driver in the DKMS way, so that you can keep the latest driver even after a kernel upgrade. That single sentence is the whole project, and it is a smaller idea than it sounds.

The problem it solves is the packaging problem of out-of-tree drivers. A Linux distribution ships a kernel module for the Realtek RTL8125, and that module is usually the older r8169, because the r8125 driver is not in the mainline tree. When you upgrade the kernel, the in-tree module is rebuilt for the new kernel and your card goes back to the old driver. A DKMS package does not have that problem, because DKMS rebuilds the out-of-tree module for every kernel you install.

So the package is a small piece of glue: the Realtek driver source, a dkms.conf that says which kernel versions it supports, and a Debian package that installs the lot.

The driver itself is the vendor's. The Makefile in the repository states that r8125 is the Linux device driver released by Realtek Semiconductor for 2.5 Gigabit Ethernet controllers with a PCI-Express interface, and the copyright line is Realtek Semiconductor Corp, with the NIC software team in Hsinchu Science Park in Taiwan named as the author. The readme records the patents the product is covered by, three of them, which is the kind of detail that only appears in vendor source.

The project is GPL 2 licensed, and the last push was on 2026-07-25, with the newest release, 9.018.00-1, published on the same day.

## Check whether you have the PCI card or the USB adapter

There is a warning at the top of the readme, and it is the kind that saves an afternoon.

This DKMS package is for Realtek RTL8125 Ethernet, r8125 in the module name, which is designed for the PCI interface. If you are searching for the Realtek 2.5 Gbits USB Ethernet adapter, which may use RTL8156, r8152 in the module name, you are in the wrong place, and the readme points to a different DKMS project for that driver, the Realtek R8152 package maintained by the same author.

The two adapters are visually similar, sell for similar money and are both sold as 2.5 gigabit, and their kernel modules are different. The Realtek naming is also not a reliable guide, because the module name is not the model number, so the module r8152 is the driver for the RTL8156 chip.

So the check before you install anything is to see which module your kernel is currently using for that adapter, which is also the first step of the troubleshooting flow later in the readme. The project is explicit that it is a driver for one chip on one bus, and everything else about the package, the firmware handling, the module names, the blacklisting, assumes that.

That is worth noting because the repository covers both the hardware question and the software question, and the hardware question is the one people get wrong.

## Three installation routes, and they are not the same thing

There are three ways to install the module, the readme says, and that you can do all three but absolutely do not need to. The key difference between them is whether the module survives a kernel upgrade, and the readme is careful to say which is which.

The recommended route is the Debian package, downloaded from the Release tab of the repository and installed with dpkg:

```bash
sudo dpkg -i realtek-r8125-dkms*.deb
```

The wildcard is a trap, and the readme says so, if several files are selected you should type the specific version of the file, for example the file name with the architecture in it. A dependency error is fixed with the apt equivalent, sudo apt install --fix-broken.

The Launchpad PPA is marked recommended in the readme, and it is the route that gets the newest driver, because the PPA is updated by the maintainer rather than being a fixed file. Adding it and installing is two commands:

```bash
sudo add-apt-repository ppa:awesometic/ppa
sudo apt install realtek-r8125-dkms
```

The third route is the script that Realtek itself ships in its own driver package, the autorun.sh script, and the readme is explicit that this is not installed as a DKMS and only applies to the current kernel. The fourth option, dkms-install.sh, comes from the aircrack-ng team and does install the module properly.

So of the four, two give you a DKMS module that follows your kernels, and one is the vendor script that does not.

## r8169 loads first, and the blacklist is the fix

Installing the driver is not the end of it, and the readme devotes a section to the failure that catches people.

After installing the package you may not be able to use the new r8125 module on the fly, because the existing r8169 module will be loaded with priority and that prevents the r8125 module from working. The check is a single command:

```bash
lsmod | grep -i r8169
```

If there is a result, the r8125 module was probably not loaded properly, and the readme points at lspci -k and dmesg as the other ways to see which modules are in use.

The fix is to stop the old module from loading, by writing a blacklist file:

```bash
sudo tee -a /etc/modprobe.d/blacklist-r8169.conf > /dev/null <<EOT
# To use r8125 driver explicitly
blacklist r8169
EOT
```

Then the initramfs has to be updated with sudo update-initramfs -u, and the machine has to be rebooted for the blacklist to apply. The readme is careful about the order, because the blacklist is read when the initramfs is built.

There is a third case, and it is the awkward one. If you need both r8169 and r8125 loaded, removing the r8125 firmware might make it work, with the command to delete the r8125 firmware files from the firmware directory. The readme calls that a workaround, and says you have to do it every time you install a new kernel version or new Linux firmware, and that in the case of the Debian package the author intends to update the scripts to do this during the installation.

## Building the Debian package yourself

For a distribution that does not carry the package, or for a local change, the readme documents building the Debian package from the repository.

The dependencies are the usual set for a packaging job:

```bash
sudo apt install devscripts debmake debhelper build-essential dkms dh-dkms
```

devscripts and debmake for the packaging tooling, debhelper for the build rules, build-essential for the compiler, and dkms with dh-dkms, the latter being the piece that teaches debhelper how to build a DKMS module, since a DKMS package has to build a kernel module for the running kernel rather than compiling a normal binary.

And then the build itself:

```bash
dpkg-buildpackage -b -rfakeroot -us -uc
```

The flags are the familiar ones, a binary-only build, a fake root so the packaging tools do not need real privileges, and the flags to omit the signing and the changelog entries that would otherwise be required.

The repository also carries the pieces such a package needs. There is a debian directory with the packaging rules, a dkms.conf describing the module and the kernel versions it supports, the dkms-install.sh and dkms-remove.sh scripts, the vendor autorun.sh, the driver source under src, and a REALTEK_README.txt that is the vendor's own documentation for the driver. The Makefile at the root has the module build rules, and it contains one piece of history that explains itself: a conditional that switches to a different source makefile for the 2.4 series of kernels, detected from the kernel version with a sed expression, because the driver's build system for those kernels is not the same as for the current ones.

## Where the packaging idea came from

The readme has a short references section, and both entries are worth reading.

The first is the Realtek r8125 driver release page, which is where the driver source itself comes from, and the second is ParrotSec's realtek-rtl88xxau-dkms project, which the readme says is where the author got the hint.

That is the whole lineage of the project in one sentence. Realtek writes the driver and publishes it as a tarball with a script, ParrotSec packaged a different Realtek chip for Debian with DKMS, and this repository does the same for the RTL8125.

The Debian packaging directory in the repository is where that work lives, and the readme notes that the Debian package is the recommended installation route precisely because it is the one that gets the newer driver, which is the whole purpose of the project.

The version numbering follows the driver's own, so 9.018.00-1 is the packaging version of Realtek driver 9.018.00 with a Debian revision of 1, and the releases listed show the two August 2025 builds, 9.016.00-1 and 9.016.01-1, followed by the 2026-07-25 build of 9.018.00.

The licence is GPL 2 on the Realtek driver and on the Debian packaging, so the whole artefact, both the vendor code and the packaging around it, is redistributable under the GPL 2.

## Conclusion

realtek-r8125-dkms fits a Linux user with a Realtek RTL8125 card whose kernel ships the older r8169 driver, because the DKMS packaging rebuilds the module against whatever kernel is installed, so the card gets the current driver without a distribution patch. It is the wrong choice if you are looking for the USB adapter, because that is the r8152 module and a different project, and it is the wrong choice if you cannot reboot, because the r8169 blacklist only takes effect after an initramfs rebuild and a restart. Before you install, check which module your card is actually using with lsmod, and if you need both drivers loaded, know that the documented workaround has to be repeated after every kernel or firmware update.

## FAQ

### What does the realtek-r8125-dkms package do?

It packages the Realtek RTL8125 driver for Linux in the DKMS form, so the module is rebuilt for each kernel you install and the card keeps the newest driver after a kernel upgrade. The driver source is the vendor's and the packaging is GPL 2 licensed.

### How do I install it?

There are three routes that do not interfere with each other. The Debian package from the repository's Release tab, installed with dpkg and fixed with apt install --fix-broken if dependencies fail, the Launchpad PPA with add-apt-repository and apt install, or the dkms-install.sh script. The vendor's own autorun.sh is not installed as a DKMS and only applies to the current kernel.

### Why is the r8125 driver not being used after installation?

The existing r8169 module loads with priority and prevents r8125 from working. Check with lsmod | grep -i r8169, then blacklist r8169 in a file under /etc/modprobe.d, run update-initramfs -u and reboot.

### Is this package for the Realtek USB Ethernet adapter?

No. It is for the RTL8125 chip on the PCI interface, the r8125 module. The 2.5 gigabit USB adapter may use the RTL8156 chip with the r8152 module, and the readme points to a separate DKMS project for that driver.

## Sources

- [awesometic/realtek-r8125-dkms on GitHub](https://github.com/awesometic/realtek-r8125-dkms)
- [Issues](https://github.com/awesometic/realtek-r8125-dkms/issues)
- [License: GPL-2.0](https://github.com/awesometic/realtek-r8125-dkms/blob/master/LICENSE)
- [README](https://github.com/awesometic/realtek-r8125-dkms/blob/master/README.md)
- [Releases](https://github.com/awesometic/realtek-r8125-dkms/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/awesometic-realtek-r8125-dkms
