You are not logged in.

#1 2010-07-28 00:42:45

goopen
Member
Registered: 2010-07-20
Posts: 26

[SOLVED]How to fix failing Realtek NIC RTL8111/8168B

Moderator feel free to move this thread to approperiate section and make it a sticky.

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

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 pacman -S kernel26-headers

Download a driver for the appropriate kernel.

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. smile

sudo reboot

Last edited by goopen (2010-07-28 11:12:12)


Its not a bug - its a feature!

Offline

#2 2010-07-28 02:10:39

tum
Member
Registered: 2010-05-18
Posts: 40

Re: [SOLVED]How to fix failing Realtek NIC RTL8111/8168B

well done

Last edited by tum (2010-07-28 13:52:35)

Offline

#3 2010-07-28 02:36:52

goopen
Member
Registered: 2010-07-20
Posts: 26

Re: [SOLVED]How to fix failing Realtek NIC RTL8111/8168B

tum wrote:

Have you tried to install "kernel26-headers" ?

Thanx for the tip! I got progress, im putting the server up for a massive test. Ill keep you posted. smile

Edit: I took the liberty to rewrite the topic so future people easily can fix this particular problem.

Last edited by goopen (2010-07-28 11:16:42)


Its not a bug - its a feature!

Offline

#4 2010-08-21 17:21:50

DcUK
Member
Registered: 2009-04-09
Posts: 10

Re: [SOLVED]How to fix failing Realtek NIC RTL8111/8168B

Just a quick update, you'll find that this module (at version 8.018.00) no longer builds with the new 2.6.35 kernels.

Until Realtek post an update you're stuck with the r8169 module. Hopefully there's one due shortly, last update was April I think!

On the plus side you might find that the r8169 module no longer has the problems you mention, there have been several patches for it included in the 2.6.35 releases.

Offline

#5 2010-09-02 16:56:10

tcp
Member
Registered: 2010-04-01
Posts: 14

Re: [SOLVED]How to fix failing Realtek NIC RTL8111/8168B

On kernel 2.6.35, module r8168-08.019.00 builds OK.

If you don't use MOD_AUTOLOAD, the module to use is now named r8168 instead of r8169. TP (Twisted-Pair) port is used now rather than MII.

I still can't get get 1000baseT to work, although ethtool reports it as both supported and advertised. (My switch and cables work fine for 1Gb/s on other computers.) Eth-tool responds to commands better than the default module, but it still fails after trying to change speed. mii-tool only reports a max supported 100baseTx-FD. Anyone have better results?

EDIT: I have gigabit capability working now. This is going to sound weird, but I plugged the cable from one port on the switch back into another port of the same switch. Both ports lit up green (rather than blue) indicating a gigabit connection. I plugged the cable back into my linux box and it negotiated a gigabit connection. I can even restart and it will go to blue during boot, but will re-negotiate to a green (gigabit connection). It's not like I tricked the router because I can power cycle that and it will still work. It wasn't working all along either because I tried everything for days, recompiling kernels, reinstalling driver modules, rebooting, reconnecting cables, and trying different ones. After I gave up trying things in linux, I even booted into a Mini-Windows XP boot CD, and tried changing device properties. The only thing I can think that can somewhat explain it is that someone in a forum recommended electrostatically discharging my equipment, but I don't even know how you would go about that. I don't know, but I seriously put faith in this method as if it was like blowing on NES cartridges.

Last edited by tcp (2010-09-05 02:43:17)

Offline

#6 2011-10-21 22:49:14

vega
Member
Registered: 2008-06-26
Posts: 13

Re: [SOLVED]How to fix failing Realtek NIC RTL8111/8168B

Mine goes:

sudo ./autorun.sh
Depending module. Please wait.
load module r8168
FATAL: module r8168 not found
Completed.

I also tried to load the module manually with
$> modprobe -r r8169
$> insmod r8168.ko

Because modprobe doesn't work -- I assume that r8168.ko is not in the appropriate directory.
The module then appears to be loaded (with lsmod), but no interface eth0 is there, only lo appears.
Do I have to do something else? Should the insmod command have worked?

Last edited by vega (2011-10-21 22:49:32)

Offline

#7 2011-10-22 00:32:39

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]How to fix failing Realtek NIC RTL8111/8168B

This thread is more than 1 year old, even though you are on topic you should have opened another thread, also there are more recent threads about these cards.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB