r8168/r8169 RealTek driver module troubles

20,568

Solution 1

From the comments...

Using r8168-dkms 8.041.00 with the newer 4.15 kernel on Ubuntu 16.04 LTS won't work. You'll probably need 8.045.

The bionic version, r8168-dkms 8.045.08-2 from https://packages.ubuntu.com/search?keywords=r8168-dkms wouldn't compile. The cosmic -3 version would have probably worked fine.

r8168-dkms 8.045.08-3 from http://mirrors.edge.kernel.org/ubuntu/pool/universe/r/r8168/ works fine.

The system is operational now.

Note: kernel 4.15.0-24-generic has some known issues. Best to use another kernel if other problems arise.

Update #1:

r8168-dkms 8.046.00-1 has become available at http://mirrors.edge.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.046.00-1_all.deb

Update #2: (August 2019)

r8168-dkms_8.047.02-1 is now available at here.

Solution 2

Here's what worked for me under Linux Mint 19.2

  1. Grab a copy of the latest r8168 driver (or download it via another computer and put it on USB storage)

     wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.047.02-1_all.deb
    
  2. Install that driver (will automatically regenerate initramfs kernel image with integrated driver)

     dpkg -i r8168-dkms_8.047.02-1_all.deb
    
  3. Remove elder driver, blacklist it, and use newer one

     rmmod r8169
     echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf
     modprobe r8168
    
  4. Profit (and try if everything works after a fresh boot)

Share:
20,568

Related videos on Youtube

Oualid
Author by

Oualid

Updated on September 18, 2022

Comments

  • Oualid
    Oualid over 1 year

    I installed NVIDIA GT 1030 proprietary driver for Linux X86 64 bits in Ubuntu 16.04 LTS. Since, Ethernet driver module becomes unstable; it does not start automatically after login or resume after suspend until I type $sudo modprobe r8169. I tried to fix the problem using $sudo systemctl restart network-manager.service, but in vain.

    I went through the forums and learned that this module is unstable and the best way to get things work is to return back to r8168 driver. I blacklisted r8169 in /etc/modprobe.d/blacklist.conf and tried to compile r8168 for my 4.15.0 linux kernel, however it does not. I tried to install r8168-dkms package from the repository but does not succeed.

    Now I have r8169 driver working but with Networking Interface initially UNCLAIMED. Any help is welcome.

    • Boris Hamanov
      Boris Hamanov almost 6 years
      Please give me more detail about the errors you received when trying to install r8168-dkms. Regarding "unclaimed", did you manually remove your entry in blacklist.conf? Report back to @heynnema.
    • Oualid
      Oualid almost 6 years
      @heynnema: the build process of r8168-dkms failed and reported the following error: 'ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/r8168-dkms.0.crash' Error! Bad return status for module build on kernel: 4.15.0-24-generic (x86_64)' About the unclaimed network device, I edited the file '/etc/modprobe.d/blacklist.conf' to install NVIDIA driver, then undo all the changes.
    • Boris Hamanov
      Boris Hamanov almost 6 years
      What version r8168-dkms driver are you using?
    • Oualid
      Oualid almost 6 years
      @heynnema: it's 8.041.00
    • Boris Hamanov
      Boris Hamanov almost 6 years
      That's too old for the 4.15 kernel. Are you getting that from Synaptic? You probably need the .045 bionic driver. Get it at packages.ubuntu.com/search?keywords=r8168-dkms. Also, understand that the -24 kernel has number of issues, and you might try booting an earlier version, and see if that helps. If any of this helps, let me know, and I'll write a formal answer for you to accept.
    • Oualid
      Oualid almost 6 years
      @heynnema: unfortunately, the 8.045.08 gives the following compile error: implicit declaration of function ‘setup_timer’ [-Werror=implicit-function-declaration] setup_timer(timer, rtl8168_esd_timer, (unsigned long)dev); ^ cc1: some warnings being treated as errors make[3]: *** [/home/oualid/Downloads/r8168-8.045.08/src/r8168_n.o] Error 1 make[2]: *** [_module_/home/oualid/Downloads/r8168-8.045.08/src] Error 2 make[1]: *** [modules] Error 2 make: *** [modules] Error 2
    • Boris Hamanov
      Boris Hamanov almost 6 years
      Do a Google search for "r8168-dkms backport 16.04", and look for the .044/.045 driver that's been backported for the 4.15 kernel.
    • Oualid
      Oualid almost 6 years
      @heynnema: I think I've fixed the problem. I found r8168-dkms in mirrors.edge.kernel.org/ubuntu/pool/universe/r/r8168 version 8.045.08-3 that I downloaded and successfully installed. Since, the Ethrenet driver automatically load at start and after suspend. Thank you for your help.
    • Terrance
      Terrance about 3 years
      You should actually include the output of sudo lshw -C network. The r8168 and r8169 are actually two different chipsets. While the r8169 can work with a r8168 it is very unstable if running on the RTL8111/8168/8411 cards.
  • user25406
    user25406 over 3 years
    I need to report this. I downloaded the driver and run the install as quoted in question 2 but I got an error message so the initramfs kernel was not updated. I am using Kubuntu 18.04 (latest version) with latest kernel 5.0...
  • Terrance
    Terrance about 3 years
    You should not override your entire blacklist.conf file. The command should be echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf
  • Orsiris de Jong
    Orsiris de Jong about 3 years
    Good catch, thanks.