On some wireless cards background scanning done by NetworkManager will cause severe lag or complete disconnection. I am using a broadcom-sta driver and this patch has resolved my issue completely. I am requesting that a new USE option be added for users that could benefit from this patch. Dan Williams refuses to patch this issue with NetworkManager for troubled cards. Maybe we can do it at the distribution level? The original gnome bug ticket is https://bugzilla.gnome.org/show_bug.cgi?id=513820 There is a patch from Wagner Volanin which I used as a base to create a patch for NetworkManager-0.8 code. Reproducible: Always
Created attachment 222309 [details, diff] Patch disables background network scanning when connected to an AP I am not good at ebuids but this patch really needs to be applied only is a specific USE setting is supplied. This patch could probably be used on previous versions of NetworkManager is altered slightly.
I have noticed another instance in which NetworkManager will scan in the background, and causes disconnection in some cases because it takes too long. However, it is over a longer period of like a few hours versus ever few minutes. I am going to look and see if I can provide a patch to include that change as well.
Created attachment 222337 [details, diff] This updated changes another section of code the further prevents background scanning I am going to let my wireless set the rest of the day while tailing logs to see if the issue persists. One thing to note: after applying this patch, the updated list of networks is not available for about 5 minutes after login. It takes a few moments before previously saved entries auto connect after login. However, if it works, I don't mind waiting compared getting disconnected repeatedly. This also gets rid of the following debug messages people complain about which is the result of background scanning. Mar 6 14:30:37 mobi NetworkManager: <debug> [1267903837.007143] periodic_update(): Roamed from BSSID 00:14:6C:4E:7A:EE (AP) to (none) ((none)) Mar 6 14:30:43 mobi NetworkManager: <debug> [1267903843.007607] periodic_update(): Roamed from BSSID (none) ((none)) to 00:14:6C:4E:7A:EE (AP) Mar 6 14:30:49 mobi NetworkManager: <debug> [1267903849.003792] periodic_update(): Roamed from BSSID 00:14:6C:4E:7A:EE (AP) to (none) ((none)) Mar 6 14:30:55 mobi NetworkManager: <debug> [1267903855.007259] periodic_update(): Roamed from BSSID (none) ((none)) to 00:14:6C:4E:7A:EE (AP) Mar 6 14:31:01 mobi NetworkManager: <debug> [1267903861.007514] periodic_update(): Roamed from BSSID 00:14:6C:4E:7A:EE (AP) to (none) ((none))
Created attachment 222339 [details, diff] Patch disables background network scanning when connected to an AP i uploaded the wrong file, sorry about that.
Created attachment 222369 [details, diff] Disables background scanning once connected to a AP After more testing and browsing the code. I have made several more checks where it wants to scan. I have basically said if the connection is active do not scan. I also have decreased the initial scan interval from 5 min to 1 min. This means the wireless network list and auto connection is done sooner. The drawback is stats like signal strength and quality are not updated as far as I can see.
This can be closed. Although the patch works in most cases I still experienced random drops from scanning, and I can't pin point it. I have decided to you wicd instead and it appears to be much more stable for my particular card.