Public bug reported:
Starting with Ubuntu 26.04 LTS I started getting video/audio calls
(teams) hiccups for 1-2s every 5 minutes. This did not happen on Ubuntu
24.04, but it has happened on another Linux distro. What I have
confirmed is this across two different intel laptops (Intel, HP), and
three different wifi networks and three different ISPs.
I found three mitigations that resolved the issue: lock to 5GHz, to a
single AP, or change bgscan to simple:30:-70:86400 so that it doesn't
try and swap APs if the signal is -70 (in theory this could still cause
issues, but in practice it solved my issues).
The following is from claude logging and debugging:
Network
3-node Wi-Fi 7 mesh, WPA3-SAE, no 802.11r. The 6 GHz radios use
320 MHz channels and advertise a PSD-type Transmit Power Envelope
(regulatory client EIRP PSD, 5 dBm/MHz).
What happens
NetworkManager sets bgscan "simple:30:-65:300" (it has seen more than
one BSSID). Every ~306 s a background scan runs, and ~6 s later
wpa_supplicant roams ("deauth ... reason 1", local request, then SAE
auth/assoc to another BSS). In the 48 logged minutes of a video call
(16:11-16:59) there were 8 roams. Seven are listed below (signal from
`iw station dump` just before and after; BSSIDs anonymized); the 8th,
at 16:56:28, followed a drop to -71 dBm.
time from (MHz, dBm) to (MHz, dBm) since last trigger
16:19:54 AP-A 6535 -50 -> AP-B 6855 -55 bgscan
16:25:00 AP-B 6855 -57 -> AP-A 6535 -51 306 s bgscan
16:25:52 AP-A 6535 -51 -> AP-C 5220 -55 52 s AP request
(11k/11v)
16:30:57 AP-C 5220 -59 -> AP-A 6535 -54 306 s bgscan
16:36:04 AP-A 6535 -52 -> AP-B 6855 -57 306 s bgscan
16:41:10 AP-B 6855 -57 -> AP-A 6535 -54 306 s bgscan
16:46:16 AP-A 6535 -52 -> AP-B 6855 -56 306 s bgscan
Over 2.5 hours, 9 of 11 roams came ~6 s after a bgscan scan, and 4 of
those went to an AP 1-5 dB weaker. During the call, each roam took the
link down for ~0.1 s and lost 0.4-0.8 s of pings to the gateway and
0.5-1.5 s to the internet. Each background scan also raised internet
latency to 165-260 ms for ~6 s, even when no roam followed.
Workaround
A long bgscan interval for the active network stops it:
sudo wpa_cli -i wlp0s20f3 set_network <id> bgscan '"simple:30:-70:86400"'
That is the value NetworkManager already uses for single-AP networks.
I apply it after every connect with the attached NetworkManager
dispatcher script.
Suspected cause
Upstream commit 77386f51a ("Adjust the RSSI and throughput estimate in
roaming algorithm", committed 2023-11-10; first in hostap_2_11, not in
hostap_2_10). In wpa_supplicant_need_to_roam_within_ess(), when the
driver reports no average beacon signal, the current BSS level comes
from the signal poll and is normalized to 20 MHz:
cur_level = si.data.avg_beacon_signal ?
si.data.avg_beacon_signal :
(si.data.avg_signal -
wpas_channel_width_rssi_bump(cur_ies, cur_ie_len, si.chanwidth));
iwlwifi doesn't report a beacon signal average (`iw station dump` has
no "beacon signal avg" line), so the avg_signal branch is used. For a
320 MHz BSS with a PSD-type TPE, wpas_channel_width_rssi_bump() is
12 dB. Candidates are scored from their scan RSSI, a 20 MHz beacon
measurement. On this hardware avg_signal is not 12 dB above the beacon
RSSI: for the associated 320 MHz AP, `iw station dump` showed signal
avg -54 dBm while its scan entry showed -61 dBm, about 7 dB. So the
current AP is under-rated by roughly 5 dB against candidates, the
"sel_est > cur_est + 5000" check fires, and it roams to an AP up to
~5 dB weaker, which matches the log above. At the next bgscan the
same thing happens in reverse.
Possible fix
Claude drafted two small changes to wpa_supplicant_need_to_roam_within_ess()
(compile-tested, not yet run) and plan to post them as RFC patches on
the hostap thread below:
1. Keep using the signal poll value, but never score the current BSS
below a recent (10 s) scan result of itself, which uses the same
20 MHz basis as the candidates. This should fix my case.
2. Allow reassociation on estimated throughput alone only when the
gain is at least 20% (the factor the function already uses for its
"Current BSS has better signal level" check), not just 5 Mbps. That
would also stop the 1 dB ping-pong in the 24.04 report.
On the NetworkManager side, a longer bgscan interval for multi-AP
networks (or a way to configure it) would avoid most of these roam
decisions in the first place.
What I haven't tried:
* I did not try undoing the suspected patch
* I did not try the proposed claude created patches, only attached them here
as possible pointers to areas for improvement
I can reliably reproduce the problem if an updated package is made and
you would like me to test it (by undoing my bgscan mitigation).
** Affects: wpasupplicant (Ubuntu)
Importance: Undecided
Status: New
** Patch added: "Patch 2/2"
https://bugs.launchpad.net/bugs/2174329/+attachment/6017360/+files/0002-Roaming-Require-a-relative-gain-for-throughput-based.patch
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174329
Title:
wpasupplicant 2.11 ping-pongs between 6 GHz access points every 5
minutes, freezing calls
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/2174329/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs