Realtek RTL8111E8168B Ethernet driver doesn't work

13,670

Solution 1

This is a short guide to fix the problem concerning the following network chipset.

Ethernet controller: RealTek Semiconductor Co., Ltd RTL8111/8168B PCI Express Gigabit Ethernet Controller (rev 02)

Symptom

The networkcard fails to work properly while using the driver supplied in the kernel. NIC crashes seems to occure while transfering files above 100mbps however the problem sometimes occure during lower transfer rates too. The system itself doesnt crash and it can still be managed locally however all networkbased communication goes down. To fix this you can reboot the computer however its not an substantial solution its just a question of time unstil the NIC goes down again. Therefor you have to install the latest driver.

Solution/Fix | Download and apply the latest driver.

Install the kernel headers.

sudo apt-get install linux-headers-$(uname -r)

Install Build Essential.

sudo aptitude install build-essential

Download a driver for the appropriate kernel.

wget http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

this one : LINUX driver for kernel 2.6.x and 2.4.x (Support x86 and 64) 8.020.00 2010/11/15 55k

Extract the file and change directory.

tar xvfs r8168-8.018.00.tar.bz2
r8168-8.018.00/
r8168-8.018.00/Makefile
r8168-8.018.00/README
r8168-8.018.00/src/
r8168-8.018.00/src/rtl_eeprom.h
r8168-8.018.00/src/Makefile
r8168-8.018.00/src/r8168_asf.c
r8168-8.018.00/src/r8168.h
r8168-8.018.00/src/rtl_eeprom.c
r8168-8.018.00/src/r8168_asf.h
r8168-8.018.00/src/rtltool.h
r8168-8.018.00/src/r8168_n.c
r8168-8.018.00/src/Makefile_linux24x
r8168-8.018.00/autorun.sh

Change directory.

cd r8168-8.018.00/

Start the installation.

sudo ./autorun.sh
/home/goopen/r8168-8.018.00/src/r8168_n.c: In function 'rtl8168_get_ethool_stats' :
/home/goopen/r8168-8.018.00/src/r8168_n.c: 1745:2: warning: 'DMA_nnBIT_MASK' deprecated
/home/goopen/r8168-8.018.00/src/r8168_n.c: In function 'rtl8168_init_board' :
/home/goopen/r8168-8.018.00/src/r8168_n.c: 6517:6 warning: 'DMA_nnBIT_MASK' is deprecated
/home/goopen/r8168-8.018.00/src/r8168_n.c: 6520:3 warning: 'DMA_nnBIT_MASK' is deprecated
/home/goopen/r8168-8.018.00/src/r8168_n.c: In function 'rtl8168_hw_start' :
/home/goopen/r8168-8.018.00/src/r8168_n.c: 7096:2: warning: 'DMA_nnBIT_MASK' is deprecated
/home/goopen/r8168-8.018.00/src/r8168_n.c: 7098:2: warning: 'DMA_nnBIT_MASK' is deprecated
/home/goopen/r8168-8.018.00/src/r8168_n.c: In function 'rtl_get_eeprom' :
/home/goopen/r8168-8.018.00/src/r8168_n.c: 1794:10: warning: 'ret' may be used uninitialized in this function.
Depending module. Please wait.
load module r8168
Completed.

Now reboot your computer and it should be working again.

sudo reboot

Solution 2

See also here:

No network connectivity with Realtek 8111d

There is a solution by using the newest vendor driver. This is, however, only working for kernel 3.0. For kernel 3.1 or 3.2 I get "invalid module type" when I enter modprobe r8168. Does anyone have a solution.

For those with problems, check back these sites:

http://www.jamesonwilliams.com/hardy-r8168

http://www.twm-kd.com/linux/realtek-rtl81688111e-and-ubuntu-linux/

Update: Kernel 3.2 RC 4 solves the problem. Just type modprobe r8169 after removing any blacklisting line concerning this file.

Solution 3

Any problem with the RTL 8111 driver probably is caused by dual booting with Windows. When you shut off Windows, Windows will issue a command to disable NIC cards, to prevent boot-on-NIC being exploited. The RealTek drivers currently are unable to detect such action has been taken on Windows shutdown, thus unable to use your NIC even though all the appropriate drivers and settings have been done, and you can see ethx being up.

There are two ways of fixing this:

  1. The work around is to unplug your Ethernet cable for 30 seconds (or 15, the point is long enough so that the power from the cable no longer stores that disable NIC command from Windows. Plugin back in before you reboot. Then reboot.

  2. Go into Windows and tell it to stop disabling NICs.

Share:
13,670

Related videos on Youtube

Community
Author by

Community

Updated on September 17, 2022

Comments

  • Community
    Community over 1 year

    Fortunately, I have an old PCI ethernet card that works fine. But unfortunately my LAN card embedded in my Asus (P7H55-M/USB3) motherboard doesn't work.

    Who could me help?

    I get this error when starting the "Installation" step of hhlp's answer:

    /home/henry64/r8168-8.020.00/src/r8168_n.c: In function ‘rtl_get_eeprom’: >/home/henry64/r8168-8.020.00/src/r8168_n.c:1857: warning: ‘ret’ may be used uninitialized in this function [: 48: r8168: unexpected operator Depending module. Please wait. load module r8168 Completed.

    • Lekensteyn
      Lekensteyn over 13 years
      For the specs, I've googled for your model, leading to directsale.nl/componenten/moederbord/…. The real name of your ethernet card is Realtek® 8111E.
    • klox
      klox over 13 years
      please provide this information : in terminal execute lsmod | grep r81*
    • boehj
      boehj about 13 years
      I had similar issues with 10.10. I had to append blacklist r8169 to /etc/modprobe.d/blacklist.conf after downloading r8168-8.021.00.tar.bz2 from Realtek and loading that module.
    • Fred Garbutt
      Fred Garbutt about 12 years
      Did you get this solved? I had connectivity issues last night as well on a fresh install of 11.10 64-bit. Solved it by downloading Realtek's most current driver and installing it.
  • Admin
    Admin over 13 years
    Sorry but when i've started the installation ...i'reached this msg :
  • Admin
    Admin over 13 years
    /home/henry64/r8168-8.020.00/src/r8168_n.c: In function ‘rtl_get_eeprom’: /home/henry64/r8168-8.020.00/src/r8168_n.c:1857: warning: ‘ret’ may be used uninitialized in this function [: 48: r8168: unexpected operator Depending module. Please wait. load module r8168 Completed.
  • Jorge Castro
    Jorge Castro over 13 years
    Hi @Henry When you debug, update your original question. I'll edit your question to show you how to do it as an example.