Ethernet connection breaks down sometimes

Hi all,

I’m experiencing sometimes breakdowns of my LAN connection. This is from my installed system:

[    3.325390] r8169 0000:04:00.0 enp4s0: renamed from eth0
[    6.260416] r8169 0000:04:00.0 enp4s0: Link is Down
[   33.975405] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[   33.978328] r8169 0000:04:00.0 enp4s0: Link is Down
[   40.003954] r8169 0000:04:00.0 enp4s0: Link is Down
[   48.930209] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[   48.932515] r8169 0000:04:00.0 enp4s0: Link is Down
[   54.960760] r8169 0000:04:00.0 enp4s0: Link is Down
[   68.168942] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[   68.171255] r8169 0000:04:00.0 enp4s0: Link is Down
[   74.187887] r8169 0000:04:00.0 enp4s0: Link is Down
[   83.222218] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[   83.224505] r8169 0000:04:00.0 enp4s0: Link is Down
[   89.237522] r8169 0000:04:00.0 enp4s0: Link is Down
[   99.277460] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[   99.279658] r8169 0000:04:00.0 enp4s0: Link is Down
[  105.297522] r8169 0000:04:00.0 enp4s0: Link is Down
[  113.361498] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  113.363814] r8169 0000:04:00.0 enp4s0: Link is Down
[  119.397760] r8169 0000:04:00.0 enp4s0: Link is Down
[  141.580484] r8169 0000:04:00.0 enp4s0: Link is Up - 10Mbps/Full (downshifted) - flow control off
[  141.582593] r8169 0000:04:00.0 enp4s0: Link is Down
[  147.601157] r8169 0000:04:00.0 enp4s0: Link is Down
[  163.442526] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  163.444646] r8169 0000:04:00.0 enp4s0: Link is Down
[  169.471192] r8169 0000:04:00.0 enp4s0: Link is Down
[  183.498913] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  183.501261] r8169 0000:04:00.0 enp4s0: Link is Down
[  189.513943] r8169 0000:04:00.0 enp4s0: Link is Down
[  202.431351] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  202.433769] r8169 0000:04:00.0 enp4s0: Link is Down
[  208.447397] r8169 0000:04:00.0 enp4s0: Link is Down
[  231.401678] r8169 0000:04:00.0 enp4s0: Link is Up - 10Mbps/Full (downshifted) - flow control off
[  231.403841] r8169 0000:04:00.0 enp4s0: Link is Down
[  237.421129] r8169 0000:04:00.0 enp4s0: Link is Down
[  246.602777] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  246.604809] r8169 0000:04:00.0 enp4s0: Link is Down
[  252.621127] r8169 0000:04:00.0 enp4s0: Link is Down
[  262.622346] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  262.624675] r8169 0000:04:00.0 enp4s0: Link is Down
[  268.651121] r8169 0000:04:00.0 enp4s0: Link is Down
[  276.294304] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  276.296414] r8169 0000:04:00.0 enp4s0: Link is Down
[  282.324288] r8169 0000:04:00.0 enp4s0: Link is Down
[  297.131042] r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control off
[  297.133395] r8169 0000:04:00.0 enp4s0: Link is Down
[  300.267076] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control off
[  328.553409] [UFW BLOCK] IN=enp4s0 OUT= MAC=33:33:00:00:00:01:2c:3a:fd:90:42:17:86:dd SRC=fe80:0000:0000:0000:2e3a:fdff:fe90:4217 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=53805 DPT=53805 LEN=24 
[  342.175342] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control off
[  342.236258] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control off
[  365.602312] [UFW BLOCK] IN=enp4s0 OUT= MAC=d6:13:7e:f5:29:9c:2c:3a:fd:90:42:17:86:dd SRC=2001:09e8:c95f:ae00:2e3a:fdff:fe90:4217 DST=2001:09e8:c95f:ae00:4d7e:1ffc:a63f:90e1 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=58575 DPT=80 WINDOW=28640 RES=0x00 SYN URGP=0 
[  366.620774] [UFW BLOCK] IN=enp4s0 OUT= MAC=d6:13:7e:f5:29:9c:2c:3a:fd:90:42:17:86:dd SRC=2001:09e8:c95f:ae00:2e3a:fdff:fe90:4217 DST=2001:09e8:c95f:ae00:4d7e:1ffc:a63f:90e1 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=58575 DPT=80 WINDOW=28640 RES=0x00 SYN URGP=0 
[  368.641062] [UFW BLOCK] IN=enp4s0 OUT= MAC=d6:13:7e:f5:29:9c:2c:3a:fd:90:42:17:86:dd SRC=2001:09e8:c95f:ae00:2e3a:fdff:fe90:4217 DST=2001:09e8:c95f:ae00:4d7e:1ffc:a63f:90e1 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=58575 DPT=80 WINDOW=28640 RES=0x00 SYN URGP=0 
[  372.829245] [UFW BLOCK] IN=enp4s0 OUT= MAC=d6:13:7e:f5:29:9c:2c:3a:fd:90:42:17:86:dd SRC=2001:09e8:c95f:ae00:2e3a:fdff:fe90:4217 DST=2001:09e8:c95f:ae00:4d7e:1ffc:a63f:90e1 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=58575 DPT=80 WINDOW=28640 RES=0x00 SYN URGP=0 
[  381.025261] [UFW BLOCK] IN=enp4s0 OUT= MAC=d6:13:7e:f5:29:9c:2c:3a:fd:90:42:17:86:dd SRC=2001:09e8:c95f:ae00:2e3a:fdff:fe90:4217 DST=2001:09e8:c95f:ae00:4d7e:1ffc:a63f:90e1 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=58575 DPT=80 WINDOW=28640 RES=0x00 SYN URGP=0 
[  387.166782] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control off
[  387.229595] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control off

Using a live system doesn’t show up the error. My system booted from Live USB:

$ inxi -Fx
System:
  Host: manjaro Kernel: 6.1.30-1-MANJARO arch: x86_64 bits: 64 compiler: gcc
    v: 12.2.1 Desktop: Xfce v: 4.18.1 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME X570-P v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 4802
    date: 06/15/2023
CPU:
  Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2
    rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 32 MiB
  Speed (MHz): avg: 2587 high: 3600 min/max: 2200/4426 boost: enabled cores:
    1: 2200 2: 2200 3: 2200 4: 2800 5: 2200 6: 3596 7: 2200 8: 2200 9: 2200
    10: 2200 11: 2200 12: 2200 13: 3600 14: 3600 15: 3600 16: 2200
    bogomips: 115232
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
    vendor: Tul / PowerColor AXRX driver: amdgpu v: kernel arch: RDNA-1
    bus-ID: 0a:00.0
  Display: x11 server: X.Org v: 21.1.8 driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
    1: 1280x1024~60Hz 2: 2560x1440~144Hz
  API: OpenGL Message: Unable to show GL data. Required tool glxinfo
    missing.
Audio:
  Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel v: kernel
    bus-ID: 0a:00.1
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 0c:00.4
  API: ALSA v: k6.1.30-1-MANJARO status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 0.3.70 status: off
  Server-3: PulseAudio v: 16.1 status: active
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel port: f000
    bus-ID: 04:00.0
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full

Could it be a kernel issue?

Any hints are appreciated.

Kind regards

schollsky

This might be relevant: Network configuration/Ethernet - ArchWiki

The same driver ( r8169) seems to be in use with both boot methods. There are some mentions here on the forum, searching for r8169 and / or r8168 on this forum will list some previous solutions. This a discussion for adding a boot parameter that solved the issue for one user. ymmv with realtek cards, I have the same card/different vendor. Had this issue once and it turned out to be the switch it was connected to.

Do the downshifts happen with mainline kernel / fallback kernel?

Ahoi Hanzel,

thank you for your hints. Blacklisting r8169 leaves the system completely without network. I’ll try LTS kernel 6.1 and suggested boot parameters. Actually the link seems to be stable with kernel 6.5.0-1.

Kind regards

schollsky

You have to either use r8169 or r8168. If you want to try the 8 version, first, you have to install these drivers.
mhwd is your friend.

2 Likes

Wired connection keeps dropping - #6 by nikgnomic

Manjaro hardware detection tool can install kernel modules for r8168 driver and blacklist r8169 driver

sudo mhwd -i pci network-r8168

Or use Manjaro Settings Manager GUI:

manjaro-settings-manager -m msm_mhwd

enable option in bottom left corner - Show All Devices

Look in section Network controller > RTL8111/8168/8411 for network-r8168

Right click on network-r8168 and select Install

Manjaro Settings Manager should install r8168 driver for each kernel version on system and blacklist the r8169 driver