R8169 speed decreases

Asked by ThomasB

uname -a Linux linux 4.15.0-59-generic

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

Speed (esp upstream) decreases after short time.
Temporary solved simply by ifdown eth0 & ifup eth0
Kernel driver currently in use
18.04.3 LTS is currenty not offering newer 4.17+

Any other suggestions ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
ThomasB
Solved:
Last query:
Last reply:

This question was originally filed as bug #1841028.

Revision history for this message
Chris Guiver (guiverc) said :
#1

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Bug reports are not intended for support. Yes Ubuntu 18.04 LTS has the option to use 18.10/19.04/19.10/20.04 kernels through use of enabling the HWE kernels (hardware enablement stack kernel), where current 5.0 > 4.17. For more information see https://wiki.ubuntu.com/Kernel/LTSEnablementStack

For support please see https://discourse.ubuntu.com/t/community-support/709

You could convert this bug.report into a question, where the aim is more about fixing your current issue, instead of fixing future problems for everyone.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

What is the output of:

sudo lshw -C network; lsb_release -a; uname -a

Have you tried rebooting the router?
Have you tried a different port on the router?
Have you tried a different cable?

Revision history for this message
ThomasB (tbrunnthaler) said :
#3

The RTL8169 is making the problems. After reboot or ifdown / ifup speed works for a few minutes after which speed decreases immediatly. There ist an old driver problem with this network card which should be solved in 5.0 kernels but it seems it is still affeccted ?! I siwtched to 100 which seems to solve but it isnt solved in fact.

 sudo lshw -C network; lsb_release -a; uname -a
  *-network
       description: Ethernet interface
       product: RTL8169 PCI Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: p4p1
       version: 10
       serial: 00:11:6b:99:a5:34
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 66MHz
       capabilities: pm bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=off broadcast=yes driver=r8169 duplex=full ip=xx.xx.xx.xx latency=64 link=yes maxlatency=64 mingnt=32 multicast=yes port=MII speed=100Mbit/s
       resources: irq:16 ioport:d000(size=256) memory:f7321000-f73210ff memory:f7300000-f731ffff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: p6p1
       version: 06
       serial: bc:ae:c5:a8:ca:fd
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl_nic/rtl8168e-2.fw ip=192.168.1.82 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:18 ioport:b000(size=256) memory:f2104000-f2104fff memory:f2100000-f2103fff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Linux linux 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
ThomasB (tbrunnthaler) said :
#4

The problematic NIC in detail.

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8169 PCI Gigabit Ethernet Controller (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. RTL8169/8110 Family PCI Gigabit Ethernet NIC
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64 (8000ns min, 16000ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: I/O ports at d000 [size=256]
        Region 1: Memory at f7321000 (32-bit, non-prefetchable) [size=256]
        Expansion ROM at f7300000 [disabled] [size=128K]
        Capabilities: [dc] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: r8169
        Kernel modules: r8169

Revision history for this message
ThomasB (tbrunnthaler) said :
#5

Have you tried rebooting the router? YES but not depends.
Have you tried a different port on the router? YES
Have you tried a different cable? YES

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

https://forum.manjaro.org/t/resolved-problems-with-r8168-r8169-driver-kernels-5-0-5-1/90228/20

Try disabling IPv6 in the router (if possible) and in Ubuntu. May help

Revision history for this message
ThomasB (tbrunnthaler) said :
#7

I read all the suggested threads and others. IPv6 is disabled (ubuntu) - problem still exists. The problem is not ethernet connection speed itself rather a drop in upload/download bandwidth. The upload / download speed drops every few minutes looks like traffic throtteling in effect but it isnt. Whenever ifdown eth0 && ifup eth0 inet is blazing fast.

> Link is Up - 1Gbps/Full - flow control rx/tx

It seems there is still a bug present in r8169 driver but on my card i cannot use r8168 by blacklist like described here https://community.hetzner.com/tutorials/installing-the-r8168-driver/de?title=Installation_des_r8168-Treibers

Hetzner wrote about "Bandbreitenprobleme" which describes exactly the problem.

Revision history for this message
ThomasB (tbrunnthaler) said :
#8

Btw. this is an exact description: https://unixblogger.com/the-pain-of-an-realtek-rtl8111rtl8168-ethernet-card/

My problem is an non correct working PCIx1 card RT8111 and a working onboard LAN RT8169 card. So how to fix this without blacklisting the kernel driver ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Are you aware that https://unixblogger.com/the-pain-of-an-realtek-rtl8111rtl8168-ethernet-card/ is obsolete? It has been replaced by https://unixblogger.com/how-to-get-your-realtek-rtl8111rtl8168-working-updated-guide/

https://unixblogger.com/how-to-get-your-realtek-rtl8111rtl8168-working-updated-guide/#comment-910 suggests to add a mapping between PCI device ID and driver. Maybe this is a possible way for you to enable different drivers for your two network cards.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

Could try blacklisting the obsolete driver......

Revision history for this message
ThomasB (tbrunnthaler) said :
#11

I changed NIC to Intel with same result. Both cards are on PCI bus and it seems both cards (also the e1000 driver) have same troubles. The bandwidth reduces after few hours running fine from eg. 30Mbit Down / 10Mbit Up to 10Mbit Down / 0,2 Up. I dont understand why.

uname -r
5.0.0-27-generic

 lshw -class network
  *-network
       Beschreibung: Ethernet interface
       Produkt: 82541PI Gigabit Ethernet Controller
       Hersteller: Intel Corporation
       Physische ID: 0
       Bus-Informationen: pci@0000:04:00.0
       Logischer Name: p4p1
       Version: 05
       Seriennummer: 68:05:ca:a1:05:27
       Größe: 1Gbit/s
       Kapazität: 1Gbit/s
       Breite: 32 bits
       Takt: 66MHz
       Fähigkeiten: pm pcix bus_master cap_list rom ethernet physical tp 10bt 10 bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       Konfiguration: autonegotiation=on broadcast=yes driver=e1000 driverversio n=7.3.21-k8-NAPI duplex=full ip=xx.xx.xx.xx latency=32 link=yes mingnt=255 mul ticast=yes port=twisted pair speed=1Gbit/s
       Ressourcen: irq:16 memory:f7340000-f735ffff memory:f7320000-f733ffff iopo rt:d080(Größe=64) memory:f7300000-f731ffff

Revision history for this message
ThomasB (tbrunnthaler) said :
#12

Good morning - i found out that obviously the problem is related to a bug within PCI bus controller ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 01) as described here (orignal website has currently an error) https://webcache.googleusercontent.com/search?q=cache:EMm9McoejjsJ:https://cronix.cc/hardware-bugs-sind-scheisse/+&cd=12&hl=de&ct=clnk&gl=at&client=firefox-b-d

03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 01)

Here the log whenever bandwith goes down:

Sep 04 16:22:54 linux kernel: Disabling IRQ #16
Sep 04 16:22:54 linux kernel: [<00000000dea9fefa>] e1000_intr [e1000]
Sep 04 16:22:54 linux kernel: handlers:
Sep 04 16:22:54 linux kernel: secondary_startup_64+0xa4/0xb0
Sep 04 16:22:54 linux kernel: start_secondary+0x1ab/0x200
Sep 04 16:22:54 linux kernel: cpu_startup_entry+0x1d/0x20
Sep 04 16:22:54 linux kernel: do_idle+0x204/0x280
Sep 04 16:22:54 linux kernel: call_cpuidle+0x23/0x40
Sep 04 16:22:54 linux kernel: cpuidle_enter+0x17/0x20
Sep 04 16:22:54 linux kernel: R13: 0000000000000004 R14: ffffffff9f553ed8 R15: 00019b3983eac6f4
Sep 04 16:22:54 linux kernel: R10: ffffa046831b3e30 R11: 0000000000000001 R12: ffff8b7bfeb2d000
Sep 04 16:22:54 linux kernel: RBP: ffffa046831b3ea0 R08: 0000000000000002 R09: 0000000000022640
Sep 04 16:22:54 linux kernel: RDX: 00019b3983eac6f4 RSI: 000000002927d7db RDI: 0000000000000000
Sep 04 16:22:54 linux kernel: RAX: ffff8b7bfeb22d80 RBX: ffffffff9f553d40 RCX: 000000000000001f
Sep 04 16:22:54 linux kernel: RSP: 0018:ffffa046831b3e60 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffde
Sep 04 16:22:54 linux kernel: Code: 66 90 31 ff e8 d8 b7 86 ff 80 7d d3 00 74 17 9c 58 66 66 90 66 90 f6 c4 02 0f 85 54 03 00 00 31 ff e8 cb f3 8c ff fb 66 66 90 <66> 6
Sep 04 16:22:54 linux kernel: RIP: 0010:cpuidle_enter_state+0xb9/0x440
Sep 04 16:22:54 linux kernel: </IRQ>
Sep 04 16:22:54 linux kernel: common_interrupt+0xf/0xf
Sep 04 16:22:54 linux kernel: do_IRQ+0x4e/0xe0
Sep 04 16:22:54 linux kernel: handle_irq+0x20/0x30
Sep 04 16:22:54 linux kernel: handle_fasteoi_irq+0x7c/0x130
Sep 04 16:22:54 linux kernel: handle_irq_event+0x3b/0x60
Sep 04 16:22:54 linux kernel: handle_irq_event_percpu+0x54/0x80
Sep 04 16:22:54 linux kernel: note_interrupt+0x24b/0x2a0
Sep 04 16:22:54 linux kernel: __report_bad_irq+0x35/0xc0
Sep 04 16:22:54 linux kernel: dump_stack+0x63/0x85
Sep 04 16:22:54 linux kernel: <IRQ>
Sep 04 16:22:54 linux kernel: Call Trace:
Sep 04 16:22:54 linux kernel: Hardware name: System manufacturer System Product Name/P8P67-M, BIOS 3703 07/16/2013
Sep 04 16:22:54 linux kernel: CPU: 2 PID: 0 Comm: swapper/2 Tainted: G W OE 5.0.0-27-generic #28~18.04.1-Ubuntu
Sep 04 16:22:54 linux kernel: irq 16: nobody cared (try booting with the "irqpoll" option)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

You could try the 5.2.11 kernel (latest stable)
http://ubuntuhandbook.org/index.php/2019/07/install-linux-kernel-5-2-ubuntu-linux-mint/

Its the same method as above.

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

Did you try the hint in the error log:

irq 16: nobody cared (try booting with the "irqpoll" option)

(I have no idea about the possible consequences.)

Revision history for this message
ThomasB (tbrunnthaler) said :
#15

Fixed by changing network card from PCI to PCIe due to bug in ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 01)