Skip to main content
Topic: Wired connection keeps deactiviting after waking up from sleep (Read 1096 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Wired connection keeps deactiviting after waking up from sleep

Reply #15
Which command should I run to bring up both wired and wifi connections  without any dhcp?
Based on your output to bring up a wired connection on a freshly booted system with no network managers enabled (though can generally work otherwise)
Code: [Select]
ip link set eth0 up
ip addr add 192.168.1.3/24 broadcast 192.168.1.255 dev eth0
ip route add default via 192.168.1.1

If you have no nameserver in /etc/resolv.conf
Code: [Select]
echo "nameserver 1.1.1.1" > /etc/resolv.conf

Like I say there's confusion in this thread. Lot's of references to wifi and rrfkill which is irrelevant if you are trying to fix the wired connection.

And when you say "wired connection often, but not always, keeps deactivting."
It would help to provide the ip a and ip r output both before and after it stops working.
and try ping tests. Both domain and ip based
Code: [Select]
ping 1.1.1.1
ping google.com

This issue can be occasionally solved by first stoping NetworkManager and then starting it (two separate commands). However, simply running restarting NetworkManager (one command) doesn't work. Below is the command I ran in sequence that worked:
Code: [Select]
sudo sv exit NetworkManager
ok: NetworkManager: runsv not running
sudo sv start NetworkManager
ok: run: NetworkManager: (pid 3231) 16s
sudo sv stop NetworkManager
ok: down: NetworkManager: 1s, normally up
sudo sv start NetworkManager
ok: run: NetworkManager: (pid 3426) 1s

Unfortunately, the same set of command didn't work several minutes ago. That's why I said "occasionally".

Below is NetworkManager's latest log:
Code: [Select]
024-04-24_12:00:15.41540 <info>  [1713960015.4153] device (eth0): carrier: link connected
2024-04-24_12:00:15.41632 <info>  [1713960015.4158] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
2024-04-24_12:00:54.01456 <info>  [1713960054.0144] caught SIGTERM, shutting down normally.
2024-04-24_12:00:54.03942 <info>  [1713960054.0393] exiting (success)
2024-04-24_12:00:54.06995 <info>  [1713960054.0689] NetworkManager (version 1.46.0-2) is starting... (after a restart, boot:16fbcf18-558e-4e32-ad05-00a71c931038)
2024-04-24_12:00:54.06997 <info>  [1713960054.0696] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity.conf)
2024-04-24_12:00:54.07767 <info>  [1713960054.0775] manager[0x5f2d9aab2ea0]: monitoring kernel firmware directory '/lib/firmware'.
2024-04-24_12:00:54.07946 <info>  [1713960054.0793] hostname: hostname: couldn't get property from hostnamed
2024-04-24_12:00:54.07977 <info>  [1713960054.0796] hostname: static hostname changed from (none) to "raylenovo"
2024-04-24_12:00:54.08017 <info>  [1713960054.0800] dns-mgr: init: dns=default,systemd-resolved rc-manager=symlink
2024-04-24_12:00:54.08369 <info>  [1713960054.0836] rfkill2: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/ieee80211/phy0/rfkill2) (driver ath10k_pci)
2024-04-24_12:00:54.08411 <info>  [1713960054.0840] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/VPC2004:00/rfkill/rfkill0) (platform driver ideapad_acpi)
2024-04-24_12:00:54.08632 <info>  [1713960054.0862] manager[0x5f2d9aab2ea0]: rfkill: Wi-Fi hardware radio set disabled
2024-04-24_12:00:54.08635 <info>  [1713960054.0863] manager[0x5f2d9aab2ea0]: rfkill: WWAN hardware radio set enabled
2024-04-24_12:00:54.10095 <info>  [1713960054.1008] Loaded device plugin: NMTeamFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-team.so)
2024-04-24_12:00:54.10233 <info>  [1713960054.1022] Loaded device plugin: NMWwanFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-wwan.so)
2024-04-24_12:00:54.10260 <info>  [1713960054.1025] Loaded device plugin: NMOvsFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-ovs.so)
2024-04-24_12:00:54.10277 <info>  [1713960054.1027] Loaded device plugin: NMBluezManager (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-bluetooth.so)
2024-04-24_12:00:54.10308 <info>  [1713960054.1030] Loaded device plugin: NMWifiFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-wifi.so)
2024-04-24_12:00:54.10332 <info>  [1713960054.1032] Loaded device plugin: NMAtmManager (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-adsl.so)
2024-04-24_12:00:54.10357 <info>  [1713960054.1035] manager: rfkill: Wi-Fi disabled by radio killswitch; disabled by state file
2024-04-24_12:00:54.10360 <info>  [1713960054.1035] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
2024-04-24_12:00:54.10369 <info>  [1713960054.1036] manager: Networking is enabled by state file
2024-04-24_12:00:54.10386 <info>  [1713960054.1038] settings: Loaded settings plugin: keyfile (internal)
2024-04-24_12:00:54.10599 <info>  [1713960054.1059] dhcp: init: Using DHCP client 'internal'
2024-04-24_12:00:54.10624 <info>  [1713960054.1061] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
2024-04-24_12:00:54.10655 <info>  [1713960054.1065] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
2024-04-24_12:00:54.10685 <info>  [1713960054.1068] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
2024-04-24_12:00:54.10738 <info>  [1713960054.1073] device (lo): Activation: starting connection 'lo' (65bc7b9f-310c-4d2c-95a6-5638c8de6776)
2024-04-24_12:00:54.10773 <info>  [1713960054.1077] device (eth0): carrier: link connected
2024-04-24_12:00:54.10809 <info>  [1713960054.1080] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
2024-04-24_12:00:54.10836 <info>  [1713960054.1083] device (eth0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
2024-04-24_12:00:54.10897 <warn>  [1713960054.1089] device (eth0): connectivity: "/proc/sys/net/ipv4/conf/eth0/rp_filter" is set to "1". This might break connectivity checking for IPv4 on this device
2024-04-24_12:00:54.10930 <info>  [1713960054.1092] device (wlan0): driver supports Access Point (AP) mode
2024-04-24_12:00:54.10975 <info>  [1713960054.1096] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
2024-04-24_12:00:54.10994 <info>  [1713960054.1098] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
2024-04-24_12:00:54.11035 <info>  [1713960054.1103] device (wlan0): set-hw-addr: set MAC address to 86:F6:BC:07:B0:D7 (scanning)
2024-04-24_12:00:54.11054 <warn>  [1713960054.1104] device (wlan0): connectivity: "/proc/sys/net/ipv4/conf/wlan0/rp_filter" is set to "1". This might break connectivity checking for IPv4 on this device
2024-04-24_12:00:54.11152 <info>  [1713960054.1110] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
2024-04-24_12:00:54.11209 <info>  [1713960054.1120] ovsdb: disconnected from ovsdb
2024-04-24_12:00:54.11218 <info>  [1713960054.1121] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
2024-04-24_12:00:54.11241 <info>  [1713960054.1123] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
2024-04-24_12:00:54.11264 <info>  [1713960054.1125] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
2024-04-24_12:00:54.11299 <info>  [1713960054.1129] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
2024-04-24_12:00:54.11347 <info>  [1713960054.1133] device (eth0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:00:54.11391 <info>  [1713960054.1138] policy: auto-activating connection 'New 802-3-ethernet connection' (680fc38d-e5e3-472b-b9ba-707c31ec839a)
2024-04-24_12:00:54.11439 <info>  [1713960054.1141] device (eth0): Activation: starting connection 'New 802-3-ethernet connection' (680fc38d-e5e3-472b-b9ba-707c31ec839a)
2024-04-24_12:00:54.11440 <info>  [1713960054.1141] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:00:54.11440 <info>  [1713960054.1143] manager: NetworkManager state is now CONNECTING
2024-04-24_12:00:54.11457 <info>  [1713960054.1145] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:00:54.11499 <info>  [1713960054.1149] modem-manager: ModemManager available
2024-04-24_12:00:54.11511 <info>  [1713960054.1150] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:00:54.11542 <info>  [1713960054.1153] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
2024-04-24_12:00:54.11629 <info>  [1713960054.1162] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
2024-04-24_12:00:54.11649 <info>  [1713960054.1164] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
2024-04-24_12:00:54.11682 <info>  [1713960054.1167] device (lo): Activation: successful, device activated.
2024-04-24_12:00:54.13379 <info>  [1713960054.1337] agent-manager: agent[47dff110f6246646,:1.16/org.kde.plasma.networkmanagement/1000]: agent registered
2024-04-24_12:01:00.11657 <info>  [1713960060.1164] device (eth0): state change: ip-config -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed')
2024-04-24_12:01:00.13347 <info>  [1713960060.1333] dhcp4 (eth0): canceled DHCP transaction
2024-04-24_12:01:00.13351 <info>  [1713960060.1334] dhcp4 (eth0): state changed no lease
2024-04-24_12:01:00.13521 <info>  [1713960060.1351] manager: NetworkManager state is now DISCONNECTED
2024-04-24_12:01:00.13603 <info>  [1713960060.1354] manager: startup complete
2024-04-24_12:01:08.33038 <info>  [1713960068.3302] device (eth0): carrier: link connected
2024-04-24_12:01:08.33108 <info>  [1713960068.3306] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
2024-04-24_12:01:08.33145 <info>  [1713960068.3313] policy: auto-activating connection 'New 802-3-ethernet connection' (680fc38d-e5e3-472b-b9ba-707c31ec839a)
2024-04-24_12:01:08.33195 <info>  [1713960068.3318] device (eth0): Activation: starting connection 'New 802-3-ethernet connection' (680fc38d-e5e3-472b-b9ba-707c31ec839a)
2024-04-24_12:01:08.33243 <info>  [1713960068.3320] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:01:08.33245 <info>  [1713960068.3323] manager: NetworkManager state is now CONNECTING
2024-04-24_12:01:08.33373 <info>  [1713960068.3325] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:01:08.33375 <info>  [1713960068.3332] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
2024-04-24_12:01:08.33436 <info>  [1713960068.3340] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
2024-04-24_12:01:09.46239 <info>  [1713960069.4623] caught SIGTERM, shutting down normally.
2024-04-24_12:01:09.48657 <info>  [1713960069.4864] dhcp4 (eth0): canceled DHCP transaction
2024-04-24_12:01:09.48661 <info>  [1713960069.4865] dhcp4 (eth0): state changed no lease
2024-04-24_12:01:09.48710 <info>  [1713960069.4870] device (wlan0): state change: unavailable -> unmanaged (reason 'unmanaged', sys-iface-state: 'managed')
2024-04-24_12:01:09.48753 <info>  [1713960069.4874] device (wlan0): set-hw-addr: reset MAC address to F8:28:19:C2:F0:83 (unmanage)
2024-04-24_12:01:09.51186 <info>  [1713960069.5117] exiting (success)
2024-04-24_12:01:18.70979 <info>  [1713960078.7093] NetworkManager (version 1.46.0-2) is starting... (after a restart, boot:16fbcf18-558e-4e32-ad05-00a71c931038)
2024-04-24_12:01:18.70983 <info>  [1713960078.7098] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity.conf)
2024-04-24_12:01:18.71377 <info>  [1713960078.7137] manager[0x5f21ac611ea0]: monitoring kernel firmware directory '/lib/firmware'.
2024-04-24_12:01:18.71484 <info>  [1713960078.7148] hostname: hostname: couldn't get property from hostnamed
2024-04-24_12:01:18.71499 <info>  [1713960078.7149] hostname: static hostname changed from (none) to "raylenovo"
2024-04-24_12:01:18.71523 <info>  [1713960078.7152] dns-mgr: init: dns=default,systemd-resolved rc-manager=symlink
2024-04-24_12:01:18.71729 <info>  [1713960078.7172] rfkill2: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/ieee80211/phy0/rfkill2) (driver ath10k_pci)
2024-04-24_12:01:18.71753 <info>  [1713960078.7174] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/VPC2004:00/rfkill/rfkill0) (platform driver ideapad_acpi)
2024-04-24_12:01:18.71929 <info>  [1713960078.7192] manager[0x5f21ac611ea0]: rfkill: Wi-Fi hardware radio set disabled
2024-04-24_12:01:18.71931 <info>  [1713960078.7193] manager[0x5f21ac611ea0]: rfkill: WWAN hardware radio set enabled
2024-04-24_12:01:18.72880 <info>  [1713960078.7287] Loaded device plugin: NMTeamFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-team.so)
2024-04-24_12:01:18.72996 <info>  [1713960078.7299] Loaded device plugin: NMWwanFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-wwan.so)
2024-04-24_12:01:18.73016 <info>  [1713960078.7301] Loaded device plugin: NMOvsFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-ovs.so)
2024-04-24_12:01:18.73038 <info>  [1713960078.7303] Loaded device plugin: NMBluezManager (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-bluetooth.so)
2024-04-24_12:01:18.73057 <info>  [1713960078.7305] Loaded device plugin: NMWifiFactory (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-wifi.so)
2024-04-24_12:01:18.73074 <info>  [1713960078.7306] Loaded device plugin: NMAtmManager (/usr/lib/NetworkManager/1.46.0-2/libnm-device-plugin-adsl.so)
2024-04-24_12:01:18.73094 <info>  [1713960078.7308] manager: rfkill: Wi-Fi disabled by radio killswitch; disabled by state file
2024-04-24_12:01:18.73106 <info>  [1713960078.7310] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
2024-04-24_12:01:18.73109 <info>  [1713960078.7310] manager: Networking is enabled by state file
2024-04-24_12:01:18.73132 <info>  [1713960078.7312] settings: Loaded settings plugin: keyfile (internal)
2024-04-24_12:01:18.73347 <info>  [1713960078.7334] dhcp: init: Using DHCP client 'internal'
2024-04-24_12:01:18.73362 <info>  [1713960078.7335] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
2024-04-24_12:01:18.73408 <info>  [1713960078.7340] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
2024-04-24_12:01:18.73439 <info>  [1713960078.7343] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
2024-04-24_12:01:18.73492 <info>  [1713960078.7348] device (lo): Activation: starting connection 'lo' (65bc7b9f-310c-4d2c-95a6-5638c8de6776)
2024-04-24_12:01:18.73561 <info>  [1713960078.7355] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
2024-04-24_12:01:18.73603 <info>  [1713960078.7359] manager: (eth0): assume: will attempt to assume matching connection 'New 802-3-ethernet connection' (680fc38d-e5e3-472b-b9ba-707c31ec839a) (indicated)
2024-04-24_12:01:18.73604 <info>  [1713960078.7360] device (eth0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'assume')
2024-04-24_12:01:18.73633 <warn>  [1713960078.7362] device (eth0): connectivity: "/proc/sys/net/ipv4/conf/eth0/rp_filter" is set to "1". This might break connectivity checking for IPv4 on this device
2024-04-24_12:01:18.73644 <info>  [1713960078.7364] device (eth0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'assume')
2024-04-24_12:01:18.73703 <info>  [1713960078.7369] device (wlan0): driver supports Access Point (AP) mode
2024-04-24_12:01:18.73750 <info>  [1713960078.7374] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
2024-04-24_12:01:18.73775 <info>  [1713960078.7376] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
2024-04-24_12:01:18.73821 <info>  [1713960078.7381] device (wlan0): set-hw-addr: set MAC address to 06:84:47:03:A6:8B (scanning)
2024-04-24_12:01:18.73840 <warn>  [1713960078.7383] device (wlan0): connectivity: "/proc/sys/net/ipv4/conf/wlan0/rp_filter" is set to "1". This might break connectivity checking for IPv4 on this device
2024-04-24_12:01:18.73949 <info>  [1713960078.7389] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
2024-04-24_12:01:18.73991 <info>  [1713960078.7397] ovsdb: disconnected from ovsdb
2024-04-24_12:01:18.73991 <info>  [1713960078.7398] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
2024-04-24_12:01:18.74008 <info>  [1713960078.7400] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
2024-04-24_12:01:18.74023 <info>  [1713960078.7402] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
2024-04-24_12:01:18.74100 <info>  [1713960078.7406] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
2024-04-24_12:01:18.74159 <info>  [1713960078.7415] modem-manager: ModemManager available
2024-04-24_12:01:18.74206 <info>  [1713960078.7419] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
2024-04-24_12:01:18.74229 <info>  [1713960078.7422] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
2024-04-24_12:01:18.74259 <info>  [1713960078.7425] device (lo): Activation: successful, device activated.
2024-04-24_12:01:18.75866 <info>  [1713960078.7586] agent-manager: agent[4f199548e9843a33,:1.16/org.kde.plasma.networkmanagement/1000]: agent registered
2024-04-24_12:01:23.03745 <info>  [1713960083.0373] device (eth0): carrier: link connected
2024-04-24_12:01:23.03775 <info>  [1713960083.0376] device (eth0): Activation: starting connection 'New 802-3-ethernet connection' (680fc38d-e5e3-472b-b9ba-707c31ec839a)
2024-04-24_12:01:23.03818 <info>  [1713960083.0379] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'assume')
2024-04-24_12:01:23.03853 <info>  [1713960083.0383] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'assume')
2024-04-24_12:01:23.03889 <info>  [1713960083.0388] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'assume')
2024-04-24_12:01:23.03935 <info>  [1713960083.0392] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
2024-04-24_12:01:25.34007 <info>  [1713960085.3399] dhcp4 (eth0): state changed new lease, address=192.168.1.3, acd pending
2024-04-24_12:01:25.48988 <info>  [1713960085.4897] dhcp4 (eth0): state changed new lease, address=192.168.1.3
2024-04-24_12:01:25.49052 <info>  [1713960085.4904] policy: set 'New 802-3-ethernet connection' (eth0) as default for IPv4 routing and DNS
2024-04-24_12:01:25.52444 <info>  [1713960085.5242] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'assume')
2024-04-24_12:01:25.54216 <info>  [1713960085.5420] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'assume')
2024-04-24_12:01:25.54242 <info>  [1713960085.5423] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'assume')
2024-04-24_12:01:25.54331 <info>  [1713960085.5427] manager: NetworkManager state is now CONNECTED_SITE
2024-04-24_12:01:25.54334 <info>  [1713960085.5431] device (eth0): Activation: successful, device activated.
2024-04-24_12:01:25.54463 <info>  [1713960085.5441] manager: startup complete
2024-04-24_12:01:25.92804 <info>  [1713960085.9279] manager: NetworkManager state is now CONNECTED_GLOBAL
2024-04-24_12:01:27.49232 <info>  [1713960087.4921] dhcp6 (eth0): activation: beginning transaction (timeout in 45 seconds)
2024-04-24_12:01:27.49370 <info>  [1713960087.4932] policy: set 'New 802-3-ethernet connection' (eth0) as default for IPv6 routing and DNS
2024-04-24_12:01:27.50611 <info>  [1713960087.5060] dhcp6 (eth0): state changed new lease

With an active wired connection, below is the output of  ip addr add 192.168.1.3/24 broadcast 192.168.1.255 dev eth0   
Code: [Select]
Error: ipv4: Address already assigned.

With an active wired connection, below is the output of  ip a and ip r
Code: [Select]
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto kernel_lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 54:e1:ad:97:61:1d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 603966sec preferred_lft 603966sec
    inet6 2409:8a3c:4cd:b350:ed49:bc2a:b2cf:82bf/64 scope global dynamic noprefixroute
       valid_lft 259120sec preferred_lft 172720sec
    inet6 fe80::4bcf:cbef:e9f4:1aec/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 06:84:47:03:a6:8b brd ff:ff:ff:ff:ff:ff permaddr f8:28:19:c2:f0:83
default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.3 metric 100
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.3 metric 100

With an active wired connection, below is the output of ping 1.1.1.1
Code: [Select]
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=52 time=204 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=52 time=204 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=52 time=204 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=52 time=204 ms
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 203.725/203.759/203.779/0.021 ms

With an active wired connection, below is the output of ping artixlinux.org
Code: [Select]
ping artixlinux.org
PING artixlinux.org (2606:4700:3037::ac43:a957) 56 data bytes
64 bytes from 2606:4700:3037::ac43:a957: icmp_seq=1 ttl=52 time=202 ms
64 bytes from 2606:4700:3037::ac43:a957: icmp_seq=2 ttl=6 time=197 ms
64 bytes from 2606:4700:3037::ac43:a957: icmp_seq=3 ttl=52 time=204 ms
64 bytes from 2606:4700:3037::ac43:a957: icmp_seq=4 ttl=52 time=198 ms
^C
--- artixlinux.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 196.711/199.946/203.610/2.907 ms

After waking up from sleep with no wired connection, below is the output of  ip a and ip r
Code: [Select]
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto kernel_lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 54:e1:ad:97:61:1d brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f8:28:19:c2:f0:83 brd ff:ff:ff:ff:ff:ff

After waking up from sleep with no wired connection, below is the output of ping 1.1.1.1
Code: [Select]
ping: connect: Network is unreachable

After waking up from sleep with no wired connection, below is the output of  ping artixlinux.org
Code: [Select]
ping: artixlinux.org: Temporary failure in name resolution

Re: Wired connection keeps deactiviting after waking up from sleep

Reply #16
With an active wired connection, below is the output of  ip addr add 192.168.1.3/24 broadcast 192.168.1.255 dev eth0   
Code: [Select]
Error: ipv4: Address already assigned.
I did specifically say those commands were for bringing up eth0 and the internet without a current connection.

There's clearly an issue with networkmanager recovering from a suspend state and maybe, based on what you say, even a freshly booted system.

I'm not a fan of networkmanager and tend to avoid it anyway so can give little advice on that.
Bugs around suspend can be hard to debug.

As a workaround you can disable networkmanager and learn to start the network manually as I've explained how to do do.
Then test if the network still works after suspend with your manually started network. If it does reliably then you can create a script to start your network. You can create a service to do this automatically at boot .

You could try connman instead of networkmanager.

It could well be that this will be one of those thing that 'fixes itself' at some point due to package updates.

But if it was me the first thing I'd do is see if it happens with a manually started eth0

Re: Wired connection keeps deactiviting after waking up from sleep

Reply #17
Could you tell me why you avoid NetworkManager?
I'm going to ditch NetworkManager and use connman or other alternatives instead.
But the problems with switching to an alternative is that Artix wiki doesn't have a detailed entry on that.
While I can use wireless connection, my virtual machine in bridged mode sometimes cannot connect to the Internet if the host uses wirless connection.

Re: Wired connection keeps deactiviting after waking up from sleep

Reply #18
Could you tell me why you avoid NetworkManager?
Because it's overkill for my needs on my desktop and does strange things when I have tried it
One of my favourite things about openrc is netifrc
My network setup is just a few lines in /etc/conf.d/net and a couple of symlinks
Quote
config_eth0="null"
config_br0="192.168.1.111/24"
bridge_br0="eth0"
routes_br0="default via 192.168.1.1"
config_usb0=dhcp
And it would be simpler than that if I didn't want the bridge for VM's
Unfortunately netifrc is only available on openrc as AFAIK ?

But it's also important to me to be able to do it entirely manually as well. Both wired and wifi.
Because it can be useful and isn't that difficult. It just seems daunting.

Re: Wired connection keeps deactiviting after waking up from sleep

Reply #19
Personally,

For only wired connection, I would only use dhcpcd, Because it can do all your needs for wired connection, it also have no problem with assigning static ip if it's what you want.

For wifi network, I use both dhcpcd and iwd, because iwd do all my needs:

- automatically connect to an already registered wifi,
- connect to eduroam

The command to connect to a network is

Code: [Select]
$ iwctl
NetworkConfigurationEnabled: disabled
StateDirectory: /var/lib/iwd
Version: 2.17
[iwd]# station wlan0 connect <ESSID>

But it doesn't have a dhcp client integrated, so I need dhcpcd at the same time.

It's big strength is that it manage wifi interface to a hardware point, so you don't have any inconvenience regarding things you could have done before with the interface.


Before, I was using connman, but after months using it, I ended up being sick to have to restart my computer again and again, because it doesn't manage interface directly at the hardware, it also take control to absolutely all your interfaces, including the bridge you create for your vm by default 💀. Not only that, on my computer at least, it couldn't make my bluetooth work when bluetoothd had no problems.


Re: Wired connection keeps deactiviting after waking up from sleep

Reply #20
I hope I'm not asking too much. I was wondering whether you could tell me how to purge NetworkManager and install, set up dhcpcd and iwd. I think it's a daunting task for me. I desperately need someone who can walk me through this process for a smooth transition. Suppose that I'll stick with runit and want to use both wired and wireless connection. I'm deeply grateful for anyone who's willing to take the trouble to help me out

 

Re: Wired connection keeps deactiviting after waking up from sleep

Reply #21
I hope I'm not asking too much. I was wondering whether you could tell me how to purge NetworkManager and install, set up dhcpcd and iwd. I think it's a daunting task for me. I desperately need someone who can walk me through this process for a smooth transition. Suppose that I'll stick with runit and want to use both wired and wireless connection. I'm deeply grateful for anyone who's willing to take the trouble to help me out
I'd read this thread and the linked github issue
https://forum.artixlinux.org/index.php/topic,6763.0/topicseen.html
Sounds like it's elogind changes behind the networkmanager issue ?