1

I have an issue with the wired connection in Ubuntu 20.04. When I restart the wired connection, the internet is connecting for 10 seconds and after that internet disconnected. It happens after connecting to another ethernet. I've tested in Windows on the same device and the wired connection work perfectly.

ifconfig:

br-01eaafad0ac5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:c2:c2:d7:40  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-8af8a389b013: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.49.1 netmask 255.255.255.0 broadcast 192.168.49.255 ether 02:42:a3:bb:fd:20 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 ether 02:42:13:f0:9d:0a txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.0.125 netmask 255.255.255.0 broadcast 172.17.0.255 inet6 fe80::bdbd:d4d3:27b0:da2b prefixlen 64 scopeid 0x20<link> ether 8c:0f:6f:72:74:2e txqueuelen 1000 (Ethernet) RX packets 72 bytes 15513 (15.5 KB) RX errors 0 dropped 4 overruns 0 frame 0 TX packets 304 bytes 25513 (25.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 1613 bytes 148550 (148.5 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1613 bytes 148550 (148.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 40:9f:38:0c:4d:97 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlx1062eb320a88: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.43.3 netmask 255.255.255.0 broadcast 192.168.43.255 inet6 fe80::d8c2:1da0:643e:f5cf prefixlen 64 scopeid 0x20<link> ether 10:62:eb:32:0a:88 txqueuelen 1000 (Ethernet) RX packets 4026 bytes 7045370 (7.0 MB) RX errors 0 dropped 265 overruns 0 frame 0 TX packets 2740 bytes 1329710 (1.3 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

sudo lshw -C network:

  *-network                 
       description: Wireless interface
       product: RTL8723BE PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: wlp1s0
       version: 00
       serial: 40:9f:38:0c:4d:97
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8723be driverversion=5.8.0-48-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:17 ioport:e000(size=256) memory:df100000-df103fff
  *-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:02:00.0
       logical name: enp2s0
       version: 15
       serial: 8c:0f:6f:72:74:2e
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.0-48-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=172.17.0.125 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:19 ioport:d000(size=256) memory:df004000-df004fff memory:df000000-df003fff
  *-network
       description: Wireless interface
       physical id: 1
       bus info: usb@1:6
       logical name: wlx1062eb320a88
       serial: 10:62:eb:32:0a:88
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=r8188eu driverversion=5.8.0-48-generic ip=192.168.43.3 multicast=yes wireless=IEEE 802.11bgn

dmesg | grep e1000e: Nothing

dmesg | grep r81

[    0.026270] percpu: Embedded 56 pages/cpu s192512 r8192 d28672 u524288
[    0.026275] pcpu-alloc: s192512 r8192 d28672 u524288 alloc=1*2097152
[    0.676015] libphy: r8169: probed
[    0.676174] r8169 0000:02:00.0 eth0: RTL8168h/8111h, 8c:0f:6f:72:74:2e, XID 541, IRQ 126
[    0.676175] r8169 0000:02:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    0.677083] r8169 0000:02:00.0 enp2s0: renamed from eth0
[    3.588250] r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
[    3.709693] usbcore: registered new interface driver r8188eu
[    3.986279] r8188eu 1-6:1.0 wlx1062eb320a88: renamed from wlan0
[    6.410031] Generic FE-GE Realtek PHY r8169-200:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[    6.609967] r8169 0000:02:00.0 enp2s0: Link is Down
[  319.190371] r8169 0000:02:00.0 enp2s0: Link is Up - 1Gbps/Full - flow control off
[27285.099624] r8169 0000:02:00.0 enp2s0: Link is Down
[27292.060262] Generic FE-GE Realtek PHY r8169-200:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[27292.244453] r8169 0000:02:00.0 enp2s0: Link is Down
[27296.397106] r8169 0000:02:00.0 enp2s0: Link is Up - 1Gbps/Full - flow control off
[29075.912170] r8188eu 1-6:1.0 wlx1062eb320a88: renamed from wlan0
[59818.035387] r8169 0000:02:00.0 enp2s0: Link is Down
[59821.142964] Generic FE-GE Realtek PHY r8169-200:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[59821.339009] r8169 0000:02:00.0 enp2s0: Link is Down
[59825.437233] r8169 0000:02:00.0 enp2s0: Link is Up - 1Gbps/Full - flow control off

lsmod | grep r81:

r8188eu               430080  0
lib80211               16384  1 r8188eu
cfg80211              778240  3 rtlwifi,mac80211,r8188eu
r8169                  77824  0

apt-cache policy r8168-dkms:

r8168-dkms:
  Installed: (none)
  Candidate: 8.048.00-1ubuntu0.20.04.1
  Version table:
     8.048.00-1ubuntu0.20.04.1 500
        500 http://ir.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        500 http://ir.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages
     8.048.00-1 500
        500 http://ir.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://ir.archive.ubuntu.com/ubuntu focal/universe i386 Packages
Nathaniel M. Beaver
  • 1,518
  • 12
  • 33

1 Answers1

0

Short version: install the r8168-dkms package:

apt install r8168-dkms

and then reboot to deactivate the old driver and activate the new one. (This can also be done without rebooting, but rebooting is simpler.)

Long version: This appears to be a known bug in the r8169 driver:

ubuntu 20.4 - retransmitts with r8169

i run some network-tests (iperf3) and noticed massive retransmitts in ubuntu 20.4 with kernel 5.4.0-29. I'm using module r8169 for network-adapter

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

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1880076

live iso 20.04 no wired network

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1875126

I think it may also be related to these upstream bug reports:

An onboard network Realtek RTL8111E controller, which is served via r8169 driver, doesn't provide a stable network connection on kernel versions 5.3 (5.3.18-lp152.33-default openSUSE Leap 15.2) and 5.8 (5.8.1-3.1.g846658e). The workaround, mentioned in some similiar bug reports, to disable ASPM (pcie_aspm=off) doesn't stabilize the network.

https://bugzilla.kernel.org/show_bug.cgi?id=209081

Starting from kernel 5.3-rc1, the r8169 driver oops during os boot.
I can not use the network.

https://bugzilla.kernel.org/show_bug.cgi?id=204343

If you need to reload the drivers without rebooting, this can be done via these commands:

sudo rmmod r8169
sudo modprobe r8168
sudo /etc/init.d/networking restart

If it stops working after a reboot, try this to make sure the r8169 driver doesn't get loaded on start up:

echo 'blacklist r8169' | sudo tee -a /etc/modprobe.d/blacklist.conf

Related:

Nathaniel M. Beaver
  • 1,518
  • 12
  • 33