Stopping NetworkManager from Scanning
An issue I’ve been having for a while with my current laptop in Ubuntu is that when I’m close to 2 access points for the same network (same SSID), NetworkManager would connect me to one of them, scan, find the other, and switch to that one, and repeat.
It would be switching endlessly, leaving me with an unusable connection. After a while it would give up and leave me disconnected completely.
The simplest solution is to stop the NetworkManager process after you’re connected to one of the APs:
sudo pkill -STOP NetworkManager
And to bring it back,
sudo pkill -CONT NetworkManager
Note
When you do this, the process is stopped. You can’t interact with it in any way, such as editing connections or connecting to another network. You’ll have to continue it before you can do anything.