WARNING: This post is really old and it happens that it doesn’t work with newer Kernels ( >= 4.0). You should check out my new article if you want to install the driver for your RTL8111/RTL8168. You can check out the new article here: Click me (updated guide).
The most of the Realtek ethernet cards are working out of the box on a Linux machine. But some of them, for e. g. the RTL8111/RTL8168, making some troubles.
In the last three Ubuntu Versions (11.10, 11.04 and 10.10) and the latest Debian testing, you will have the problem, that the noticed ethernet card above will only work with round about 200kb/s and after a while the whole network connection will break down for more than a minute and than you will be back with your 200kb/s again.
So, this is really annoying and it’s nearly impossible to work with your machine. To solve this problem you have to use the official Realtek (r8168) driver instead of the r8169 driver, which is included in the Linux Kernel.
This tutorial will show you in a few steps, how you can build the official Realtek driver for the RTL8111/RTL8168 ethernet card for Ubuntu or Debian:
1. Get rootprivileges
Get root privileges, while typing „su“ or (when you use Ubuntu) „sudo -s“ in a terminal.
2. Get the requirements
To build and install the driver, we need the kernel headers and the build tools like gcc. To get them, just easily type in a terminal:
apt-get install build-essential
3. Get the driver
Now, go to the official download page from Realtek for the Linux/UNIX Driver for the RTL8111/RTL8168 ethernet card and download the latest driver version.
Link: Realtek Download Page
4. Untar the archive
The driver is compressed to an archive. So uncompress it with the following command:
Realtek RTL8111 / RTL8168 KEXT, Inject via CLOVER. The new Apple MacBook Pro Touchbar, 2016 is quite the mixed bag. This package provides the driver for Realtek RTL8111G Ethernet Controller and is supported on Latitude 3540 running the following Windows Operating System, Win 7. I loaded 6.7 and it didn't recognize my Realtek 8111C. FWIW: Motherboard is GA-MA770-DS3 Rev2.0 Not sure if I should continue looking for a driver that will work for 6.7 or just get something like a TP-Link PCI card for which there is a driver available.
tar xfvj r8168-8.025.00.tar.bz2
NOTE: Please do not forget to replace the „r8168-8.025.00.tar.bz2“ with the driver version which you have downloaded!
5. Blacklist old driver
We have to blacklist the old driver (r8169) to prevent the system to load it. To do this, easily set a new entry in „/etc/modprobe.d/blacklist.conf“ which is called:
or just enter in the terminal again
echo „blacklist r8169“ >> /etc/modprobe.d/blacklist.conf
to do this in only one command.
6. Build and install the new driver
Now, the whole requirements to install the new driver are done. Let us now change in the driver directory, which we have uncompressed in a few steps before:
NOTE: Again, please do not forget, to change „r8168-8.025.00“ to the version which you have downloaded.
The only think we have to do now is, to build the driver and install it. To build it, just type:
make clean modules
after a few secondes (depending on your CPU), the driver is build and you can install it with:
7. Welcome r8168
One of our last steps is, to let the system know about the r8168 driver. With the command
Realtek Rtl8168 8111 Pci E
Realtek Rtl8168 811
you rebuild the kernel module dependencies and with an
Realtek Rtl8168 Driver
you insert the new kernel module (the driver) into the kernel.
8. Make it available for boot
To always use the new module, you have to make a new initrd boot file. Just do
mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
in a terminal. Here we make the initrd file with the help of the „uname -r“ command, which allows us to get the version of the actually running kernel.
At least, you have to add in the „/etc/modules“ file a new entry, which is called „r8168“, to get the driver automatically loaded after boot. As an alternative you can do the last step again with only one command:
echo „r8168“ >> /etc/modules
Realtek Rtl8168 8111 Driver Download
That’s it! After a reboot you should have the best possible performance with the RTL8111/RTL8168 and additionally no other network problems should be available anymore (no break down).
After the reboot you can check if the right driver is loaded with this command:
Realtek Rtl8168 For Macbook
Realtek Rtl8168 Windows 10 Driver
Realtek Rtl8168 For Mac Os
with this command you should find your RTL8111/RTL8168 network card in a list and the additional command „Kernel driver in use: r8168“.