You are not logged in.

#1 2025-01-01 08:16:37

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

[Resolves] High ping spikes with NetworkManager + iwd on wifi

Hello, I'm running Arch Linux with KDE Plasma.
When I run

ping 192.168.100.1

I get the following:

PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=1.94 ms
64 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=4.18 ms
64 bytes from 192.168.100.1: icmp_seq=3 ttl=64 time=1.98 ms
64 bytes from 192.168.100.1: icmp_seq=4 ttl=64 time=21.4 ms
64 bytes from 192.168.100.1: icmp_seq=5 ttl=64 time=1.92 ms
64 bytes from 192.168.100.1: icmp_seq=6 ttl=64 time=102 ms
64 bytes from 192.168.100.1: icmp_seq=7 ttl=64 time=1.18 ms
64 bytes from 192.168.100.1: icmp_seq=8 ttl=64 time=16.8 ms
64 bytes from 192.168.100.1: icmp_seq=9 ttl=64 time=2.72 ms
64 bytes from 192.168.100.1: icmp_seq=10 ttl=64 time=1.02 ms
64 bytes from 192.168.100.1: icmp_seq=11 ttl=64 time=1.74 ms
64 bytes from 192.168.100.1: icmp_seq=12 ttl=64 time=1.71 ms
64 bytes from 192.168.100.1: icmp_seq=13 ttl=64 time=1.67 ms
64 bytes from 192.168.100.1: icmp_seq=14 ttl=64 time=1.66 ms
64 bytes from 192.168.100.1: icmp_seq=15 ttl=64 time=1.67 ms
64 bytes from 192.168.100.1: icmp_seq=16 ttl=64 time=1.89 ms
64 bytes from 192.168.100.1: icmp_seq=17 ttl=64 time=2.09 ms
64 bytes from 192.168.100.1: icmp_seq=18 ttl=64 time=1.61 ms
64 bytes from 192.168.100.1: icmp_seq=19 ttl=64 time=3.18 ms
64 bytes from 192.168.100.1: icmp_seq=20 ttl=64 time=1.60 ms
64 bytes from 192.168.100.1: icmp_seq=21 ttl=64 time=84.6 ms 

There are a lot of ping spikes on LAN, which is weird.
I have tried:
- Turning off Powersaving mode in NetworkManager/iw
- Reinstalling the system, using the default NetworkManager configuration
The issue does not persist on Windows (No Dual-booting)

Relevant outputs:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
deepcool-ak-series-digital-restart.service | suspend.target.wants
deepcool-ak-series-digital.service       | default.target.wants
display-manager.service                  | system
getty@tty1.service                       | getty.target.wants
iwd.service                              | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
openrgb-resume.service                   | suspend.target.wants
openrgb.service                          | default.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire-pulse.socket                    | sockets.target.wants
pipewire-session-manager.service         | user
pipewire.socket                          | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
syncthing@nguyen.service                 | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants
systemd-userdbd.socket                   | sockets.target.wants
wireplumber.service                      | pipewire.service.wants
xdg-user-dirs-update.service             | default.target.wants
lspci -v
09:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8852CE PCIe 802.11ax Wireless Network Controller (rev 01)
	Subsystem: Realtek Semiconductor Co., Ltd. RTL8852CE PCIe 802.11ax Wireless Network Controller
	Flags: bus master, fast devsel, latency 0, IRQ 107, IOMMU group 20
	I/O ports at d000 [size=256]
	Memory at f6a00000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: rtw89_8852ce
	Kernel modules: rtw89_8852ce

Last edited by TheSilverFoxes (2025-01-05 10:37:27)

Offline

#2 2025-01-01 11:12:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

First off all, disable the iwd.service, see https://wiki.archlinux.org/title/Networ … Fi_backend and then report back - because

using the default NetworkManager configuration

means right now wpa_supplicant and iwd will stumble over each other.

Offline

#3 2025-01-01 11:20:01

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

I have that NIC; it works really well with just IWD and nothing else. NM is just a bunch of bugs waiting to happen.


Jin, Jîyan, Azadî

Offline

#4 2025-01-01 11:39:40

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

seth wrote:

First off all, disable the iwd.service, see https://wiki.archlinux.org/title/Networ … Fi_backend and then report back - because

using the default NetworkManager configuration

means right now wpa_supplicant and iwd will stumble over each other.

I did it, seems to have helped a bit but didn't solve the problem

ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=2.96 ms
64 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=1.80 ms
64 bytes from 192.168.100.1: icmp_seq=3 ttl=64 time=10.9 ms
64 bytes from 192.168.100.1: icmp_seq=4 ttl=64 time=1.64 ms
64 bytes from 192.168.100.1: icmp_seq=5 ttl=64 time=2.76 ms
64 bytes from 192.168.100.1: icmp_seq=6 ttl=64 time=1.76 ms
64 bytes from 192.168.100.1: icmp_seq=7 ttl=64 time=1.86 ms
64 bytes from 192.168.100.1: icmp_seq=8 ttl=64 time=1.46 ms
64 bytes from 192.168.100.1: icmp_seq=9 ttl=64 time=5.53 ms
64 bytes from 192.168.100.1: icmp_seq=10 ttl=64 time=2.13 ms
64 bytes from 192.168.100.1: icmp_seq=11 ttl=64 time=1.64 ms
64 bytes from 192.168.100.1: icmp_seq=12 ttl=64 time=0.806 ms
64 bytes from 192.168.100.1: icmp_seq=13 ttl=64 time=3.88 ms
64 bytes from 192.168.100.1: icmp_seq=14 ttl=64 time=1.77 ms
64 bytes from 192.168.100.1: icmp_seq=15 ttl=64 time=62.8 ms
64 bytes from 192.168.100.1: icmp_seq=16 ttl=64 time=20.6 ms
64 bytes from 192.168.100.1: icmp_seq=17 ttl=64 time=2.69 ms
64 bytes from 192.168.100.1: icmp_seq=18 ttl=64 time=20.7 ms

Last edited by TheSilverFoxes (2025-01-01 12:24:39)

Offline

#5 2025-01-01 11:41:24

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Head_on_a_Stick wrote:

I have that NIC; it works really well with just IWD and nothing else. NM is just a bunch of bugs waiting to happen.

Thanks for the reply!
It's actually my Gigabyte B650 board wink
Also, if I only use iwd will there be any drawbacks (again, on KDE Plasma)
And if there isn't, how so?

Offline

#6 2025-01-01 11:42:37

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

NM can be a useful convenience for things like proxies & VPNs but for simple wireless connections IWD does all you need with far less code.


Jin, Jîyan, Azadî

Offline

#7 2025-01-01 11:47:56

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Head_on_a_Stick wrote:

NM can be a useful convenience for things like proxies & VPNs but for simple wireless connections IWD does all you need with far less code.

That's a dealbreaker for me since I use a lot of VPNs/proxies to bypass censorship.
I'm curious though, will I be able to change settings in KDE Settings with iwd since now NM is not the frontend?

Offline

#8 2025-01-01 12:08:39

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

I don't think Plasma offers any integration with iwd/iwctl. I know GNOME doesn't.


Jin, Jîyan, Azadî

Offline

#9 2025-01-01 13:15:05

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Head_on_a_Stick wrote:

I don't think Plasma offers any integration with iwd/iwctl. I know GNOME doesn't.

Well that sucks, but any idea on how to make NM cooperate?

Offline

#10 2025-01-01 13:27:57

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Not really, sorry. I was wrong about my NIC (it's a BE) but try the rtw89* module options, that has some powersaving stuff that might be relevant.

I'm not in Linux atm so use the modinfo's -p option to list the module parameters.


Jin, Jîyan, Azadî

Offline

#11 2025-01-01 15:40:11

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Head_on_a_Stick wrote:

Not really, sorry. I was wrong about my NIC (it's a BE) but try the rtw89* module options, that has some powersaving stuff that might be relevant.

I'm not in Linux atm so use the modinfo's -p option to list the module parameters.

I don't know, since I have already disabled power saving (?) tongue

Offline

#12 2025-01-01 15:58:25

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Module power management options are distinct from iwconfig's conception. I'm pretty sure NM's setting is just a frontend for that command, but I could be wrong. Check sysfs for the current module parameters.

Last edited by Head_on_a_Stick (2025-01-01 16:05:15)


Jin, Jîyan, Azadî

Offline

#13 2025-01-01 16:04:54

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Head_on_a_Stick wrote:

Not really, sorry. I was wrong about my NIC (it's a BE) but try the rtw89* module options, that has some powersaving stuff that might be relevant.

I'm not in Linux atm so use the modinfo's -p option to list the module parameters.

Running

modinfo rtw89_8852ce -p

shows no info (so no parameters?)
And also I have no idea how sysfs works, can you help me?

Last edited by TheSilverFoxes (2025-01-01 16:05:05)

Offline

#14 2025-01-01 16:06:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

after experiencing such spikes.
Also test adding

rtw89_pci.disable_aspm_l1=Y rtw89_pci.disable_aspm_l1ss=Y

and possibly

rtw89_pci.disable_clkreq=Y pcie_aspm=off

to the https://wiki.archlinux.org/title/Kernel_parameters

Offline

#15 2025-01-01 16:07:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

I think the options are for rtw89_pci, or maybe rtw89_core. Or both.

Check /sys/modules/rtw89* (or so, the drivers might be under another directory). I like to use https://archlinux.org/packages/extra/any/ranger/ to navigate sysfs because it shows the file values in the preview pane.

EDIT: thanks seth.


Jin, Jîyan, Azadî

Offline

#16 2025-01-01 16:33:46

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

seth wrote:

Also test adding

rtw89_pci.disable_aspm_l1=Y rtw89_pci.disable_aspm_l1ss=Y

and possibly

rtw89_pci.disable_clkreq=Y pcie_aspm=off

to the https://wiki.archlinux.org/title/Kernel_parameters

Here's the journal: https://0x0.st/8z8k.txt
The ping seems to spike after network usage?
This is with the parameters.

Last edited by TheSilverFoxes (2025-01-01 16:50:10)

Offline

#17 2025-01-01 17:26:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

The journal is only 2 minutes, it already covers those latency spikes?
30s before you dumped the journal, iwd went roam-scanning, does that overlap w/ the latency spike?
Have you tried to disable syncthing to make sure this isn't just sideload driven?

There's no collision, no recorded connectio loss, no driver/firmware errors.

Offline

#18 2025-01-02 10:35:30

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

seth wrote:

30s before you dumped the journal, iwd went roam-scanning, does that overlap w/ the latency spike?
Have you tried to disable syncthing to make sure this isn't just sideload driven?
There's no collision, no recorded connection loss, no driver/firmware errors.

https://0x0.st/8zQ2.txt
New log here, taken a few moments after ping spike and yes, it does seem to overlap with the roam-scan
I will try to disable syncthing and report back
Also my wifi seems to disconnect and reconnect after a bit now for some reason.

EDIT:
I have noticed that the signal strength varies by a lot (in the KDE Tray menu), and when it does change it fluctuates the ping?
Also disabling Syncthing doesn't help

Last edited by TheSilverFoxes (2025-01-02 13:53:30)

Offline

#19 2025-01-02 14:04:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Jan 02 17:32:08 blackpc kernel: wlan0: associate with fc:57:03:f0:a9:ed (try 1/3)
Jan 02 17:32:08 blackpc kernel: wlan0: associate with fc:57:03:f0:a9:ed (try 2/3)
Jan 02 17:32:08 blackpc kernel: wlan0: associate with fc:57:03:f0:a9:ed (try 3/3)
Jan 02 17:32:08 blackpc kernel: wlan0: association with fc:57:03:f0:a9:ed timed out
…
Jan 02 17:32:12 blackpc kernel: wlan0: send auth to fc:57:03:f0:a9:ec (try 2/3)
Jan 02 17:32:12 blackpc kernel: wlan0: authenticated
Jan 02 17:32:12 blackpc kernel: wlan0: associate with fc:57:03:f0:a9:ec (try 1/3)
Jan 02 17:32:13 blackpc kernel: wlan0: RX AssocResp from fc:57:03:f0:a9:ec (capab=0x1431 status=0 aid=18)
Jan 02 17:32:13 blackpc kernel: wlan0: associated
Jan 02 17:31:27 blackpc iwd[676]: event: connect-info, ssid: Minh Khue, bss: fc:57:03:f0:a9:ed, signal: -46, load: 12/255
Jan 02 17:32:08 blackpc iwd[676]: event: connect-info, ssid: Minh Khue, bss: fc:57:03:f0:a9:ed, signal: -46, load: 27/255
Jan 02 17:32:12 blackpc iwd[676]: event: connect-info, ssid: Minh Khue, bss: fc:57:03:f0:a9:ec, signal: -35, load: 28/255

Signal looks good, though.
Still try to lock the BSSID, https://wiki.archlinux.org/title/Networ … ts_(Wi-Fi) - there're at least two (possibly 2.4GHz and 5GHz?)

Offline

#20 2025-01-02 14:31:33

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

seth wrote:

Signal looks good, though.
Still try to lock the BSSID, https://wiki.archlinux.org/title/Networ … ts_(Wi-Fi) - there're at least two (possibly 2.4GHz and 5GHz?)

Yes, they are advertised with the same name.

Jan 02 21:27:45 blackpc iwd[679]: event: connect-info, ssid: Minh Khue, bss: fc:57:03:f0:a9:ed, signal: -45, load: 23/255
Jan 02 21:27:45 blackpc iwd[679]: event: state, old: autoconnect_full, new: connecting (auto)
Jan 02 21:27:46 blackpc kernel: wlan0: authenticate with fc:57:03:f0:a9:ed (local address=bc:c7:46:a5:3f:eb)
Jan 02 21:27:46 blackpc kernel: wlan0: send auth to fc:57:03:f0:a9:ed (try 1/3)
Jan 02 21:27:46 blackpc NetworkManager[622]: <info>  [1735828066.1393] device (wlan0): new IWD device state is connecting
Jan 02 21:27:46 blackpc NetworkManager[622]: <info>  [1735828066.1399] device (wlan0): Activation: starting connection 'Minh Khue' (77d5b6cf-ca05-421a-9c86-844bd22df392)
Jan 02 21:27:46 blackpc NetworkManager[622]: <info>  [1735828066.1399] device (wlan0): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
Jan 02 21:27:46 blackpc NetworkManager[622]: <info>  [1735828066.1400] manager: NetworkManager state is now CONNECTING
Jan 02 21:27:46 blackpc NetworkManager[622]: <info>  [1735828066.1401] device (wlan0): state change: prepare -> config (reason 'none', managed-type: 'full')
Jan 02 21:27:46 blackpc kded6[1193]: org.kde.plasma.nm.kded: Unhandled active connection state change:  1

Also this keeps happening, any ideas? Cheers.
Full log of what's happening: http://0x0.st/8zf1.txt

Offline

#21 2025-01-02 14:45:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Disable roaming, it's the most likely cause. The signal quality seems similar.
5GHz will keep you away from buetooth and microwaves, but 2.4GHz has a wider range (at overall weaker signal) so if you typically stay very close to the AP, lock into the 5GHz connection.

Offline

#22 2025-01-02 14:57:50

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

seth wrote:

Disable roaming, it's the most likely cause. The signal quality seems similar.
5GHz will keep you away from bluetooth and microwaves, but 2.4GHz has a wider range (at overall weaker signal) so if you typically stay very close to the AP, lock into the 5GHz connection.

1. How do I turn off roaming?
2. In the BSSID tab there is only the 2.4 Ghz connection.
Also how do I "reset" the configuration of iwd and NM? It is very buggy right now.

I have tried using main.conf to block roaming but it still roams

Last edited by TheSilverFoxes (2025-01-02 16:25:35)

Offline

#23 2025-01-03 10:49:26

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

/etc/iwd/main.conf

DisablePeriodicScan=true

Still didn't prevent iwd from roaming.

Also using

[General]
RoamThreshold=-75
RoamThreshold5G=-80

didn't help

EDIT: Switching back to wpa_supplicant also didn’t help.
When using this appears when the ping spikes:

an 03 21:39:44 blackpc wpa_supplicant[668]: wlan0: WNM: Preferred List Available

Last edited by TheSilverFoxes (2025-01-03 14:40:17)

Offline

#24 2025-01-03 15:04:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

1. How do I turn off roaming?
2. In the BSSID tab there is only the 2.4 Ghz connection.

https://wiki.archlinux.org/title/Networ … ts_(Wi-Fi)
Do not connect to 'Minh Khue' but to "fc:57:03:f0:a9:ec" specifically (assuming that's your 2.4GHz connection)
NM controls iwd, your iwd config should™ be irrelevant at this point.

Offline

#25 2025-01-03 16:08:08

TheSilverFoxes
Member
Registered: 2024-08-24
Posts: 47

Re: [Resolves] High ping spikes with NetworkManager + iwd on wifi

Irrelevant point here, but I reinstalled Windows to sanity check myself (it worked perfectly)
But now I cannot install Arch Linux with archinstall anymore?
Using iwctl to connect to the AP was fine (albeit buggy) but when I try to do archinstall it is stuck on “Checking version”.
And when I use the —skip-version-check flag it would just freeze at the Mirror region setting
Thank you seth for helping, but this is extremely confusing to me right now hmm

Last edited by TheSilverFoxes (2025-01-03 16:30:17)

Offline

Board footer

Powered by FluxBB