Slow to connect to ethernet

I have recently switched from Endeavour with XFCE to Endeavour with KDE…big change I know. Everything is working great except whenever I log in it takes about 30 seconds for my wired connection to connect. I get notifications from apps (discord etc) that they can’t connect. This happens when the computer goes to sleep or boots it seems. Simply locking the screen does not cause the issue. I have searched high and low for a setting but haven’t had luck.

This did not happen on XFCE so I am sure I am missing a setting somewhere

Define switch? Like full system reinstall, or install KDE next to XFCE and uninstall XFCE?

So you use now KNetworkManager?

Output of inxi -nb will help other people help you. Also check journalctl -b for sign of any errors when this happens. You can journalctl -f and see what will happen when you put PC to sleep and wake up.

Thank you for the Reply! Sorry for not being clearer, yes I completely wiped and reinstalled so fresh install. Output of inxi below

[sparda@sparda-Endeavour ~]$ inxi -nb
System:
  Host: sparda-Endeavour Kernel: 6.9.3-arch1-1 arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.0.5 Distro: EndeavourOS
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: TUF GAMING X670E-PLUS WIFI v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 2613
    date: 04/12/2024
CPU:
  Info: 12-core AMD Ryzen 9 7900X3D [MT MCP] speed (MHz): avg: 3820
    min/max: 545/5660
Graphics:
  Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] driver: amdgpu
    v: kernel
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
    1: 2560x1440 2: 1080x1920
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.1-arch1.1
    renderer: AMD Radeon RX 7900 XTX (radeonsi navi31 LLVM 17.0.6 DRM 3.57
    6.9.3-arch1-1)
Network:
  Device-1: Realtek RTL8125 2.5GbE driver: r8169
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: c8:7f:54:5d:54:c3
  Device-2: MEDIATEK MT7921K Wi-Fi 6E 80MHz driver: mt7921e
  IF: wlan0 state: down mac: 7e:5a:24:50:c9:22
Drives:
  Local Storage: total: 2.73 TiB used: 885.46 GiB (31.7%)
Info:
  Memory: total: 64 GiB available: 62.51 GiB used: 8.97 GiB (14.3%)
  Processes: 581 Uptime: 23h 53m Shell: Bash inxi: 3.3.34

And here is the journal logs, with grep -E ‘network|NetworkManager’

Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.2696] manager: sleep: wake requested (sleeping: yes  enabled: yes)
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.2698] device (eno1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.4960] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.5781] device (wlan0): set-hw-addr: set MAC address to 7E:5A:24:50:C9:22 (scanning)
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.5907] device (p2p-dev-wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.5908] manager: NetworkManager state is now DISCONNECTED
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6495] device (wlan0): supplicant interface state: internal-starting -> disconnected
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6495] device (p2p-dev-wlan0): state change: unavailable -> unmanaged (reason 'unmanaged-link-not-init', sys-iface-state: 'removed')
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6497] Wi-Fi P2P device controlled by interface wlan0 created
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6498] manager: (p2p-dev-wlan0): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/6)
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6498] device (p2p-dev-wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6499] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Jun 14 07:58:27 sparda-Endeavour NetworkManager[892]: <info>  [1718366307.6501] device (p2p-dev-wlan0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4632] device (eno1): carrier: link connected
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4633] device (eno1): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4636] policy: auto-activating connection 'Wired connection 1' (5555c6b3-28c8-3458-94eb-f268e756c8f7)
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4637] device (eno1): Activation: starting connection 'Wired connection 1' (5555c6b3-28c8-3458-94eb-f268e756c8f7)
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4638] device (eno1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4638] manager: NetworkManager state is now CONNECTING
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4639] device (eno1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4692] device (eno1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 14 07:58:30 sparda-Endeavour NetworkManager[892]: <info>  [1718366310.4695] dhcp4 (eno1): activation: beginning transaction (timeout in 45 seconds)
Jun 14 07:58:33 sparda-Endeavour systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Jun 14 07:59:04 sparda-Endeavour NetworkManager[892]: <info>  [1718366344.9243] dhcp4 (eno1): state changed new lease, address=192.168.50.4, acd pending
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.0751] dhcp4 (eno1): state changed new lease, address=192.168.50.4
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.0752] policy: set 'Wired connection 1' (eno1) as default for IPv4 routing and DNS
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.0953] device (eno1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.1420] device (eno1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.1421] device (eno1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.1422] manager: NetworkManager state is now CONNECTED_SITE
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.1423] device (eno1): Activation: successful, device activated.
Jun 14 07:59:05 sparda-Endeavour NetworkManager[892]: <info>  [1718366345.1424] manager: NetworkManager state is now CONNECTED_GLOBAL
Jun 14 07:59:15 sparda-Endeavour systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

Whats interesting here is that it says connecting only takes about 2 seconds…but that is not what is observed

Few things to try then.

Use driver r8168 instead of r8169 https://wiki.archlinux.org/title/Network_configuration/Ethernet#Realtek_RTL8111/8168B

Enable IOMMU
https://wiki.archlinux.org/title/Network_configuration/Ethernet#Gigabyte_Motherboard_with_Realtek_8111/8168/8411

And take a look deeper in this document.

If this does not work - I would try to setup 1. fixed DNS address 2. fixed IP address for your PC - maybe DHCP is slow

Thank you for bringing this up actually, because I had some issues on XFCE by myself, so will probably also try to troubleshoot here for myself.

With this newer chip there should be no reason to use r8168. The r8168 package is also no longer in the pacman repo. It is in the AUR as r8168-dkms but is not for this chip anyway. The r8169 kernel module is the one to use.

Edit: I’m not sure the reason the network is taking time to connect. :thinking:

1 Like

Without doing a deep dive. When I had trouble connecting to Network it helped to disable ipv6.

I tried manually assigning an IP and still had the issue, also turning off IPv6 didnt change the behavior either. On boot this time I counted to 30 for it to connect, real scientific I know but about 30 seconds to connect to a wired connection