You are not logged in.

#1 2024-10-29 22:54:43

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

[SOLVED] Random ethernet disconnections

Hi! I've recently encountered a problem with random short disconnects on my machine and I've noticed that it always looks like this in journalctl:

4741   │ Oct 29 23:14:55 arch-pc systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
4742   │ Oct 29 23:14:57 arch-pc kernel: Generic FE-GE Realtek PHY r8169-0-400:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
4743   │ Oct 29 23:14:57 arch-pc kernel: r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
4744   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3848] device (enp4s0): carrier: link connected
4745   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3850] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
4746   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3855] policy: auto-activating connection 'Wired connection 1' (bc8d9cdf-7e22-397d-a0ce-9abaa3cc7769)
4747   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3857] device (enp4s0): Activation: starting connection 'Wired connection 1' (bc8d9cdf-7e22-397d-a0ce-9abaa3cc7769)
4748   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3858] device (enp4s0): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
4749   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3859] manager: NetworkManager state is now CONNECTING
4750   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3860] device (enp4s0): state change: prepare -> config (reason 'none', managed-type: 'full')
4751   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3863] device (enp4s0): state change: config -> ip-config (reason 'none', managed-type: 'full')
4752   │ Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3866] dhcp4 (enp4s0): activation: beginning transaction (timeout in 45 seconds)
4753   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.3795] dhcp4 (enp4s0): state changed new lease, address=192.168.0.16, acd pending
4754   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.5547] dhcp4 (enp4s0): state changed new lease, address=192.168.0.16
4755   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.5549] policy: set 'Wired connection 1' (enp4s0) as default for IPv4 routing and DNS
4756   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.5661] device (enp4s0): state change: ip-config -> ip-check (reason 'none', managed-type: 'full')
4757   │ Oct 29 23:14:58 arch-pc systemd[1]: Starting Network Manager Script Dispatcher Service...
4758   │ Oct 29 23:14:58 arch-pc systemd[1]: Started Network Manager Script Dispatcher Service.
4759   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.6130] device (enp4s0): state change: ip-check -> secondaries (reason 'none', managed-type: 'full')
4760   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.6131] device (enp4s0): state change: secondaries -> activated (reason 'none', managed-type: 'full')
4761   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.6133] manager: NetworkManager state is now CONNECTED_SITE
4762   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.6134] device (enp4s0): Activation: successful, device activated.
4763   │ Oct 29 23:14:58 arch-pc NetworkManager[607]: <info>  [1730240098.7764] manager: NetworkManager state is now CONNECTED_GLOBAL
4764   │ Oct 29 23:15:01 arch-pc rtkit-daemon[2302]: Supervising 9 threads of 6 processes of 1 users.
4765   │ Oct 29 23:15:01 arch-pc rtkit-daemon[2302]: Supervising 9 threads of 6 processes of 1 users.
4766   │ Oct 29 23:15:03 arch-pc rtkit-daemon[2302]: Supervising 9 threads of 6 processes of 1 users.
4767   │ Oct 29 23:15:03 arch-pc rtkit-daemon[2302]: Supervising 9 threads of 6 processes of 1 users.
4768   │ Oct 29 23:15:08 arch-pc systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

Could this be a problem with the driver, or perhaps a hardware issue (cable or jack perhaps)?

Last edited by bfplaktana (2024-11-20 16:47:24)

Offline

#2 2024-10-30 07:26:36

-thc
Member
Registered: 2017-03-15
Posts: 739

Re: [SOLVED] Random ethernet disconnections

Try the cable first. If "the other end of the cable" features multiple ports, try another port.

If nothing changes try a kernel downgrade (check "linux-lts" first).

Offline

#3 2024-10-30 07:33:00

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

And yes:

Oct 29 23:14:57 arch-pc kernel: Generic FE-GE Realtek PHY r8169-0-400:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
Oct 29 23:14:57 arch-pc kernel: r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3848] device (enp4s0): carrier: link connected
Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3850] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')

It's the cable. Plugs are part of the cable and they're on both ends tongue

Edit: F5ck

Last edited by seth (2024-10-30 07:33:17)

Offline

#4 2024-10-30 13:18:38

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

seth wrote:

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

And yes:

Oct 29 23:14:57 arch-pc kernel: Generic FE-GE Realtek PHY r8169-0-400:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
Oct 29 23:14:57 arch-pc kernel: r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3848] device (enp4s0): carrier: link connected
Oct 29 23:14:57 arch-pc NetworkManager[607]: <info>  [1730240097.3850] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')

It's the cable. Plugs are part of the cable and they're on both ends tongue

Edit: F5ck

Thank you for correcting me.
As for the plugs, why did you mention that?

Offline

#5 2024-10-30 13:26:56

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Because sometimes they're just loosly plugged (eg. because the latch protection collides w/ the case and the plug doesn't actually snap in firmly) and sometimes people spend hours looking at their end of the cable, completely forgetting that there's a second end.
And yes: all of the above has shown up on this board before smile

Offline

#6 2024-11-04 20:23:07

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

So I bought a new cable and it seems that the problem hasn't really stopped, so I decided to boot into my Win11 install and it seems that disconnects never really happen there, so I assume this has to be something with my OS (image down below, obviously no 4004 errors for almost an hour since boot, refreshed ofc).

https://i.imgur.com/fINdSIU.png

Here is my entire journalctl since boot: https://0x0.st/XGkK.txt

❯ lspci | grep Ethernet
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 26)

Last edited by bfplaktana (2024-11-04 21:04:53)

Offline

#7 2024-11-04 20:32:41

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

I decided to boot into my Win11 install and

3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

You might simply have a stale lease or whatever.

Please replace the oversized image w/ a link (the board has a 250x250 px max rule)


Nov 04 21:09:50 arch-pc NetworkManager[613]: <info>  [1730750990.3584] device (enp4s0): carrier: link connected
Nov 04 21:09:50 arch-pc kernel: Generic FE-GE Realtek PHY r8169-0-400:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
Nov 04 21:09:50 arch-pc kernel: r8169 0000:04:00.0 enp4s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx

If it's really not windows (some people needed a cmos reset to get out of this…) you can test
1. "pcie_aspm=off", https://wiki.archlinux.org/title/Kernel_parameters
2. https://aur.archlinux.org/packages/r8168-dkms

But downshifts are usually a signal (cable) issue.
You could disable the autonegotiation w/ ethtool, but that would not prevent the disconnects.

Offline

#8 2024-11-05 18:54:31

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

Thank you for your help, Seth. The issue hasn't come up since I disabled fast boot on Windows.

Offline

#9 2024-11-05 20:39:16

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#10 2024-11-06 19:13:20

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

Ok so I might have been a bit impatient because it's not resolved and it still drops randomly.
Could it perhaps be because I'm using Cat4 cables? Also my internet is 100 Mb/s anyways, shouldn't that be the default negotiated speed regardless of cabling?
If not that, I have to assume that my motherboard port is flunked, but then again this has never happened on my boot...

Offline

#11 2024-11-06 19:21:31

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Could it perhaps be because I'm using Cat4 cables?

Are you? Then "most likely"

Also my internet is 100 Mb/s anyways, shouldn't that be the default negotiated speed regardless of cabling?

This isn't about your internet, the LAN is 1GB (and 100MB ethernet NICs haven't been commonly sold in decades)
The partners nogotiate 1GB, but then have to downshift because of the insufficient cables - whether that triggers the losses is a different question, but patching a Cat5 or Cat6 cable is certainly a good start…

Offline

#12 2024-11-06 19:35:23

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

Hmm, I actually just checked and it seems that I'm currently using this Cat5e cable: https://www.speedlink.com/en/CAT-5e-Net … -170406-BK
Should I buy a 1 Gbps Cat 6 cable?

Offline

#13 2024-11-06 20:21:21

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Try

Also mind

-thc wrote:

If "the other end of the cable" features multiple ports, try another port.

If nothing changes try a kernel downgrade (check "linux-lts" first).

Offline

#14 2024-11-13 20:17:35

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

Turning pcie_aspm off did seemingly nothing.
Installing r8168 did stop all downshifting events, but the disconnects still happen.
I'll update you on the results of downgrading my kernel.

Offline

#15 2024-11-14 21:19:05

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

So downgrading the kernel didn't really do anything either. I'm really at my wits end. I've even run a Windows test again for disconnects but it never occurred. Is there anything else to try?

Offline

#16 2024-11-14 21:35:57

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Do you run any power management tools like TLP?
Can you please post a journal w/ the 8168 module?

Offline

#17 2024-11-15 11:47:50

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

No TLP on my machine.
Here is the journal: http://0x0.st/Xk0p.txt

Offline

#18 2024-11-15 15:43:23

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Nov 15 12:17:59 arch-pc NetworkManager[626]: <info>  [1731669479.0005] device (enp4s0): carrier: link connected
Nov 15 12:17:59 arch-pc NetworkManager[626]: <info>  [1731669479.0007] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:35:08 arch-pc NetworkManager[626]: <info>  [1731670508.6832] device (enp4s0): state change: activated -> unavailable (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:35:16 arch-pc NetworkManager[626]: <info>  [1731670516.8760] device (enp4s0): carrier: link connected
Nov 15 12:35:16 arch-pc NetworkManager[626]: <info>  [1731670516.8761] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:37:08 arch-pc NetworkManager[626]: <info>  [1731670628.2849] device (enp4s0): state change: activated -> unavailable (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:37:15 arch-pc NetworkManager[626]: <info>  [1731670635.4577] device (enp4s0): carrier: link connected
Nov 15 12:37:15 arch-pc NetworkManager[626]: <info>  [1731670635.4579] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:40:55 arch-pc NetworkManager[626]: <info>  [1731670855.2687] device (enp4s0): state change: activated -> unavailable (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:41:02 arch-pc NetworkManager[626]: <info>  [1731670862.4445] device (enp4s0): carrier: link connected
Nov 15 12:41:02 arch-pc NetworkManager[626]: <info>  [1731670862.4446] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:42:17 arch-pc NetworkManager[626]: <info>  [1731670937.3518] device (enp4s0): state change: activated -> unavailable (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:42:25 arch-pc NetworkManager[626]: <info>  [1731670945.5409] device (enp4s0): carrier: link connected
Nov 15 12:42:25 arch-pc NetworkManager[626]: <info>  [1731670945.5411] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
Nov 15 12:17:59 arch-pc kernel: r8168: enp4s0: link up
Nov 15 12:35:02 arch-pc kernel: r8168: enp4s0: link down
Nov 15 12:35:16 arch-pc kernel: r8168: enp4s0: link up
Nov 15 12:37:02 arch-pc kernel: r8168: enp4s0: link down
Nov 15 12:37:15 arch-pc kernel: r8168: enp4s0: link up
Nov 15 12:40:49 arch-pc kernel: r8168: enp4s0: link down
Nov 15 12:41:02 arch-pc kernel: r8168: enp4s0: link up
Nov 15 12:42:11 arch-pc kernel: r8168: enp4s0: link down
Nov 15 12:42:25 arch-pc kernel: r8168: enp4s0: link up

Did you re-plug the cable a lot?

Offline

#19 2024-11-15 16:09:46

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

No, those are part of the random disconnects.

Offline

#20 2024-11-15 16:34:55

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

You're loosing and re-gaining the carrier within ~60s
Together with the downshift and since it affects both drivers I'm betting your right arm that it's some cable issue - regardless whether you noticed that on windows.

On thing though:
"pcie_aspm.policy=performance" is *NOT* "pcie_aspm=off"
Did you actually test the actual, real, literal, verbatim, indeed "pcie_aspm=off" condition?

Offline

#21 2024-11-15 19:23:11

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

Just tested pcie_aspm=off, no difference. Since cable change made no difference, do you suppose I should call a technician to test my outlet?

Offline

#22 2024-11-15 20:02:48

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

The carrier is flickering. If it's not the cable (make sure it's firmly plugged in on both ends, you should not be able to wiggle or rattle it) it's either the ethernet NIC or the peer.
Did you try to switch the jack on the other end?
Do other devices attached to the switch show comparable behavior?
Do you get the same w/ a completely different software stack like https://grml.org/ ?
Can you try this system against a different switch?

Offline

#23 2024-11-16 01:41:11

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

Just tried grml, it seems that it's persistent: http://0x0.st/XkCG.txt
I assume that this means that Arch itself is not at fault, but still - I play online gamer on my Windows boot. A disconnect that long would impact my performance.
I'll test the rest tomorrow morning.

Offline

#24 2024-11-16 11:34:17

bfplaktana
Member
Registered: 2024-10-23
Posts: 16

Re: [SOLVED] Random ethernet disconnections

So I ran a ping test for about an hour on my laptop, replugging the cable into it: https://0x0.st/Xdz5.txt
No flickering other than on boot. Could this implicate busted NIC?

Offline

#25 2024-11-16 14:48:54

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: [SOLVED] Random ethernet disconnections

Could this implicate busted NIC?

At least the problem seems located there.
Does the cable firmly snap in on the problematic system? (Sometimes the  latch protection collides w/ the case and the plug doesn't actually snap in firmly)
Is the r8169 chip part of the board? Are there BIOS updates available for the system?

Offline

Board footer

Powered by FluxBB