Skip to content

Fighting RTL8111-8168-8211-8411 PCI Express Gigabit Ethernet Controller in Ubuntu 24.04

Posted on:January 29, 2025 at 09:05 PM

Introduction

If you’re using Ubuntu 24.04 and experiencing issues with your RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller, you’re not alone. Many users have reported connectivity problems, slow speeds, and other network-related issues with this particular hardware. In my particular case, my computer had an upload speed of 4Mbps.

Identifying the Problem

The first step in resolving any hardware issue is to identify the problem. You can use the lspci command to check if your system recognizes the Ethernet controller. Among so many lines, this showed:

RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller

The second step is to check which module is currently loaded for your Ethernet controller using the lsmod command. In my case, the r8169 module was loaded:

lsmod | grep r8169

First attempt to solve it.

To try to resolve the issue (as read in some forums), i decided to replace the r8169 module with the r8168 module. My journey began by installing the r8168-dkms package, hoping that this would be the silver bullet to my network woes. With the package installed, I moved on to the next step: editing the GRUB configuration. I modified the GRUB_CMDLINE_LINUX_DEFAULT line to include modprobe.blacklist=r8169, effectively blacklisting the troublesome module.

Feeling optimistic, I updated GRUB and proceeded to blacklist the r8169 module by adding it to the blacklist configuration file. To ensure that all changes would take effect, I updated the initial RAM filesystem. With everything set, I rebooted my system, eager to see if my efforts had paid off.

Upon rebooting, I verified that the r8168 module was indeed loaded and the r8169 module was not. However, much to my dismay, the problem persisted. My upload speed remained stubbornly low, and it became clear that this solution had not resolved the issue.

Final solution.

After trying the above steps and even disabling auto-negotiation, which also didn’t work, I decided to use the manufacturer’s driver with the steps outlined below:

  1. Remove r8168-dkms if installed:
sudo apt purge r8168-dkms
  1. Install necessary packages:
sudo apt-get install build-essential linux-headers-$(uname -r)
  1. Blacklist the r8169 driver:
sudo sh -c 'echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf'
  1. Download and install the GBE Ethernet LINUX driver r8168 for kernel up to 6.8 from Realtek:

After downloading the driver, open the terminal and locate the file:

cd /path/to/downloaded/driver
tar xfvj r8168-8.054.00.bz2
cd r8168-8.054.00
  1. Run the installation script:
sudo ./autorun.sh
  1. Verify the driver is working:
  1. Reboot the system.

Conclusion

Finally, the problem was solved and now I enjoy the full upload capacity without the limitations I had before. It is important to note that each time the kernel is updated, it will be necessary to reinstall the driver, but this small inconvenience is worth it to maintain optimal network performance. Additionally, I will continue to test future versions of the kernel driver or the r8168-dkms module, hoping that they will resolve the issue and eliminate the need of this workaround.