Ubuntu Debian Linux Mint r8169 r8168 Network Driver Problem and Solution

This problem has been around forever, Linux seems to think it is fine to use the r8169 driver for an r8168 NIC but this often causes problems including the link not working at all.

In my case ethttool shows the link up and detected but it simply does not work especially on a laptop that has been resumed from suspension.  Sometimes it takes several minutes for it to work or to unplug and replug the ethernet.

Here is the solution:

Install the r8168 Driver:

sudo apt-get install r8168-dkms

Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  r8168-dkms
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 85.0 kB of archives.
After this operation, 1,109 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 r8168-dkms all 8.041.00-1 [85.0 kB]
Fetched 85.0 kB in 0s (98.3 kB/s)  
Selecting previously unselected package r8168-dkms.
(Reading database ... 325617 files and directories currently installed.)
Preparing to unpack .../r8168-dkms_8.041.00-1_all.deb ...
Unpacking r8168-dkms (8.041.00-1) ...
Setting up r8168-dkms (8.041.00-1) ...
Loading new r8168-8.041.00 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.0-170-generic
Building initial module for 4.4.0-170-generic
Done.

r8168:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-170-generic/updates/dkms/

depmod.....................................................

Backing up initrd.img-4.4.0-170-generic to /boot/initrd.img-4.4.0-170-generic.old-dkms
Making new initrd.img-4.4.0-170-generic
(If next boot fails, revert to initrd.img-4.4.0-170-generic.old-dkms image)
update-initramfs....

DKMS: install completed.

Blacklist the r8169 driver from loading on reboot:

echo "blacklist r8169"  > /etc/modprobe.d/blacklist-r8169.conf

 

Now to enable it right away:

*Note this will take down your network connection:

sudo rmmod r8169

sudo modprobe r8168

sudo systemctl restart networking

sudo systemctl restart network-manager

After that your network should come back up and work better.


Tags:

ubuntu, debian, linux, mint, solutionthis, nic, ethttool, detected, laptop, resumed, suspension, unplug, replug, ethernet, install, sudo, apt, dkms, lists, dependency, packages, installed, upgraded, newly, kb, archives, additional, disk, http, archive, xenial, amd, fetched, selecting, previously, unselected, database, directories, currently, preparing, unpack, dkms_, _all, deb, unpacking, loading, installation, kernels, generic, initial, module, sanity, kernel, installing, lib, modules, updates, depmod, backing, initrd, img, fails, revert, update, initramfs, completed, blacklist, reboot, echo, quot, etc, modprobe, conf, enable, rmmod, systemctl, restart, networking,

Latest Articles

  • how to use ifplugd in Linux to execute a command or script when a NIC cable is unplugged or plugged in
  • dd how to backup and restore disk images including compression with gzip
  • mpv / mplayer with Radeon / AMD GPU Video Card Driver enable VDPAU GPU Accelerated Video Decoding
  • Wordpress Reset Blog User Password from MySQL Using Linux Bash and not PHPMyadmin
  • Ubuntu Linux Mint Debian xorg performance and tear-free tuning for AMD Radeon Based Cards
  • Centos 7 Stopped and Disabled Firewalld and ports still blocked
  • MariaDB / MySQL Reset Root Forgotten Password on Centos 7
  • Centos 7 How to install Mysql/Mariadb
  • PHP 7.2, Apache and Centos 7 How To Install
  • Ubuntu Debian Linux Mint r8169 r8168 Network Driver Problem and Solution
  • Linux 3D Performance benchmarks with glxgears 59-60fps solution
  • How To Install Asterisk 16 17 on Debian Ubuntu Linux
  • Linux Ubuntu Debian Centos How To Make a Bootable Windows 7, 8, 10, 2016, 2019 Server USB from ISO
  • How To Restore Windows MBR Bootsector from Linux using syslinux
  • Linux Ubuntu Cannot Print Large Images
  • Cannot Print PDF Solution and Howto Resize
  • Linux Console Login Screen TTY Change Message
  • Apache Cannot Start Listening Already on 0.0.0.0
  • MySQL Bash Query to pipe input directly without using heredoc trick
  • CentOS 6 and 7 / RHEL Persistent DHCP Solution