I've been using Ubuntu for over 10 years, but dealing with Realtek LAN drivers is always a pain.
r8169.r8169: Included by default in the Linux kernelr8125, r8126, r8168, r8101:
r8125: Supports 2.5G Ethernet (2500mbps)r8126: Supports 5G Ethernet (5000mbps)r8168: Supports GBE Ethernet (1000mbps)r8101: Supports FE Ethernet (100mbps)When searching the internet, many people switch from
r8169tor8168, but you should use the driver that matches your controller. For example, if your controller isRealtek RTL8125 2.5GbE Controller, switching tor8169will obviously prevent the driver from being recognized by Ubuntu.
sudo lshw -C network
*-network
description: Ethernet interface
product: RTL8125 2.5GbE Controller
vendor: Realtek Semiconductor Co., Ltd.
# ...
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=6.8.0-38-generic duplex=full firmware=rtl8125b-2_0.0.2 07/13/20 ip=192.168.0.100 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
# ...
product field, you can identify the controller type, and the current driver in use can be seen in the configuration.driver field.RTL8125 2.5GbE Controller, the process below will switch to the r8125 driver.
- Below are two methods to switch to the Realtek driver.
- Be sure to use only one method, either
aptormanual installation. Using both can make it very difficult to remove one later.
sudo apt install r8125-dkms -y
echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf
apt upgrade.Unix (Linux) section.tar -xvf) and run the autorun.sh script inside the directory with root privileges.sudo ./r8125-9.013.02/autorun.sh
update-initramfs -u runs automatically.r8169 driver and the newly installed Realtek driver coexist on the system.r8169 driver from loading at boot, add it to the modprobe blacklist.echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf
r8169 to the modprobe blacklist, run update-initramfs again to apply the blacklist at boot.sudo update-initramfs -u
sudo lshw -C network
*-network
description: Ethernet interface
product: RTL8125 2.5GbE Controller
# ...
# The driver in the configuration field should now be r8125
configuration: autonegotiation=on broadcast=yes driver=r8125 driverversion=9.011.00-NAPI duplex=full ip=192.168.0.100 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
# ...
- Initially, I tried to change the network interface speed to
1000usingethtool, but the interface kept goinglink down, and DHCP IP allocation failed. This led me to explore further.sudo ethtool -s eno1 autoneg off speed 1000 duplex full
- I still haven't found a way to switch the network interface to Gigabit properly. (The sorrow of using a 2500 mbps capable network controller at only 100 mbps...)