Resolving Network Connectivity Issues on Realtek RTL8111/RTL8168 Ethernet Controllers in Linux

Linux kernels typically load the open-source r8169 module for Realtek RTL8111/RTL8168/8411 Gigabit Ethernet controllers. While functional for many users, this default driver frequently exhibits packet fragmentation, intermittent link drops, or severe throughput degradation under heavy network loads. Replacing it with the manufacturer-supplied r8168 binary module usually restores stable connectivity.

Prerequisites and Environment Setup Before initiating any driver replacement, ensure active internet access via an altrenative interface (Wi-Fi, USB tethering, or secondary Ethernet port). If the primary adapter experiences critical packet loss, downloading packages or compiling sources directly may fail. In such scenarios, fetching required archives on a separate machine and transferring them via portable storage is advisable.

Automated Repository Installation Modern Debian and Ubuntu distributions host the r8168-dkms package within their non-free or universe repositories. Enabling these channels simplifies maintenance through DKMS (Dynamic Kernel Module Support), which automatically recompiles the module during system kernel upgrades.

Update your repository configuration files (/etc/apt/sources.list or /etc/apt/sources.list.d/*.list) to include the necessary components:

deb http://deb.debian.org/debian bookworm main contrib non-free
# For Ubuntu Jammy: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse

Synchronize package indices and trigger the installation:

sudo apt-get update
sudo apt-get install -y r8168-dkms dkms linux-headers-generic

Upon completion, restart the operating system. The dynamic linker will prioritize r8168 over r8169. Verify active module assignment using hardware inspection tools:

lspci -nnk | grep -iA3 ethernet | grep -i realtek | grep 'Kernel driver'

Expected output indicates successful takeover:

        Kernel driver in use: r8168
        Kernel modules: r8168

Manual Source Compilation Distribution repositories may lag behind or omit the proprietary firmware. Compiling from official releases or community mirrors provides immediate access to current revisions. Note that manual compilation requires rebuilding the module whenever the base kernel updates.

  1. Gather build dependencies:
sudo apt-get install -y build-essential linux-headers-$(uname -r) wget bc
  1. Prevent the default module from overriding your custom installation by blacklisting it in the modprobe directory:
echo -e "blacklist r8169\ninstall r8169 /bin/true" | sudo tee /etc/modprobe.d/disable_r8169.conf
sudo depmod -a
  1. Fetch the latest archived release and extract its contents:
DRIVER_VER="8.053.00"
DOWNLOAD_URL="https://github.com/mtorromeo/r8168/releases/download/v${DRIVER_VER}/r8168-${DRIVER_VER}.tar.bz2"
wget -O "${DRIVER_VER}.tar.bz2" "${DOWNLOAD_URL}"
tar -xjf "${DRIVER_VER}.tar.bz2"
cd r8168-${DRIVER_VER}
  1. Execute the provided instlalation script, which handles compilation, backup of conflicting objects, and initial loading:
sudo ./autorun.sh

Ignore any SSL certificate warnings during the build phase; they do not impact binary generation. The process concludes when the new module appears in the active kernel space.

Auto-Loading Configuration Occasionally, persistent boot processes may revert to built-in modules. Creating a dedicated systemd unit guarantees deterministic initialization at startup. Generate a service file under /etc/systemd/system/:

[Unit]
Description=Force Load Realtek r8168 Network Module
After=syslog.target network-pre.target
Requires=network-pre.target

[Service]
Type=oneshot
ExecStart=/sbin/modprobe r8168
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Activate and enable the daemon:

sudo systemctl daemon-reload
sudo systemctl enable --now r8168-init.service

Verification and Diagnostics Cross-check the operational driver against the physical PCI address of your adapter. Replace <interface_name> with your actual network device identifier:

ethtool -i <interface_name>

Valid installation returns version metadata and confirms driver binding:

driver: r8168
version: 8.053.00-NAPI
firmware-version: 
expansion-rom-version: 
bus-info: 0000:01:00.0
supports-statistics: yes
...

Alternative module status checks confirm kernel registration:

lsmod | grep '^r8168'
dmesg | tail -n 20 | grep -i rtl

Repository References Primary distribution packages rely on upstream maintainers and community mirrors. Reliable sources for architecture-specific builds include the official vendor catalog and verified GitHub archives tracking recent revision cycles. System administrators should periodically audit driver versions to align with emerging hardware revisions and security patches.

Tags: Linux network-drivers realtek rtl8111 rtl8168

Posted on Sat, 25 Jul 2026 16:57:53 +0000 by genericnumber1