# Realtek 8111E does not work

## SandStar

I'm in the process of installing Gentoo on my new computer. So far it has been quite frustrating.

I use stable packages and that brought in 2.6.38-gentoo-r6. I've compiled it with the r8169 driver and I can succesfully start eth0.

Internet also works, most of the time.

My 'dmesg' is flooded with "r8169 0000:03:00.0: eth0: link up"

Packetloss to my router is always between 11% and 15%. I've checked the cable and that one is fine. Windows Vista (dual boot) works perfectly with it.

SSH sessions are impossible as they timeout after just a few seconds.

So what should I do? Updgrade to an "unstable" kernel to make it stable? Install the realtek driver (from their site)?

----------

## SandStar

Here's a part of my logfile to indicate the impact:

```

Jun 06 18:47:50 [kernel] [  426.552130] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:52 [kernel] [  428.640127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:53 [kernel] [  429.808127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:54 [kernel] [  430.501127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:55 [kernel] [  431.391127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:55 [kernel] [  432.093127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:56 [kernel] [  432.576124] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:57 [kernel] [  433.340127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:57 [kernel] [  434.068125] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:58 [kernel] [  434.759132] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:59 [kernel] [  435.480135] r8169 0000:03:00.0: eth0: link up

Jun 06 18:47:59 [kernel] [  436.008101] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:00 [kernel] [  436.544097] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:01 [kernel] [  437.340099] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:01 [kernel] [  438.290089] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:04 [kernel] [  440.543109] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:06 [kernel] [  442.612093] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:07 [kernel] [  443.379138] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:08 [kernel] [  444.343136] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:08 [kernel] [  445.060144] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:09 [kernel] [  445.588126] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:09 [kernel] [  446.133127] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:10 [kernel] [  446.696136] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:10 [kernel] [  447.297134] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:12 [kernel] [  449.109092] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:13 [kernel] [  449.592097] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:13 [kernel] [  450.093093] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:14 [kernel] [  450.628107] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:14 [kernel] [  451.117097] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:15 [kernel] [  451.665086] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:15 [kernel] [  452.156083] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:16 [kernel] [  452.600095] r8169 0000:03:00.0: eth0: link up

Jun 06 18:48:20 [kernel] [  457.306084] r8169 0000:03:00.0: eth0: link up

```

----------

## j_c_p

Strange, I've got a 8111C Realtek which works well :

```
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

        Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 0, Cache Line Size: 64 bytes

        Interrupt: pin A routed to IRQ 42

        Region 0: I/O ports at de00 [size=256]

        Region 2: Memory at fdcff000 (64-bit, prefetchable) [size=4K]

        Region 4: Memory at fdce0000 (64-bit, prefetchable) [size=64K]

        [virtual] Expansion ROM at fdc00000 [disabled] [size=64K]

        Capabilities: [40] Power Management version 3

                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)

                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

        Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+

                Address: 00000000fee3f00c  Data: 4161

        Capabilities: [70] Express (v1) Endpoint, MSI 01

                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <8us

                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-

                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-

                        MaxPayload 128 bytes, MaxReadReq 4096 bytes

                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-

                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us

                        ClockPM+ Surprise- LLActRep- BwNot-

                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+

                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-

                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

        Capabilities: [b0] MSI-X: Enable- Count=2 Masked-

                Vector table: BAR=4 offset=00000000

                PBA: BAR=4 offset=00000800

        Capabilities: [d0] Vital Product Data

                Unknown small resource type 00, will not decode more.

        Capabilities: [100 v1] Advanced Error Reporting

                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-

                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-

        Capabilities: [140 v1] Virtual Channel

                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1

                Arb:    Fixed- WRR32- WRR64- WRR128-

                Ctrl:   ArbSelect=Fixed

                Status: InProgress-

                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-

                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-

                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff

                        Status: NegoPending- InProgress-

        Capabilities: [160 v1] Device Serial Number 12-34-56-78-12-34-56-78

        Kernel driver in use: r8169

```

```
r8169 0000:02:00.0: eth0: link down

ADDRCONF(NETDEV_UP): eth0: link is not ready

r8169 0000:02:00.0: eth0: link up

ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
```

Maybe you should try a Vanilla kernel (2.6.39.1 for me, but it was ok before the 2.6.39 kernel too).

----------

## SandStar

2.6.39-1 doesn't solve anything

```

[   78.051132] r8169 0000:03:00.0: eth0: link up

[   97.967133] r8169 0000:03:00.0: eth0: link up

[  101.685108] r8169 0000:03:00.0: eth0: link up

[  111.435115] r8169 0000:03:00.0: eth0: link up

[  116.792133] r8169 0000:03:00.0: eth0: link up

[  119.504088] r8169 0000:03:00.0: eth0: link up

[  122.174135] r8169 0000:03:00.0: eth0: link up

```

Same unworkable state   :Crying or Very sad: 

```

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

        Subsystem: ASUSTeK Computer Inc. Device 8432

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 0, Cache Line Size: 64 bytes

        Interrupt: pin A routed to IRQ 43

        Region 0: I/O ports at d800 [size=256]

        Region 2: Memory at fafff000 (64-bit, prefetchable) [size=4K]

        Region 4: Memory at faff8000 (64-bit, prefetchable) [size=16K]

        Capabilities: [40] Power Management version 3

                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)

                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+

                Address: 00000000fee3f00c  Data: 4169

        Capabilities: [70] Express (v2) Endpoint, MSI 01

                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us

                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-

                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-

                        MaxPayload 128 bytes, MaxReadReq 4096 bytes

                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-

                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 <64us

                        ClockPM+ Surprise- LLActRep- BwNot-

                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+

                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-

                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+

                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB

                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-

                         Compliance De-emphasis: -6dB

                LnkSta2: Current De-emphasis Level: -6dB

        Capabilities: [b0] MSI-X: Enable- Count=4 Masked-

                Vector table: BAR=4 offset=00000000

                PBA: BAR=4 offset=00000800

        Capabilities: [d0] Vital Product Data

                No end tag found

        Capabilities: [100 v1] Advanced Error Reporting

                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

                CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-

        Capabilities: [140 v1] Virtual Channel

                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1

                Arb:    Fixed- WRR32- WRR64- WRR128-

                Ctrl:   ArbSelect=Fixed

                Status: InProgress-

                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-

                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-

                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff

                        Status: NegoPending- InProgress-

        Capabilities: [160 v1] Device Serial Number 00-00-00-00-00-00-00-00

        Kernel driver in use: r8169

```

----------

## frostschutz

I *think* there was something related to 8111E in the 3.0 kernel changelog.

You could backport the realtek driver from there or you could use the realtek driver from realtek directly.

----------

## Naib

use the realtek drivers from realtek website for this chipset, they have been bad and pushed out a new line of nic which have the same pci ID as an old line BUT there are enough differences to cause issues.

----------

## Dakeyras

I have the same problem since this morning. My motherboard was changed this weekend from a P67 to a Z68 one, and I have experienced this bug when connecting from work to home through SSH: the link would only hold on for 10 or so seconds.

From another thread and people having no problem, the only common cause I can think of is that "(Rev 06)" mention in the lspci output, which I have as well. This leads me to believe that Naib's explanation is the correct one.

I'll try the driver from Realtek this evening and report about it, provided it works.

Edit: I rebuilt my kernel with the r8169 driver as a module, downloaded the r8168 driver from their website, ran the included shell script, and everything worked correctly after that.

----------

## SandStar

Thought I'd give an update on this.

Latest 3.0 kernel still has a non-functioning realtek driver.

Bought an intel 1gbit pci nic to solve it...

----------

## Naib

http://forums.fedoraforum.org/showthread.php?t=250807

but like I said ... realtek drivers from their site

----------

## lordof7

The realtek drivers (v. r8168-8.025.00) worked for me, but only after some effort.  Turns out they built a weird hardcoded kernel version check into the src/Makefile, and this did not match version 3 kernels.  I changed the sed regex in the "KEXT:=" line to allow the correct substitution.  

Thanks to user Yudley on the Ubuntu forums who led me to this workaround:

http://ubuntuforums.org/showthread.php?t=1022411&page=9

(bottom of the page.)

----------

