Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308085 - net-misc/networkmanager-0.8 - patch for disabling background network scanning when connected to an AP
Summary: net-misc/networkmanager-0.8 - patch for disabling background network scanning...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-06 17:21 UTC by Dereck
Modified: 2010-03-07 02:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch disables background network scanning when connected to an AP (networkmanager-0.8-disable-background-scanning.patch,825 bytes, patch)
2010-03-06 17:24 UTC, Dereck
Details | Diff
This updated changes another section of code the further prevents background scanning (networkmanager-0.8.ebuild,3.70 KB, patch)
2010-03-06 20:27 UTC, Dereck
Details | Diff
Patch disables background network scanning when connected to an AP (networkmanager-0.8-disable-background-scanning.patch,1.05 KB, patch)
2010-03-06 20:29 UTC, Dereck
Details | Diff
Disables background scanning once connected to a AP (networkmanager-0.8-disable-background-scanning.patch,1.49 KB, patch)
2010-03-06 23:37 UTC, Dereck
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dereck 2010-03-06 17:21:55 UTC
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
Comment 1 Dereck 2010-03-06 17:24:20 UTC
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.
Comment 2 Dereck 2010-03-06 19:25:26 UTC
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.
Comment 3 Dereck 2010-03-06 20:27:37 UTC
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))
Comment 4 Dereck 2010-03-06 20:29:35 UTC
Created attachment 222339 [details, diff]
Patch disables background network scanning when connected to an AP

i uploaded the wrong file, sorry about that.
Comment 5 Dereck 2010-03-06 23:37:20 UTC
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.
Comment 6 Dereck 2010-03-07 02:38:48 UTC
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.