No Ethernet Connection in Ubuntu 16.04/Linux Mint 18 with Realtek RTL8111/8168/8411
NOTE: Now I am using Linux Mint 19 (based on Ubuntu 18.04). Even after installing all updates (including Kernel), I have not experienced this problem.
After installing Linux Mint 18.3, I did some weird things and lost my Ethernet connection though WiFi was working properly. I tried reinstalling Network Manager but no luck.
After some Google search, I was able to find the solution but it was not trivial to find based on provided solutions. This article is written to help people having the same problem. Please make sure that you have the same hardware before applying the solution provided here.
- The most obvious symptom: NO Ethernet connection
- No option for Wired connection in Network Settings dialog
eth0or alternative representations in
lshw -C networkprints *-network UNCLAIMED as below:
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
- Furthermore, when I installed a new Linux Kernel, I got an error similar to this:
$ cat /var/lib/dkms/r8168/8.043.02/build/make.log
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_rx_interrupt’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:24846:28: error: ‘struct net_device’ has no member named ‘last_rx’
dev->last_rx = jiffies;
The solution is quite simple:
r8168-dkms driver which caused to this problem.
sudo apt purge r8168-dkms
2. Upgrade your kernel to
4.13 which contains the driver for Realtek RTL8111/8168/8411. At the time of writing this post, the Kernel version is:
As a bonus, installing Linux Kernel
4.13.0-26also fixed my unstable WiFi connection.
Update: Jan 24th 2018
Everything was flawless until I upgraded to Linux Kernel
4.13.0-31 which broke the Ethernet connection again. This time
enp3s0f1 was listed in
ifconfig but the network manager was unable to connect.
After spending an hour, I found a proper fix. The problem was
r8168 driver. The default driver available in Ubuntu 16.04 PPA does not support Linux Kernel 4.13. Since
r8168 was not available,
r8169 was used for Ethernet. You can see this by executing:
ethtool -i enp3s0f1
In my system, the output was:
Following this article, I manually installed the latest proprietary
r8168 Realtek driver.
1. Install dependencies:
sudo apt-get install build-essential linux-headers-$(uname -r)
2. Download the r8168 driver.
If you run Linux Kernel 4.14 or less, download “LINUX driver for kernel up to 4.7” from here which is the official driver provided by Realtek. This driver does not compile with Linux Kernel 4.15.
Thanks to Fintecheando DevOps who maintains and shared a patched version for Linux Kernel 4.15 in the comment below. Since I am using Linux Mint 19 without any problems, I did not test his driver. Please use this driver at your own risk (There is nothing personal. I just want to remind you that the patch is not official). Clone the patch from his GitHub repository.
3. Blacklist the r8169 driver
sudo sh -c ‘echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf’
4. Extract the archive, if you have downloaded the driver from the official site.
tar xfvj 0010-r8168–8.045.08.tar.bz2
5. Compile and install the driver
Driver from official website:
Patched driver from GitHub:
6. Check the driver
$ lsmod | grep r8168
r8168 520192 0
7. Check whether the driver is loaded properly
ethtool -i enp3s0f1
8. Restart the computer
I found these AskUbuntu questions useful but none of them ask the exact problem I had. Therefore I end up writing this post to make life easier.