Redirected from page "HardwareList/RealTekRTL8111b"

Clear message

Realtek RTL8111B / RTL8168B NIC

Starting with Centos 5.2, the stock kernel offers support for this chipset via the r8169 driver. If possible please consider using Centos 5.2 instead of any of the methods described below. However apparently the driver only works for revision 01 of the network cards - and even those still can have problems (see below under Problem); the newer cards using revision 02 are identified by the stock kernel driver and can be configured, but they do not work. For the problematic cases one of the methods described below must be used.

1. Hardware

Any of the following 10/100/1000M Gigabit Ethernet PCI Express NICs:

A search of an on-line vendor revealed many motherboards using the RTL8111B. A partial list:

1.1. Motherboards known to not work with the stock driver:

1.2. Realtek PCI-Express NIC Described here:

Realtek RTL8111b Datasheet

According to the chip manufacturer this driver supports some of the chips which previously required the r1000 driver ( which as of version r1000_v1.06 is only maintained for kernel 2.4 and most important does not always work correctly with the new chipsets. Therefore on the above mentioned hardware if (and only if) the stock kernel driver does not work, please always try to use the newer r8168 driver instead of r1000.

2. Problem

Correct driver is not included with the standard CentOS 4.5, 5.0 and 5.1 distributions. The driver in CentOS 5.2 works for some but not for all of the cards. It has also been reported that under some circumstances, even the cards which seem to function with the driver included in 5.2 (see "rev 01" described below) sometimes still exhibit problems (big latencies, lock-ups).

3. Output of `lspci -v` for a functional card

On an MSI P35 Neo-F (model MS-7360) (note "rev 01" in the first line):

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
 RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
        Subsystem: Micro-Star International Co., Ltd. Unknown device 360c
        Flags: bus master, fast devsel, latency 0, IRQ 17
        I/O ports at e800 [size=256]
        Memory at febff000 (64-bit, non-prefetchable) [size=4K]
        Expansion ROM at febc0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 2
        Capabilities: [48] Vital Product Data
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/1 Enable-
        Capabilities: [60] Express Endpoint IRQ 0
        Capabilities: [84] Vendor Specific Information

4. Output of `lspci -v` for a non-functional card

On an Asus P5GC-MX/GBL (note "rev 02" in the first line):

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
        Subsystem: ASUSTeK Computer Inc. Unknown device 82c6
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 177
        Region 0: I/O ports at d800 [size=256]
        Region 2: Memory at cffff000 (64-bit, non-prefetchable) [size=4K]
        Region 4: Memory at efff0000 (64-bit, prefetchable) [size=64K]
        Expansion ROM at cffc0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
                Address: 0000000000000000 Data: 0000
        Capabilities: [70] Express Endpoint IRQ 1
                Device: Supported: MaxPayload 256 bytes, PhantFunc 0, ExtTag-
                Device: Latency L0s <512ns, L1 <8us
                Device: AtnBtn- AtnInd- PwrInd-
                Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
                Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
                Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s L1, Port 0
                Link: Latency L0s <512ns, L1 <64us
                Link: ASPM Disabled RCB 64 bytes CommClk+ ExtSynch-
                Link: Speed 2.5Gb/s, Width x1
        Capabilities: [b0] MSI-X: Enable- Mask- TabSize=2
                Vector table: BAR=4 offset=00000000
                PBA: BAR=4 offset=00000800
        Capabilities: [d0] Vital Product Data

5. Solution

There are a few ways to get the driver.

(1) Download and install the r8168 driver from Realtek's website at:

Realtek Driver Download

Some direct links (newer versions might be available -- use the Realtek Driver Download link above to check):

Pro:

Against:

(2) As an alternative method, a dkms-enabled driver package can be downloaded from RPMForge. Please follow the instructions available at http://wiki.centos.org/Repositories/RPMForge to install and activate this repository. After that you can use

to install the driver (and all its dependencies) on your system.

Pro:

Against:

6. List of packages needed to install r1000/r8168/r8101

Here is the full list of packages which must be installed in order to compile the driver from source.

Centos 5

Centos 4

Centos 3

Repository

Observation

binutils

binutils

binutils

standard

(1)

gcc

gcc

gcc

standard

(1)

glibc-devel

glibc-devel

glibc-devel

standard

(1)

glibc-headers

glibc-headers

glibc-headers

standard

(1)

kernel-headers

glibc-kernheaders

glibc-kernheaders

standard

(1)

kernel-devel

kernel-devel

kernel-source

standard

(1) (2)

make

make

make

standard

(1)

dkms

dkms

dkms

RPMForge

(3)

(1) standard = Base + Updates repositories.

(2)

(3) Only needed if installing dkms-r8168. You can check the state of the module any time using the command dkms status. The most interesting states are: added (the module has been successfully registered with the dkms system, but it has not been compiled) and installed (the module has also been successfully compiled).

7. Driver Disks

Driver disks for the following releases have been created and can be used while installing a new system :

These driver disks are for i686 and x86_64 arches only.

8. Notes

An exchange with Francois Romieu, one of the kernel developers for the r8169 driver, confirmed that the functionality of Realtek's r8168 and r8169 drivers will be incorporated into the kernel's r8169 driver. The kernel changelog shows a merge with Realtek's drivers in July 2007.

Kernel r8169 Changelog

This was confirmed November 2007 using the first release of Fedora 8 (kernel 2.6.23.1-42.fc8) on a Gigabyte GA-P35-DS4 and an MSI P35 Neo-F E7360, both with an RTL8111B on-board. The kernel's r8169 driver correctly identified and configured the on-board NIC.

9. Updating the Kernel

When a NIC driver isn't included in the kernel, updating the kernel can be a problem. A few extra steps can make this possible.

  1. Install the new kernel. Either from RPM or compiling a custom kernel. If installing from RPM, the associated kernel-devel package will also need to be installed.

  2. Do not reboot. The NIC driver hasn't been added to the new kernel yet. Rebooting now means an inactive NIC and a visit to the console.

  3. Go to the src directory of the r8168 source. Edit Makefile.

  4. Change the line
    KVER           := $(shell uname -r)
    to your newly installed kernel version. For example:
    KVER           := 2.6.22.9-MyCustomKernel
  5. Go back to the top directory of the r8168 source and recompile and install the driver:
    make all;

    This will overwrite any existing r8168.ko driver. If you want to keep the older driver, rename the existing file before compiling the new driver.

  6. Confirm that the driver was copied to the right place. For example:
    find /lib/modules/2.6.22.9-MyCustomKernel -name r8168.ko

    If you have two copies present, use modinfo to identify the older driver and delete or rename it before rebooting.

  7. Run:
    depmod -a 2.6.22.9-MyCustomKernel
  8. Update your bootloader configuration (usually /boot/grub/grub.conf) and reboot.

Note: if you install the above mentioned dkms-r8168 package and leave the dkms-autoinstaller service enabled, steps 3-7 will be performed automatically after you boot with a new kernel, provided you have updated the corresponding kernel-headers (kernel-devel/kernel-source) package. So basically all you would have to do is

  1. install dkms-r8168
  2. upgrade kernel (and the corrresponding source)

  3. make sure the dkms-autoinstaller service is active
  4. reboot

AdditionalResources/HardwareList/RealTekRTL8111b (last edited 2008-07-20 02:39:28 by ManuelWolfshant)