# RTL8111/8168B PCI Express Gigabit Ethernet controller error

## coolone

my Ethernet card is Realtek RTL8168C(P)/8111C(P) Family PCI-E GBE NIC  which Integrated with mainboard Gigabyte GA-MA78GM-S2H 

i complied RT8169 gigabyte kernel driver, but it seems doesnt work. 

also i complied official driver, R8168, it still doesnt work. i am wondering if i complied right drivers, 

i tried the ethernet with LiveCD, it works fine.....

```
lspci -v

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

   Subsystem: Giga-byte Technology Device e000

   Flags: bus master, fast devsel, latency 0, IRQ 27

   I/O ports at de00 [size=256]

   Memory at fddff000 (64-bit, prefetchable) [size=4K]

   Memory at fdde0000 (64-bit, prefetchable) [size=64K]

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

   Capabilities: [40] Power Management version 3

   Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Count=1/2 Enable+

   Capabilities: [70] Express Endpoint, MSI 01

   Capabilities: [b0] MSI-X: Enable- Mask- TabSize=2

   Capabilities: [d0] Vital Product Data <?>

   Capabilities: [100] Advanced Error Reporting

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

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

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

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

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

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

   Capabilities: [140] Virtual Channel <?>

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

   Kernel driver in use: r8169
```

obviously, the info shows the driver is in use, but i cannot find my Ethernet, Eth0 nor Eth1...  

could someone help with this? thanks in adv

----------

## V-Li

What kernel are you using?  I solved a similar problem with the newest kernel.

----------

## coolone

hi, original kernel 2.6.29.2 downloaded from kernel.org.

thanks 4 yr reply

----------

## EzInKy

What happens when you type...

```

/etc/init.d/net.eth0 start

```

?

----------

## V-Li

Try sys-kernel/git-sources in the current incarnation.

----------

## tpg

I have the exact same NIC on my ASUS P5B motherboard, and the same problem pretty much with the gentoo-sources-2.6.29-r3 ~amd64, 32bit works fine for me.

----------

## EzInKy

 *tpg wrote:*   

> I have the exact same NIC on my ASUS P5B motherboard, and the same problem pretty much with the gentoo-sources-2.6.29-r3 ~amd64, 32bit works fine for me.

 

I did not experience any problems with the same NIC and 64bit on my Supermicro board. Still, give the ~amd64 vanilla-sources-2.6.30 a try, they improved other issues I had with the ICH10 chipset.

----------

## Dottout

*bump*

any news? I have the same problem on 2.6.31rc1 (latest git), 2.6.30 (git and zen-sources), and 2.6.29-zen, 32bit machine.

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

   Subsystem: ASUSTeK Computer Inc. Device 82c6

   Flags: bus master, fast devsel, latency 0, IRQ 27

   I/O ports at d800 [size=256]

   Memory at f8fff000 (64-bit, prefetchable) [size=4K]

   Memory at f8fe0000 (64-bit, prefetchable) [size=64K]

   Expansion ROM at feaf0000 [disabled] [size=64K]

   Capabilities: [40] Power Management version 3

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

   Capabilities: [70] Express Endpoint, MSI 01

   Capabilities: [b0] MSI-X: Enable- Mask- TabSize=2

   Capabilities: [d0] Vital Product Data

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel <?>

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

   Kernel driver in use: r8169

   Kernel modules: r8169

```

```
ifconfig eth0 up

SIOCSIFFLAGS: Cannot assign requested address
```

----------

## Decibels

I just bought a MB using that ethernet and got it working fine, it was udev stopping me for a bit.

Yesterday just got my new Gigabyte: GA-MA790GP-UD4H to replace a Asus MB that was having boot problems. So looked up the chipset info and added those to my current kernel 2.6.29-gentoo-r5. Since I was putting all my old hardware back in and only the MB was changing. Booted up no problem except for the ethernet. Here is the lspci -v -v output:

```
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 27

        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 PME-Enable- DSel=0 DScale=0 PME-

        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Count=1/2 Enable+

                Address: 00000000fee0300c  Data: 4189

        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+ Suprise- 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- Mask- TabSize=2

                Vector table: BAR=4 offset=00000000

                PBA: BAR=4 offset=00000800

        Capabilities: [d0] Vital Product Data <?>

        Capabilities: [100] Advanced Error Reporting

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

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

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

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

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

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

        Capabilities: [140] Virtual Channel <?>

        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00 (edited this)

        Kernel driver in use: r8169

        Kernel modules: r8169
```

You can see it uses the r8169 driver compiled as module. I used the latest Gentoo LiveCD to find this when didn't work at first. But my real issue was the old /etc/udev/rules.d/70-persistent-net.rules file. It had my old MB which had 3 ethernet devices. And I had a 10-persistent-net.rules because udev wants to switch things around from time to time during updates. So I uncommented the stuff in the 10-persistent-net.rules and 70-persistent-net.rules for the old MB (it had added the new device to the end of the 70* but named it eth4 and I had /etc/conf.d/net setup for only doing eth0 and eth1 so it wouldn't do anything with my new ethernet due to the conflict. Telling udev to re-read the rules didn't work. So with the old stuff uncommented I rebooted and everything came right up.

So if you have the r8169 module compiled and loaded and still don't work. Check your udev rules files. It added this line to my udev 70* file:

```
# PCI device 0x10ec:0x8168 (r8169)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

```

Edited the address

The only real issues I had was microsoft crap. Rebooted and didn't see my usb mouse, had to put an old ps/2 one I kept around (luckily), then the cd wouldn't load up to a menu and had to manually find and install drivers from the CD. Safe mode was so slow it was unbelievable (well believable for microsoft). 

Hope this helps!

Note: FYI I am not using dhcp using a static ip address to my router, the router is doing my dhcp for the linux box. Just noting incase.

----------

## whig

If "ethernet can't be found", use "ifconfig -a" rather than without that option.

----------

## Decibels

Thanks, that reminds me. Mine was saying that also, even though the module was loaded. That is when remembered the udev issue and found the problem I mention above.

----------

## Dottout

my 70-persistent-net.rules has this entry:

```
70-persistent-net.rules:SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ed:0b:00:00:e0:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
```

the hw addr is right, according to ifconfig:

```
eth0      Link encap:Ethernet  HWaddr ed:0b:00:00:e0:00
```

so this is not a solution for me  :Sad: 

----------

## i92guboj

 *Dottout wrote:*   

> my 70-persistent-net.rules has this entry:
> 
> ```
> 70-persistent-net.rules:SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ed:0b:00:00:e0:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
> ```
> ...

 

Suspiciously, I have the same problem, and the MAC for that NIC is the same than yours, which makes me suspect that this is a hardware issue.

https://forums.gentoo.org/viewtopic-t-861445-highlight-.html

----------

