Continuous error with ethernet

I am on gnome and the stable release of Endeavour. I’ve been using it for a few months and have very few complaints, having tried Mint as soon as I switched from Windows 10 and not liking it. However, there is a recurrent error that has been bugging me. When I plug in my ethernet cable, it seems to work, and I “yay’d” the r8168 driver DKMS, but I get the error “connection failed activation of network connection failed.” Below is the code I found for the NetworkManager session, but I don’t know how to interpret or fix the problem.

$ NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-08-06 16:00:32 CDT; 2min 11s ago
       Docs: man:NetworkManager(8)
   Main PID: 921 (NetworkManager)
      Tasks: 4 (limit: 18946)
     Memory: 16.3M (peak: 16.9M)
        CPU: 333ms
     CGroup: /system.slice/NetworkManager.service
             └─921 /usr/bin/NetworkManager --no-daemon

Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.3529] device (enp2s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.3861] dhcp4 (enp2s0): canceled DHCP transaction
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.3862] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.3862] dhcp4 (enp2s0): state changed no lease
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.3980] policy: auto-activating connection 'Wired connection 1' (872a2858-ff57-373a-9cce-f3840efec153)
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.3990] device (enp2s0): Activation: starting connection 'Wired connection 1' (872a2858-ff57-373a-9cce-f3840efec153)
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.4000] device (enp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.4007] device (enp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.5242] device (enp2s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Aug 06 16:02:07 kieran-blade NetworkManager[921]: <info>  [1722978127.5249] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)

If you have a 8168 compatible ethernet card, most of them work with the driver in kernel. So you wouldn’t need to install any r8168 package from AUR.
If this is the case, uninstall the r8168 package, reboot, and test.

Also, please show the output of command
inxi -Nza

Hello, Thank you for the quick response! This community is part of why I chose EOS!
The same error is occuring, but the wired connection holds on for longer in a buffer state before disconnecting.

The inxi -Nza is here:

[kieraneb@kieran-blade ~]$ inxi -Nza
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Razer USA driver: r8168 v: 8.053.00-NAPI modules: r8169 pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  Device-2: Intel Wi-Fi 5 Wireless-AC 9x6x [Thunder Peak] driver: iwlwifi
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 03:00.0
    chip-ID: 8086:2526 class-ID: 0280
  Device-3: Sony DualSense wireless controller (PS5)
    driver: playstation,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-11:11 chip-ID: 054c:0ce6 class-ID: 0300
[kieraneb@kieran-blade ~]$ 



and the updated Network Manager is here

[kieraneb@kieran-blade ~]$ sudo systemctl status NetworkManager
$ NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-08-06 16:29:29 CDT; 11min ago
       Docs: man:NetworkManager(8)
   Main PID: 960 (NetworkManager)
      Tasks: 4 (limit: 18946)
     Memory: 17.9M (peak: 19.9M)
        CPU: 556ms
     CGroup: /system.slice/NetworkManager.service
             └─960 /usr/bin/NetworkManager --no-daemon

Aug 06 16:39:41 kieran-blade NetworkManager[960]: <info>  [1722980381.8639] device (enp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Aug 06 16:39:41 kieran-blade NetworkManager[960]: <info>  [1722980381.8642] device (enp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Aug 06 16:39:41 kieran-blade NetworkManager[960]: <info>  [1722980381.8860] device (enp2s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Aug 06 16:39:41 kieran-blade NetworkManager[960]: <info>  [1722980381.8863] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Aug 06 16:40:26 kieran-blade NetworkManager[960]: <info>  [1722980426.8462] device (enp2s0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Aug 06 16:40:26 kieran-blade NetworkManager[960]: <warn>  [1722980426.8470] device (enp2s0): Activation: failed for connection 'Wired connection 1'
Aug 06 16:40:26 kieran-blade NetworkManager[960]: <info>  [1722980426.8476] device (enp2s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Aug 06 16:40:26 kieran-blade NetworkManager[960]: <info>  [1722980426.8659] dhcp4 (enp2s0): canceled DHCP transaction
Aug 06 16:40:26 kieran-blade NetworkManager[960]: <info>  [1722980426.8660] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
Aug 06 16:40:26 kieran-blade NetworkManager[960]: <info>  [1722980426.8660] dhcp4 (enp2s0): state changed no lease
[kieraneb@kieran-blade ~]$ 

I appreciate you helping me out, it’s been an interesting journey away from Windows, but well worth it

Welcome @kieran :wave: :sunglasses: :enos_flag:

As it would appear both drivers are causing issues, can we step back a moment and just confirm it’s not a cable, switch or router issue?

  • Test with a different and ideally pretty new network lead.
  • Use a different port on the switch and/or router.
  • Confirm other cabled devices on your network are having no similar issues.

The ideas by @Bink certainly are worth trying.

In addition, you still have the r8168 driver and not the kernel driver (r8169). Did you try uninstalling r8168 (and reboot)? Not sure based on your posts.

Yeah I was a bit confused about this myself. The r8169 kernel module is mentioned, but the driver is stated as r8168. I wasn’t sure if that was the expected behaviour.

Perhaps share the output of these two command @kieran :
(1st shows status of modules in the kernel, 2nd shows installed packages, both filtered for results containing r816)

lsmod | grep r816
yay -Q | grep r816

Sorry, I was out of town and away from my PC.

[kieraneb@kieran-blade ~]$ lsmod | grep r816
r8169                 118784  0
mdio_devres            12288  1 r8169
libphy                229376  3 r8169,mdio_devres,realtek
r8168                 692224  0
[kieraneb@kieran-blade ~]$ yay -Q | grep r816
[kieraneb@kieran-blade ~]$ 


I’m somewhat confused myself - but I never had issues with ethernet when I was on Windows or Mint

For some reason you have both r8168 and r8169 modules.

Please show which related packages you have installed:

pacman -Q | grep r8168

Uninstall the r8168 package:

sudo pacman -R r8168   # correct the name if another r8168* is installed

Reboot and test ethernet.
If errors still occur, reinstall r8168:

yay -S r8168-dkms

Reboot, test and report.

@kieran has run the equivalent already, with no results :face_with_spiral_eyes:

I’m a bit mystified on this one…

Arch Wiki > Kernel module > Blacklisting

Blacklisting, in the context of kernel modules, is a mechanism to prevent the kernel module from loading. This could be useful if, for example, … if loading that module causes problems: for instance there may be two kernel modules that try to control the same piece of hardware, and loading them together would result in a conflict.

I’ve not had to blacklist a module before, but if I’ve understood the Wiki’s instructions, you’d create a file under /etc/modprobe.d/ that contains the blacklist command for the module in question.

This will create such a file (including a comment so you can recall what it’s doing):

sudo printf '# Do not load r8169 module on boot\nblacklist r8169' > /etc/modprobe.d/r816.conf

Perhaps verify that it’s made that file by visiting /etc/modprobe.d/ and is in line with the Wiki article. Then reboot and see how you go? After rebooting:

lsmod | grep r816

You could try command

sudo rmmod r8168

and test again.
If it works any better after rmmod, we just need to find the source of the r8168 module.

@Bink
You’re right, missed that yay output.

[sudo] password for kieraneb: 
rmmod: ERROR: Module r8168 is not currently loaded
[kieraneb@kieran-blade ~]$