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

  • python mysql install error: /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version
  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide