# realtek network issues

## Cr0t

I have two systems, which have realtek nics.

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

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

In both cases, I am having packet lose, ssh randomly hangs and bad performance. The read AND/OR write performance tops out aggregated at 70-80MB/s. I am 99% sure that I know what the issue is, however, I am unable to fix it. If you google the NIC, you will find all different kind of bugs. Every time, it comes back to the same issue: AUTONEG needs to be turned off.

For some reason, I am unable to turn autoneg off. As soon as I turn it off via ethtool, it jumps right away back to "Symmetric Receive-only". This happens regardless, if I use the kernel driver or the realtek driver.

Any ideas?

----------

## DONAHUE

https://forums.gentoo.org/viewtopic-t-943716-start-0-postdays-0-postorder-asc-highlight-r8169%2Bautoneg.html

----------

## Cr0t

 *DONAHUE wrote:*   

> https://forums.gentoo.org/viewtopic-p-7193450.html

 That is exactly what I have been doing, but it doesn't work.

Some more things....

```
# cat /etc/modules-load.d/r8168.conf

r8168

# cat /etc/modprobe.d/r8168.conf

options r8168 autoneg=0
```

This is what it looks like

```
ethtool enp3s0

Settings for enp3s0:

        Supported ports: [ TP ]

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

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Supported pause frame use: No

        Supports auto-negotiation: Yes

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

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Advertised pause frame use: Symmetric Receive-only

        Advertised auto-negotiation: Yes

        Speed: 1000Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        MDI-X: Unknown

        Supports Wake-on: pumbg

        Wake-on: g

        Current message level: 0x00000033 (51)

                               drv probe ifdown ifup

        Link detected: yes
```

----------

## Cr0t

ethtool only works if I switch to 100mbps

```
# ethtool -s enp3s0 speed 100 duplex full autoneg off

#ethtool enp3s0

Settings for enp3s0:

        Supported ports: [ TP ]

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

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Supported pause frame use: No

        Supports auto-negotiation: Yes

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

                                100baseT/Half 100baseT/Full

        Advertised pause frame use: No

        Advertised auto-negotiation: Yes

        Speed: 100Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: off

        MDI-X: Unknown

        Supports Wake-on: pumbg

        Wake-on: g

        Current message level: 0x00000033 (51)

                               drv probe ifdown ifup

        Link detected: yes
```

----------

## DONAHUE

Have you tried the current version of r8169? 

I have an RTL8111/8168/8411 Rev 09 that caused me to use r8168 for a time (r8169 was supposed to work but didn't) until r8168 failed. Ignored that NIC for a time, When I eventually retried r8169, the current version was working well.

----------

## DONAHUE

r8169 results here, I have not set autoneg off. I have not noted a problem but mostly use wireless NIC.  

oddman ~ # ethtool eth0

Settings for eth0:

	Supported ports: [ TP MII ]

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

	                        100baseT/Half 100baseT/Full 

	                        1000baseT/Half 1000baseT/Full 

	Supported pause frame use: No

	Supports auto-negotiation: Yes

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

	                        100baseT/Half 100baseT/Full 

	                        1000baseT/Half 1000baseT/Full 

	Advertised pause frame use: Symmetric Receive-only

	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: Symmetric

	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

----------

## Cr0t

Supported pause frame use: No 

Advertised pause frame use: Symmetric Receive-only

You have the same issue. Do some networking testing and you will see, that the performance on multistream is just bad. While you do your testing take a look at ifconfig. The dropped packets will go up.

----------

## DONAHUE

Am currently 40 packages into a 201 packages update caused by abi_x86_32 change

oddman ~ # ifconfig eth0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.116  netmask 255.255.255.0  broadcast 192.168.1.255

        ether 60:a4:4c:ce:5d:f9  txqueuelen 1000  (Ethernet)

        RX packets 396634  bytes 597189080 (569.5 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 172855  bytes 12382234 (11.8 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

looks good to me so far, What else might I look at?

----------

## Cr0t

 *DONAHUE wrote:*   

> Am currently 40 packages into a 201 packages update caused by abi_x86_32 change
> 
> oddman ~ # ifconfig eth0
> 
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
> ...

 Supported pause frame use: No 

Supports auto-negotiation: Yes 

Advertised pause frame use: Symmetric Receive-only 

Advertised auto-negotiation: Yes

Link partner advertised pause frame use: Symmetric 

Link partner advertised auto-negotiation: Yes[/code]This very peculiar. The device does not support pause frames, but uses Symmetric. Your switch offered this. On my end, my link partner does NOT offer pause frames, but still uses it. What are you connected to? Layer2/3 switch?

----------

## DONAHUE

http://www.edimax.com/edimax/merchandise/merchandise_detail/data/edimax/au/wireless_routers_ac1200/br-6478ac/

BTW, my 'inside the switch' knowledge software or firmware is near nil

sorry earlier copy/paste miscue

----------

## Cr0t

 *DONAHUE wrote:*   

> BTW, my 'inside the switch' knowledge software or firmware is near nil

 What are you connected to? Do you have a model?

----------

## DONAHUE

http://www.edimax.com/edimax/merchandise/merchandise_detail/data/edimax/au/wireless_routers_ac1200/br-6478ac/

----------

## NeddySeagoon

Cr0t,

Many r8169 compatible chips take firmware to fix bugs.

dmesg may show if r8169 tried to load a firwware patch.

Its well worth making r8169 a module and checking if you can have a firmware patch.

```
ls /lib/firmware/rtl_nic/

rtl8105e-1.fw  rtl8107e-1.fw  rtl8168d-2.fw  rtl8168e-3.fw  rtl8168g-1.fw  rtl8168h-1.fw  rtl8411-1.fw

rtl8106e-1.fw  rtl8107e-2.fw  rtl8168e-1.fw  rtl8168f-1.fw  rtl8168g-2.fw  rtl8168h-2.fw  rtl8411-2.fw

rtl8106e-2.fw  rtl8168d-1.fw  rtl8168e-2.fw  rtl8168f-2.fw  rtl8168g-3.fw  rtl8402-1.fw
```

Hmm rtl8411-1.fw and rtl8411-2.fw look promising for 

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

----------

## DONAHUE

I do use modules for NIC drivers and emerge linux-firmware unedited so would benefit from any firmware updates that Neddy suspects.

@Neddy

I think OP is using r8168 at present.

Edit: dmesg shows no associated fw loading.

----------

## krinn

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

Never had any trouble with this one, but i'm using it in 100mb

```
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.0.4  netmask 255.255.255.0  broadcast 192.168.0.255

        ether 00:26:18:2f:cc:06  txqueuelen 1000  (Ethernet)

        RX packets 4116659  bytes 5832290961 (5.4 GiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 2501683  bytes 194838296 (185.8 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

Isn't your problem more about 1000mb than negotiation, you said to turn off negotiation you have to be in 100mbps, while i'm running it with negotiation, and user may think turning off negotiation fix the problem while in fact, it is switching to 100mb to be able to switch negotiation that did fix it.

i don't have any /lib/firmware/rtl_nic/ directory, and here's my current ethtool settings:

```
ethtool eth0

Settings for eth0:

   Supported ports: [ TP MII ]

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

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Supported pause frame use: No

   Supports auto-negotiation: Yes

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

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Advertised pause frame use: Symmetric Receive-only

   Advertised auto-negotiation: Yes

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

                                        100baseT/Half 100baseT/Full 

   Link partner advertised pause frame use: Symmetric

   Link partner advertised auto-negotiation: Yes

   Speed: 100Mb/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

```

----------

