# Realtek dual port pci-express network card fails -- SOLVED

## Fred Krogh

I've tried the Linux driver and also the one from Realtek, which is the one currently in my system.

Right now I'm using a single port card, lspci |grep -i realtek gives *Quote:*   

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

 Note that this works fine.  With the dual port card loaded the same command gives *Quote:*   

> 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
> 
> 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
> 
> 0a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
> ...

 Although lights come on, on the card neither of the ports associated with this card will start using /etc/iniit.d/jnet.eth1 (or /etc/init.d/net.eth2).  So the single port card works with the driver that comes with the kernel or with that from Realtek, and the dual port card works with neither.  I'm looking for ideas.  Thanks,

FredLast edited by Fred Krogh on Thu Aug 25, 2011 1:04 pm; edited 1 time in total

----------

## DONAHUE

what does lspci -k say about modules and driver in use for the dual port?

----------

## Fred Krogh

This does not show a whole lot more.  Without the dual port *Quote:*   

> 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
> 
>     Subsystem: Realtek Semiconductor Co., Ltd. TEG-ECTX Gigabit PCI-E Adapter [Trendnet]
> 
> 06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
> ...

 With the dual port *Quote:*   

> 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
> 
> 	Subsystem: Realtek Semiconductor Co., Ltd. TEG-ECTX Gigabit PCI-E Adapter [Trendnet]
> 
> 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
> ...

 Thanks for looking at this.

----------

## Jaglover

lspci -k should display the driver in use, like this:

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

        Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller

        Kernel driver in use: r8169

```

See your dmesg, I discovered I had to supply firmware for above card to make it work properly.

----------

## Fred Krogh

This is weird.  lsmod |grep r81 shows

r8168                 175144  0 

Anyway, I'd appreciate knowing how to get and install the firmware.  Can you help with that?  Thanks.

----------

## Jaglover

Well, in my case I had a fresh install with newly built kernel, after first boot reading dmesg is kind of mandatory. The NIC was working, I could log in  over SSH, but there was a warning in dmesg about missing firmware with fixes. It appears there is no ebuild with this firmware, so I downloaded it from http://www.debian.org/distrib/packages

In your case I'd start in http://kmuto.jp/debian/hcl/ to make sure you are using correct driver.

----------

## Fred Krogh

Things checked o.k. with http://kmuto.jp/debian/hcl/.  I downloaded the firmware as you suggested and have unpacked it.  I'm unclear on how to proceed at this point.  Do I just copy all the stuff that unpacked into .lib/firmware over to /lib/firmware?  Thanks,

Fred

----------

## Jaglover

Fred, 

did you see dmesg, what does it say about your NIC, if anything?

----------

## Fred Krogh

Here are results from dmesg|grep -i -b1 -a2 realtek *Quote:*   

> 52126-[    1.867044] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
> 
> 52295-[    1.867047] eth0: Identified chip type is 'RTL8168C/8111C'.
> 
> 52358:[    1.867049] r8168  Copyright (C) 2011  Realtek NIC software team <nicfae@realtek.com> 
> ...

 And dmesg |grep -i -b1 -a2 ether give *Quote:*   

> 51149-[    1.837151] ACPI: Power Button [PWRF]
> 
> 51190-[    1.840152] ACPI: acpi_idle yielding to intel_idle
> 
> 51244:[    1.840704] r8168 Gigabit Ethernet driver 8.024.00-NAPI loaded
> ...

 Is there more that would be useful?  Thanks.

----------

## Jaglover

Fred,

I had a line in dmesg instructing me to put rtl8168d-2.fw into /lib/firmware/rtl_nic/ 

I did so and the message went away. I think there is something else wrong with your setup. Can you boot from a known good liveCD like SystemRescueCd and see if the card works.

----------

## Fred Krogh

The live cd (actually a usb stick) is able to access all the ethernet ports.  It is using the r8169 driver just like I'm trying to do.  I've tried copying over the firmware driver as was suggested as a possibility.  That has had no effect.  With the live cd, dmesg showed the jme ethernet driver getting loaded.  I've tried putting that in my kernel, but that had no effect as I would expect.  The live cd is dong something right that I'm not doing.  I'd appreciate suggestions on how to track that down.  My poking around did me no good. Thanks,

Fred

----------

## Jaglover

Fred,

what is the PCI-ID of this card? You could also post output of lsmod while running liveCD.

----------

## Fred Krogh

Here is lspci -kvnn from the live cd: *Quote:*   

> 04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)
> 
> 	Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168]
> 
> 	Flags: bus master, fast devsel, latency 0, IRQ 43
> ...

 

And here is the same with the usual boot. *Quote:*   

> 04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)
> 
> 	Subsystem: Realtek Semiconductor Co., Ltd. TEG-ECTX Gigabit PCI-E Adapter [Trendnet] [10ec:8168]
> 
> 	Flags: bus master, fast devsel, latency 0, IRQ 54
> ...

 

The live cd is using modules while the usual case has the driver compiled into the kernel.  Here is a diff of these two *Quote:*   

>  	Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168]
> 
> < 	Flags: bus master, fast devsel, latency 0, IRQ 43
> 
> ---
> ...

 I hope this suggests something to someone, as it doesn't do much for me.

----------

## Fred Krogh

Just to remove the question, I have tried this with the realtek driver included as a module.  The only change is that when forming the difference between the previous uaual case and the new usual case, I get these three lines *Quote:*   

> 	Kernel modules: r8169

 .  And of course when trying to bring up  net.eth1, I get the message *Quote:*   

> * Bringing up interface eth1
> 
>  *   ERROR: interface eth1 does not exist
> 
>  *   Ensure that you have loaded the correct kernel module for your hardware
> ...

 It seems there is some problem with the kernel module, but what???

----------

## Jaglover

/etc/udev/rules.d/70-persistent-net.rules

This udev file is responsible for naming devices. Maybe you tried some other card in that box and now your new card is eth2 or eth3.

----------

## Fred Krogh

You nailed it!  There were 5 rules there.  I just exchanged the names eth4, eth1, and eth5,eth2, and all is working.  Well almost, I'm still not getting my eth2 to connect properly to the wireless router, but that is a different problem.

Many thanks, I've learned a lot here.

----------

