# [SOLVED] lot of issues with RTL-8110SC/8169SC

## duh

Hi,

I have a small homebuilt Via Epia based Gentoo Linux server at home doing my routing, file serving, hosting, etcetera. The motherboard (a Jetway J7F4K1G5S A 1500MHz Mini-ITX ) has two onboard Realtek Gigabit Ethernet NICs ( RTL-8110SC/8169SC ) that have been causing me quite some headaches.

Since about two or three weeks I was seeing low internet performance, I was getting maximum download speeds of about 8 Mbit and about 1.5 Mbit up while I have a 30 / 4 Mbit (cable) internet connection. As my dynamic-but-nearly-always-stable IP address also seemed to have changed around the same period I figured my internet provider (Netherlands, Ziggo / Casema, Utrecht) was probably doing maintenance and restructuring the network.

So yesterday I was having enough of it, so I did some more testing and it turned out if I patched my MacBook Pro directly into the cable modem I was getting the expected 30 / 4 speeds! Checking my Linux box (running kernel 2.6.34-gentoo-r1) it appeared eth0 was running at 10Mbit half duplex :S I remembered I had issues with the r8169 driver before which were resolved when compiling the r8169 from Realtek themselves ( r8169-6.013.00 ). 

First I tried to force the nic to 1000Mbit Full Duplex autoneg off by using ethtool, but no luck at all as it stopped working all together (same for all other forced settings like 100Mbit etc), so I tried recompiling the r8169 driver from Realtek. Unfortunately that also did not seem to work and perhaps even worsen things (autoneg off was not respected anymore?).

As kernel 2.6.36-gentoo-r5 was out I decided compiling that kernel and see if the Realtek 8169 driver in there would fix the issues I was having. But no luck with that either. The r8169 drivers in the kernel did also not seem to work with my two onboard RTL-8110SC/8169SC NICs (dhcp waiting for carrier etcetera). So again I turned to the r8169 driver provided by Realtek and tried to compile it. However, the r8169-6.013.00 driver would not compile anymore! I was getting a bit annoyed now... Looking at the Realtek site again I found there was a new driver: r8169-6.014.00. Unfortunately the Realtek site is crappy (www.realtek.com redirects to an ip which is hosting the site, so unprofessional... never heard of virtual hosts, dns, etc?) as neither of the three download mirrors worked. Googling for the driver I finally managed to find the r8169-6.014.00.tar.bz2 elsewhere, so I tried to compile that one into my 2.6.36-gentoo-r5 kernel.

While compilation went well, I was getting kernel panics after rebooting as soon as dhcp (not sure if it was dhcpcd or dhcpd) was starting pointing to the r8169 driver  :Crying or Very sad:  I have been trying to recompile the kernel, remove the r8169 driver, etcetera but still no luck... I kept having NICs that were not working or I kept getting kernel panics when running the driver from Realtek themselves. I was getting massive headaches now... :S

At last I figured the NICs were at least working in 2.6.34-gentoo-r1 so perhaps 2.6.36-gentoo-r5 was too unstable for the r8169 driver (or better: the r8169 driver in there was too unstable). It appeared there was also a more recent 2.6.34-gentoo-r12 kernel, so I tried to compile it with the same .config I had on the 2.6.34-gentoo-r1 kernel, perhaps the r8169 driver issues were fixed in that later kernel.

After compilation, it turned out the RTL-8110SC/8169SC NICs were behaving as expected and at full speeds running kernel 2.6.34-gentoo-r12 with the default kernel driver (compiled as module). Eth0 is now set to 1000Mbit / Full Duplex and I am getting the internet speeds I was expecting (the proper 30 Mbit down and 3.5 Mbit up)  :Very Happy: 

[img]http://www.speedtest.net/result/1126647560.png[/img]

So, long story short: it turns out that the r8169 driver is unstable in several kernels and that the 2.3.6-gentoo-r12 kernel works well with these NICs. While my via Epia board board itself is performing well, the Realtek NICs seem ill supported by the Linux kernel at times.

I decided to post my experiences (and resolution) here, as I have tried Googling a lot, but I did not find any posts helping me out with this issue (other than what I had already tried)... So hopefully people out there will find this post of use to them.

For our Google friends (and people interested) some debug output to finish off this post:

```

billabong src # uname -a

Linux billabong 2.6.34-gentoo-r12 #1 SMP Tue Jan 25 02:54:17 CET 2011 i686 VIA C7-D Processor 1500MHz CentaurHauls GNU/Linux

billabong src # cat /proc/cpuinfo 

processor   : 0

vendor_id   : CentaurHauls

cpu family   : 6

model      : 13

model name   : VIA C7-D Processor 1500MHz

stepping   : 0

cpu MHz      : 1500.278

cache size   : 128 KB

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 1

wp      : yes

flags      : fpu vme de pse tsc msr pae mce apic sep mtrr pge cmov pat clflush acpi mmx fxsr sse sse2 tm nx up pni xtpr rng rng_en ace ace_en ace2 ace2_en phe phe_en pmm pmm_en

bogomips   : 3000.55

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 32 bits virtual

power management:

billabong src # lspci -v

...

00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)

   Subsystem: Jetway Information Co., Ltd. Device 10ec

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   I/O ports at f000 [size=256]

   Memory at fdfff000 (32-bit, non-prefetchable) [size=256]

   [virtual] Expansion ROM at 3bf00000 [disabled] [size=128K]

   Capabilities: [dc] Power Management version 2

   Kernel driver in use: r8169

   Kernel modules: r8169

00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)

   Subsystem: Jetway Information Co., Ltd. Device 10ec

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19

   I/O ports at f200 [size=256]

   Memory at fdffe000 (32-bit, non-prefetchable) [size=256]

   [virtual] Expansion ROM at 3bf20000 [disabled] [size=128K]

   Capabilities: [dc] Power Management version 2

   Kernel driver in use: r8169

   Kernel modules: r8169

...

billabong src # ethtool -i eth0

driver: r8169

version: 2.3LK-NAPI

firmware-version: 

bus-info: 0000:00:09.0

billabong src # ethtool eth0

Settings for eth0:

   Supported ports: [ TP MII ]

   Supported link modes:   10baseT/Half 10baseT/Full 

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Supports auto-negotiation: Yes

   Advertised link modes:  10baseT/Half 10baseT/Full 

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Advertised auto-negotiation: Yes

   Speed: 1000Mb/s

   Duplex: Full

   Port: MII

   PHYAD: 0

   Transceiver: internal

   Auto-negotiation: on

   Supports Wake-on: pumbg

   Wake-on: g

   Current message level: 0x00000033 (51)

   Link detected: yes

billabong src # ethtool eth1

Settings for eth1:

   Supported ports: [ TP MII ]

   Supported link modes:   10baseT/Half 10baseT/Full 

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Supports auto-negotiation: Yes

   Advertised link modes:  10baseT/Half 10baseT/Full 

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Advertised auto-negotiation: Yes

   Speed: 1000Mb/s

   Duplex: Full

   Port: MII

   PHYAD: 0

   Transceiver: internal

   Auto-negotiation: on

   Supports Wake-on: pumbg

   Wake-on: g

   Current message level: 0x00000033 (51)

   Link detected: yes

billabong src # 

```

----------

## eomanis

Hello,

I am having similar problems with my new home server as well, apparently.

Right now I am copying my stuff off my old home server onto my new one, but it doesn't really get to decent speeds and it has been copying all week now at around 8MiB/s, what I presume is usual 100MBit/s speed.

Using any other computer with a gigabit NIC I am able to siphon off data from the old server at about 30MiB/s, so the old one is not the problem.

Here's some info from my new server that's pulling in stuff so slowly:

```
newserver src # uname -a

Linux newserver 2.6.36-gentoo-r5 #5 SMP Tue Mar 8 01:54:29 CET 2011 x86_64 AMD Phenom(tm) II X4 910e Processor AuthenticAMD GNU/Linux

newserver src # lspci -v

      

[...]

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

        Subsystem: ASUSTeK Computer Inc. Device 8432

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

        I/O ports at d800 [size=256]

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

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

        Capabilities: [40] Power Management version 3

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

        Capabilities: [70] Express Endpoint, MSI 01

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

        Capabilities: [d0] Vital Product Data

        Capabilities: [100] Advanced Error Reporting

        Capabilities: [140] Virtual Channel <?>

        Kernel driver in use: r8169

      

[...]

newserver src # ethtool -i eth0

driver: r8169

version: 2.3LK-NAPI

firmware-version:

bus-info: 0000:03:00.0

newserver src # ethtool eth0

Settings for eth0:

        Supported ports: [ TP MII ]

        Supported link modes:   10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Half 1000baseT/Full

        Supports auto-negotiation: Yes

        Advertised link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Half 1000baseT/Full

        Advertised pause frame use: No

        Advertised auto-negotiation: Yes

        Link partner advertised link modes:  10baseT/Half 10baseT/Full

                                             100baseT/Half 100baseT/Full

                                             1000baseT/Full

        Link partner advertised pause frame use: No

        Link partner advertised auto-negotiation: Yes

        Speed: 1000Mb/s

        Duplex: Full

        Port: MII

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: pumbg

        Wake-on: g

        Current message level: 0x00000033 (51)

                               drv probe ifdown ifup

        Link detected: yes

newserver src #
```

I hope there is a (sufficiently simple) solution for that, because in combination with the other bad issue I am having, https://forums.gentoo.org/viewtopic-p-6604295.html#6604295, Gentoo Linux does not really seem to be up to the task to power my home server, at least not without me pouring entire days of my time into it.   :Sad: 

I's just that I really like gentoo's concept of letting the users choose which versions they want to install and use, and I'd hate to go back to Ubunto or maybe Debian Squeeze and have to fiddle with unreliable PPAs again.

----------

## zoe

Hello everyone

I have a problem and after reading the post you could be really helpfull. So today opened my pc and no internet. I saw that the light at the back of the motherboard is allways yellow(even when the pc is powered off) so i guested that's not a good thing. So at first,before asking support from asus i have to enable the connection on the second ethernet. So i plugged the cable at the second ethernet and nothing(in windows i have connection from port2). I'll give some information about the steps i followed. I went inside the kernel and i saw that is correctly configured(or i think at least). 

 *Quote:*   

> 
> 
> --- Ethernet (1000 Mbit)
> 
> < >   Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support
> ...

 

So nothing was working and after reading the post changed it to Module and added the r8169 at the /etc/conf.d/modules and rebooted. Again nothing, also i run

 *Quote:*   

> 
> 
>  ~ # lshw -C network
> 
>   *-network               
> ...

 

It says that  *-network DISABLED and i don't understand why. Also some more info

 *Quote:*   

> 
> 
> lsmod 
> 
> Module                  Size  Used by
> ...

 

The module r8169 is loaded without error and as you can see my default kernel is a previous cause with the last i have a problem with sound. I'm giving all the info i can think of in case you have an idea. Also when i try to see the info about eth0 i get

 *Quote:*   

> 
> 
> ~ # dmesg | grep eth0
> 
> [   12.560801] r8169 0000:02:00.0: eth0: RTL8168d/8111d at 0xffffc9000007a000, 00:26:18:96:d6:40, XID 083000c0 IRQ 46
> ...

 

I really don't know how to proceed but i could use some help. Will i have to maybe create a new link named eth1 for the second port??

Thanks in advance and for more info plz post

UPDATE:So i created a new link to net.lo named net.eth1 and now works great so i must now see if the yellow light at port 1 means that the first ethernet is broken(but it's quite sure tht is broken)

----------

