You are not logged in.
I'm struggling with super flaky networking lately and I don't know what the cause is.
What happens usually after the following is one of 3 things:
- I boot without any networks available, iwd doesn't seem to be able to connect to anything (20% of the time)
- I boot with network, but after couple of minutes my network disappears and iwd doesn't seem to be able to connect to anything (75% of the time)
- I boot with network and am graced with everything working until I either reboot or sometimes it stops even after suspend (5% of the time)
At first I thought it's a kernel thing as it happened roughly when this came out https://bbs.archlinux.org/viewtopic.php?id=304957
But since then, there were couple of versions bumped and I also noticed `linux-firmware` being bumped so I'm starting to suspect it's something else. Now I'd like to really understand the root cause, as my laptop is almost unusable (I have to spend hours just restarting it to be graced with that one time when everything works)
Don't know what's relevant, but I'm using systemd-networkd with iwd and I'm on `6.14.6-arch1-1` kernel. My laptop is Thinkpad T14G5 AMD with following wifi chip
-> lspci -k | grep -A3 -i network
pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted
02:00.0 Network controller: Qualcomm Technologies, Inc QCNFA765 Wireless Network Adapter (rev 01)
Subsystem: Lenovo Device 9309
Kernel driver in use: ath11k_pci
Kernel modules: ath11k_pci
Anyone has any ideas what this could be about?
Last edited by ollosh (2025-05-15 21:06:09)
Offline
https://bbs.archlinux.org/viewtopic.php?id=304957 is iwlwifi, the most recent ath11k issue was https://bbs.archlinux.org/viewtopic.php?id=304904 but that's supposed to be fixed.
https://wiki.archlinux.org/title/Iwd#Re … after_boot but that doesn't explain the runtime losses.
Please post your complete system journal for the boot:
sudo journalctl -b | curl -F 'file=@-' 0x0.st
after you lost the wifi.
You can also access older boots (… -b -δ … - eg δ = 1 is the previous boot)
Offline
Had a boot running for a while and on May 19th at 19:13 I closed the lid and opened it back at 19:47 and was met with no network again so logs from then should be useful http://0x0.st/8wbI.txt
Offline
May 17 16:18:16 makina systemd-logind[662]: Lid opened.
May 17 16:18:16 makina iwd[779]: Received Deauthentication event, reason: 3, from_ap: false
May 17 16:18:16 makina iwd[779]: event: disconnect-info, reason: 3
May 17 16:18:16 makina systemd-networkd[706]: wlan0: DHCP lease lost
May 17 16:18:16 makina systemd-networkd[706]: wlan0: Lost carrier
May 17 16:18:16 makina systemd-timesyncd[478]: No network connectivity, watching for changes.
====
May 19 18:26:15 makina systemd-logind[662]: Lid opened.
May 19 18:26:15 makina rtkit-daemon[1130]: The canary thread is apparently starving. Taking action.
May 19 18:26:15 makina iwd[779]: Received Deauthentication event, reason: 3, from_ap: false
May 19 18:26:15 makina iwd[779]: event: disconnect-info, reason: 3
May 19 18:26:15 makina systemd-networkd[706]: wlan0: DHCP lease lost
May 19 18:26:15 makina rtkit-daemon[1130]: Demoting known real-time threads.
May 19 18:26:15 makina systemd-resolved[477]: Clock change detected. Flushing caches.
May 19 18:26:15 makina rtkit-daemon[1130]: Successfully demoted thread 1135 of process 1120.
May 19 18:26:15 makina systemd-networkd[706]: wlan0: Lost carrier
May 19 18:26:15 makina rtkit-daemon[1130]: Successfully demoted thread 1120 of process 1120.
May 19 18:26:15 makina systemd-timesyncd[478]: No network connectivity, watching for changes.
====
May 19 19:47:24 makina systemd-logind[662]: Lid opened.
May 19 19:47:24 makina rtkit-daemon[1130]: The canary thread is apparently starving. Taking action.
May 19 19:47:24 makina iwd[779]: Received Deauthentication event, reason: 3, from_ap: false
May 19 19:47:24 makina iwd[779]: event: disconnect-info, reason: 3
May 19 19:47:24 makina systemd-networkd[706]: wlan0: Lost carrier
May 19 19:47:24 makina rtkit-daemon[1130]: Demoting known real-time threads.
May 19 19:47:24 makina systemd-timesyncd[478]: No network connectivity, watching for changes.
…
May 19 19:47:24 makina systemd[1]: Stopped target Suspend.
…
May 19 19:47:24 makina monitor-hotplug-new[515247]: /bin/sh: line 1: /home/ollosh/.bin/monitor-hotplug-env: No such file or directory
May 19 19:47:24 makina systemd[1104]: Started Run monitor hotplugging script in charge of the monitor layout setup.
…
May 19 19:47:24 makina su[515195]: pam_unix(su:session): session closed for user ollosh
…
May 19 19:47:24 makina su[515275]: pam_unix(su:session): session opened for user ollosh(uid=1000) by (uid=0)
…
May 19 19:47:24 makina systemd[1104]: Stopped target Xsession running.
May 19 19:47:24 makina systemd[1104]: Stopping Xsession running...
…
May 19 19:47:24 makina iwd[779]: event: state, old: autoconnect_quick, new: autoconnect_full
May 19 19:47:24 makina xsettingsd[515348]: xsettingsd: Created window 0xa00001 on screen 0 with timestamp 12048178
May 19 19:47:24 makina sh[515347]: MESSAGE: Using legacy offset syntax NxN, you should switch to the new syntax (N, N)
May 19 19:47:24 makina xsettingsd[515348]: xsettingsd: Selection _XSETTINGS_S0 is owned by 0x0
May 19 19:47:24 makina xsettingsd[515348]: xsettingsd: Took ownership of selection _XSETTINGS_S0
May 19 19:47:25 makina systemd[1104]: Started Runs a dunst service.
May 19 19:47:25 makina i3d[515359]: [{"success":true}]
May 19 19:47:25 makina systemd[1104]: Started A tiling window manager.
May 19 19:47:25 makina systemd[1104]: Starting Run polybar status bar...
May 19 19:47:25 makina launch.sh[515378]: xrandr is /usr/bin/xrandr
May 19 19:47:25 makina systemd[1104]: Started Run polybar status bar.
May 19 19:47:25 makina systemd[1104]: Reached target Theme dependencies.
May 19 19:47:27 makina systemd-networkd[706]: wlan0: DHCP lease lost
Are you somehow restarting the session when resuming from suspend??
Offline
If I'm following it might be just that the naming convention of my systemd services is unintuitive.
I have a user xsession.target with following dependencies
[Unit]
Description = Xsession running
BindsTo = graphical-session.target
Wants = theme.target
Wants = monitor-hotplug.service
Wants = picom.service
Wants = geoclue.service
Wants = battery-notifier.timer
I might be wrong, but my assumption is that on suspend graphical-session.target gets restarted which triggers this chain of dependencies to restart. I do have this weird glitch when waking up from suspension where slock takes a second to load with background changing, but never bothered to explore it. Do you think that could affect the network? I think it's unlikely since it's really flaky and doesn't seem to be connected with suspension
Offline
my assumption is that on suspend graphical-session.target gets restarted
That should not happen - do you loose all your open windows etc. when returning from the suspend?
Do you think that could affect the network?
It's stepping in the way of the network restart is the glaring difference between the good wakes and the bad wake and looks™ totally wrong - could be a race condition, could be coincidence.
https://wiki.archlinux.org/title/Xinit# … X_at_login
Use the normal, sane setup w/ xinit and an xinitrc, not systemd for this - see whether this causes any changes.
Seeing all that stuff restarting doesn't feel right - it feels like trouble…
Offline
That should not happen - do you loose all your open windows etc. when returning from the suspend?
I don't. Everything is as when laptop went to suspend and all windows are left open
I have too many things configured to work as user systemd services now that it would be too much of an effort to disentangle as there are some intricate dependencies. I didn't change anything major there for couple of years now and if the issue was with the systemd services, I don't think it explains this all of a sudden network loss after boot (without suspension).
I'll try to get some logs from the boot without the suspend
Offline
The network restarts on every resume from suspend.
May 19 19:47:24 makina kernel: wlan0: deauthenticating from 4c:9e:ff:fc:f9:cd by local choice (Reason: 3=DEAUTH_LEAVING)
May 19 19:47:24 makina systemd-networkd[706]: wlan0: Lost carrier
May 19 19:47:24 makina iwd[779]: resolve-systemd: Failed to modify the DNS entries. org.freedesktop.resolve1.LinkBusy: Link wlan0 is managed.
May 19 19:47:24 makina systemd-networkd[706]: wlan0: Reconfiguring with /etc/systemd/network/25-wireless.network.
May 19 19:47:27 makina systemd-networkd[706]: wlan0: DHCP lease lost
Do you have https://wiki.archlinux.org/title/Iwd#En … figuration enabled?
Offline
Yeah that's a bit strange.
-> cat -p /etc/iwd/main.conf
[General]
EnableNetworkConfiguration=true
I do know that I did invest quite a lot of time configuring iwd to make sure my dns configuration is used (no matter which wifi I connect to) since until that point I had mixed results whenever connecting to different routers.
This is what I did:
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
----------------------------------------------------------------
sudo vim /etc/systemd/resolved.conf.d/dns_servers.conf
[Resolve]
DNS=8.8.8.8 1.1.1.1 # google main and cloudflare main
FallbackDNS=8.8.4.4 9.9.9.9 # google fallback and Quad9 secure dns
----------------------------------------------------------------
sudo vim /etc/systemd/network/25-wireless.network
[Match]
Name=wl*
[Network]
DHCP=yes
IgnoreCarrierLoss=3s
DNS=8.8.8.8 1.1.1.1 # google main and cloudflare main
DNS=2001:4860:4860::8888 2606:4700:4700::1111 # google main ipv6 and cloudflare main ipv6
IPv6AcceptRA=no # important to completely prevent ipv6 RA from the router
[DHCP]
UseDNS=false
Offline
Disable that - You're effectively running two network managers competing for the NIC.
See whether this stabilizes the network (don't forget to restart iwd, maybe even better reboot (cold, ie. power off and on) - network devices can be peculiar w/ their state)
Offline