Post

Realtek

Realtek

Fixing the Realtek RTL8126 5GbE Ethernet Issue on Arch Linux

If you’ve recently upgraded your system or installed Arch Linux on modern hardware featuring the Realtek RTL8126 5GbE Ethernet controller, you might find yourself with a network interface that’s recognized but refuses to establish a link. Symptoms typically include your Ethernet interface (enp14s0 or similar) showing NO-CARRIER despite being plugged in.

Here’s a clear, detailed guide to understanding and resolving this issue.

Understanding the Problem

The standard Linux kernel driver for Realtek Ethernet chips, known as r8169, supports a wide range of Realtek NICs but has limited support for newer controllers like the RTL8126. When r8169 loads for an RTL8126 device, the driver doesn’t properly configure the PHY (Physical Layer) registers. This misconfiguration leaves the chip stuck in a low-power or inactive state, resulting in the Ethernet port showing no connection (NO-CARRIER).

To fix this, you need Realtek’s dedicated driver specifically for the RTL8126, provided via the AUR (r8126-dkms). However, there’s an additional critical step: the RTL8126’s PHY registers persist through warm reboots due to residual auxiliary power. A regular reboot won’t clear these registers, meaning the problem persists unless the system is fully power-cycled.

Step-by-Step Solution

Step 1: Install Required Tools

First, ensure you have the necessary packages to build and manage DKMS drivers:

1
sudo pacman -Syu --needed base-devel dkms linux-headers git

Step 2: Install the Correct Driver from AUR

Install the specific Realtek driver (r8126-dkms) tailored for your chipset:

1
yay -S r8126-dkms

Verify the driver supports your RTL8126 chipset:

1
modinfo r8126 | grep 8126

You should see output containing the RTL8126 PCI ID (10ec:8126).

Step 3: Blacklist the Problematic r8169 Driver

The kernel may default to loading the incorrect r8169 driver. Prevent this by explicitly blacklisting it:

1
echo "blacklist r8169" | sudo tee /etc/modprobe.d/blacklist-r8169.conf

Step 4: Ensure the Correct Driver Loads Automatically

Ensure the correct r8126 driver loads on boot:

1
echo "r8126" | sudo tee /etc/modules-load.d/r8126.conf

Step 5: Update the Initial RAM Filesystem (initramfs)

Update the kernel’s initial RAM filesystem so these changes take effect immediately on the next boot:

1
sudo mkinitcpio -P

Critical Step: Perform a Hard Power Cycle

This step is mandatory. Simply rebooting the computer will not clear the residual register state of the RTL8126 PHY. You must:

  1. Fully shut down your computer:

    1
    
    sudo shutdown -h now
    
  2. Once powered off, physically switch off your computer’s PSU or unplug your system’s power cord from the wall.

  3. Wait a minimum of 10 seconds. This allows the residual charge in your motherboard and NIC’s capacitors to dissipate fully, resetting the NIC’s PHY registers.

  4. After 10 seconds, reconnect or switch on the PSU, and power your computer back on.

This full power-down procedure ensures the NIC initializes cleanly with the correct PHY settings.

Step 6: Verify Correct Driver Loading

Once your system boots back up, verify that the RTL8126 is using the correct driver:

1
lspci -k | grep -A3 8126

You should see:

1
Kernel driver in use: r8126

Step 7: Bring Up Your Network Interface

Finally, manually bring up the interface and request an IP address via DHCP:

1
2
sudo ip link set enp14s0 up
sudo dhclient enp14s0

Now your Ethernet connection should be active and fully functional.

Troubleshooting Tips

  • If the link remains down: Ensure you’ve correctly blacklisted r8169 and power-cycled your PC properly.
  • Verify connection speed: Run ethtool enp14s0. You should see negotiated link speed (e.g., 2500Mb/s).
  • Persistent issues after suspend: Consider disabling network power management features in your BIOS or operating system settings.

Conclusion

The critical, often overlooked step of physically powering down your system ensures the RTL8126’s PHY resets completely, allowing the specialized r8126-dkms driver to function correctly. This detailed explanation and procedure should permanently resolve connectivity issues for users experiencing “no carrier” errors with Realtek’s newer 5GbE Ethernet controllers.

This post is licensed under CC BY 4.0 by the author.