Wired internet drops after unlocking the system
System details
AMD Ryzen 5 3400GE, Radeon RX 6500 XT - Omarchy v3.0.1
What's wrong?
When the system goes to the lock screen, sometimes the internet disconnects after I unlock it. I’m using a wired (Ethernet) connection, so I don’t know if this also happens with Wi-Fi.
Can you share your network hardware as well as the journalctl log as well after the system comes out of lock?
I've personally never experienced this issue and these are my network cards:
(using sudo lspci | grep -Ei 'eth|network|ethernet|wireless|wifi'):
05:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a) 06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 04)
ps: I should add, I always use the wired/Ethernet connection on my PC, haven't tested Wi-Fi
I can confirm this, more often a restart need after a good suspend time for wifi to reconnect... 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10) 02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
@GyHUN95 does the Intel Wireless at least wake up in your journalctl logs? (don't know if there is such a thing, but on my end, I can see Bluetooth waking up)
Also have you tried the Wi-Fi restart in the menu? Update -> Hardware -> Wi-Fi
Similar issue, but I never experienced what you're describing.
Suspending the system and turning it back on drops the internet connection on ethernet. Disconnecting and reconnecting the cable fixes it. I also use a switch so it could be that.
0c:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05) 0d:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter
@Ancez Very strange, I've never had this issue before Did the system also go in suspend or even hybernate? Or just locking is enough for ethernet to go weird?
Also what Omarchy version do you use and other details about your system?
@Ancez Very strange, I've never had this issue before Did the system also go in suspend or even hybernate? Or just locking is enough for ethernet to go weird?
Also what Omarchy version do you use and other details about your system?
Thanks @naxels, here are my specs:
This has been happening on previous Omarchy versions. I updated everything just now and was able to reproduce after Suspending the system for 1 min 🤔
Update: I created a fix, will PR shortly
Here's the PR: https://github.com/basecamp/omarchy/pull/3789
Aaah, I thought the issue was about lock, not about suspend/sleep/hybernate! That makes a lot more sense
I've got the same controller and issue but its intermittent for me, happens more often than not though.
● 2: enp7s0
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/20-ethernet.network
State: routable (configured)
Online state: online
Type: ether
Path: pci-0000:07:00.0
Driver: r8169
Vendor: Realtek Semiconductor Co., Ltd.
Model: RTL8125 2.5GbE Controller
Alternative Names: enxf02f74b074d7
Hardware Address: f0:2f:74:b0:74:d7 (ASUSTek COMPUTER INC.)
MTU: 1500 (min: 68, max: 16362)
QDisc: fq_codel
IPv6 Address Generation Mode: eui64
Number of Queues (Tx/Rx): 1/1
Auto negotiation: yes
Speed: 1Gbps
Duplex: full
Port: tp
Address: 192.168.1.217 (DHCPv4 via 192.168.1.1)
fd9c:8b2e:f3a1:1:f22f:74ff:feb0:74d7
fe80::f22f:74ff:feb0:74d7
Gateway: 192.168.1.1
fe80::dab3:70ff:fe46:717a
DNS: 192.168.1.1
Activation Policy: up
Required For Online: yes
DHCPv4 Client ID: IAID:0x7b31fe60/DUID
DHCPv6 Client DUID: DUID-EN/Vendor:0000ab11a6d02bb3ab128778
Connected To: USW-Pro-48-PoE (USW-Pro-48-PoE, 7.2.123.16565, Linux 3.6.5) on port Port 21 (Port 21)
here's the systemd-networkd logs after resume from suspend
Dec 08 10:34:53 jake-desktop systemd-networkd[15685]: enp7s0: Lost carrier
Dec 08 10:34:53 jake-desktop systemd-networkd[15685]: enp7s0: DHCP lease lost
Dec 08 10:34:54 jake-desktop systemd-networkd[15685]: enp7s0: Gained carrier
Dec 08 10:34:54 jake-desktop systemd-networkd[15685]: enp7s0: DHCPv4 address 192.168.1.217/24, gateway 192.168.1.1 acquired from 192.168>
Dec 08 10:34:54 jake-desktop systemd-networkd[15685]: enp7s0: Reconfiguring with /etc/systemd/network/20-ethernet.network.
Dec 08 10:34:54 jake-desktop systemd-networkd[15685]: wlan0: Reconfiguring with /etc/systemd/network/20-wlan.network.
the state of the adapter is identical post resume but i did notice that all of my routes were missing
~ ❯ ip route
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
adding them back manually
~ ✗ sudo ip route add 192.168.1.0/24 dev enp7s0
~ ❯ sudo ip route add default via 192.168.1.1 dev enp7s0
also solves the problem, i wonder if there's a race condition in systemd-networkd and its stripping all of the routes for that adapter in response to the carrier loss after it brings it back up
again waking up from suspend
~ ❯ ip monitor route
Deleted default nhid 3166311604 via fe80::dab3:70ff:fe46:717a dev enp7s0 proto ra metric 100 pref high
Deleted 192.168.1.1 dev enp7s0 proto dhcp scope link src 192.168.1.217 metric 100
Deleted default via 192.168.1.1 dev enp7s0 proto dhcp src 192.168.1.217 metric 100
Deleted 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.217 metric 100
Deleted broadcast 192.168.1.255 dev enp7s0 table local proto kernel scope link src 192.168.1.217
Deleted local 192.168.1.217 dev enp7s0 table local proto kernel scope host src 192.168.1.217
Deleted fd9c:8b2e:f3a1:1::/64 dev enp7s0 proto ra metric 100 pref high
Deleted local fd9c:8b2e:f3a1:1:f22f:74ff:feb0:74d7 dev enp7s0 table local proto kernel metric 0 pref medium
local 192.168.1.217 dev enp7s0 table local proto kernel scope host src 192.168.1.217
broadcast 192.168.1.255 dev enp7s0 table local proto kernel scope link src 192.168.1.217
192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.217 metric 100
192.168.1.1 dev enp7s0 proto dhcp scope link src 192.168.1.217 metric 100
default via 192.168.1.1 dev enp7s0 proto dhcp src 192.168.1.217 metric 100
Deleted 192.168.1.1 dev enp7s0 proto dhcp scope link src 192.168.1.217 metric 100
Deleted default via 192.168.1.1 dev enp7s0 proto dhcp src 192.168.1.217 metric 100
fd9c:8b2e:f3a1:1::/64 dev enp7s0 proto ra metric 100 expires 86400sec pref high
default nhid 3166311604 via fe80::dab3:70ff:fe46:717a dev enp7s0 proto ra metric 100 expires 1800sec pref high
local fd9c:8b2e:f3a1:1:f22f:74ff:feb0:74d7 dev enp7s0 table local proto kernel metric 0 pref medium
There are 99 ways to solve this.
Best route: Use SUPER+ALT+SPACE ➡️ Setup ➡️ DNS ➡️ DHCP
- This appears to be working for me after removing the workaround script 🤷
Alternatives/Useful info:
- https://www.google.com/search?q=systemd-networkd+arch+suspend+routes&oq=systemd-networkd+arch+suspend+routes&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTEwMjQ3ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8
- https://www.reddit.com/r/hyprland/comments/16xzvb8/network_manager_options/
- https://www.reddit.com/r/archlinux/comments/a8wgsk/systemdresolved/
Actually, no... This is way outside my expertise haha.
What I said above only restarts systemd-networkd so nvm (restart does 'fix it').
- https://github.com/basecamp/omarchy/blob/master/bin/omarchy-setup-dns
Research
Apparently, NetworkManager "just works" for people, so that's a potential alternative.
Below seems related. Creating the symlink manually, suspending, and trying to access the internet works. Apparently it doesn't persist so users might need to rerun it after every shutdown? I don't know about arch-chroot enough yet to tell.
- 2.1. here https://wiki.archlinux.org/title/Systemd-resolved is interesting, especially the Note.
sudo ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Could it be related to the ISO not preserving symlinks correctly?
AI Slop
Filesystem Compatibility: The primary challenge occurs when the ISO content is extracted to a filesystem that does not support symlinks, such as FAT32 (commonly used for bootable USB drives). In such cases, the symlinks will either be lost, ignored, or treated as invalid files, causing potential errors. Using methods like dd to write the ISO as a disk image to the USB drive, instead of just copying the files, bypasses this limitation because it writes the entire filesystem structure, including the Rock Ridge metadata.
- I think not as Balena Etcher uses DD, right? Nope they use their own algo. Maybe that's it? 🤷♂️
Seems related to #1110, #1072, #2925.
Running resolvectl status with internet and after suspending no internet, DNS Server not restored. Restarting networkd leaves DNS Server as 192.168.1.1 and internet comes back up.
~ ❯ resolvectl status
Global
Protocols: +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Current DNS Server: 9.9.9.9#dns.quad9.net
Fallback DNS Servers: 9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 8.8.8.8#dns.google
2001:4860:4860::8888#dns.google
Link 2 (eno1)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: fe80::22b0:1ff:fe95:2de6
DNS Servers: 192.168.1.1 fe80::22b0:1ff:fe95:2de6
Default Route: yes
Link 3 (docker0)
Current Scopes: LLMNR/IPv4 LLMNR/IPv6
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Default Route: no
Link 5 (wlan0)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Default Route: no
Link 6 (veth86fe6b6)
Current Scopes: LLMNR/IPv6
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Default Route: no
~ ❯ resolvectl status
Global
Protocols: +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Current DNS Server: 9.9.9.9#dns.quad9.net
Fallback DNS Servers: 9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 8.8.8.8#dns.google
2001:4860:4860::8888#dns.google
Link 2 (eno1)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1 fe80::22b0:1ff:fe95:2de6
Default Route: yes
Link 3 (docker0)
Current Scopes: LLMNR/IPv4 LLMNR/IPv6
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Default Route: no
Link 5 (wlan0)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Default Route: no
Link 6 (veth86fe6b6)
Current Scopes: LLMNR/IPv6
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Default Route: no
Edit
Running sudo ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf fixes it after restart but doesn't persist.
seems to be resolved in 3.3.1