HeadlinesBriefing favicon HeadlinesBriefing.com

Installing Realtek r8168 DKMS Driver on Rocky Linux

DEV Community •
×

If your Realtek NIC performs poorly with the default `r8169` driver on Rocky Linux running ELRepo's `kernel-lt`, switching to Realtek's out-of-tree r8168 driver via DKMS offers a stable fix. This method automatically rebuilds the module for each kernel update, preventing breakage common with third-party kernels.

The process requires enabling ELRepo and EPEL, then installing matching `kernel-lt-devel` headers. You'll download the r8168 tarball from Realtek, place it in `/usr/src`, and create a `dkms.conf` file to define the build steps. This ensures the driver compiles against your specific kernel version.

After registering, building, and installing the DKMS module, blacklist `r8169` to prevent conflicts and rebuild your initramfs. A reboot confirms the switch. With `AUTOINSTALL` enabled, DKMS handles future kernel updates, making it a robust solution for maintaining network stability on custom kernels.