I have Debian 13 installed with KDE plasma desktop. I noticed that my WiFi latency regularly gets higher for a few seconds, then returns to normal. After some investigation using ping and iw event, I noticed a 100 ms latency spike for 3-5 seconds when iw reports that the scan started. I assume the scan is triggered by the network manager (right?). Can I disable scanning when connected to a WiFi network and enable it otherwise?
Edit: I think most scans are by wpa_supplicant, not Network Manager. I'm using 2.4 GHz WiFi with 20 MHz channel to make it more resistant to interference. I investigated a bit more and noticed that the scans are triggered because the signal at my desk (usually -70 to -80 dBm) is considered too weak by wpa_supplicant so it is trying hard to find a different network. The question then becomes: How to reduce the threshold a bit (to -80 dBm)?