Ubuntu – Realtek RTL8111E8168B Ethernet driver doesn’t work

10.10driversnetworkingrealtek

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.

Best Answer

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
Related Question