Network manager never scanning for new access points
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
John McAleely | ||
| | network-manager (Ubuntu) |
High
|
Tony Espy | ||
| | Vivid |
High
|
Tony Espy | ||
| | network-manager (Ubuntu RTM) |
High
|
Tony Espy | ||
Bug Description
While trying to reproduce another bug related with the last seen value from the access points, I noticed that network manager is never really scanning for new access points on my desktop, not even when not connected.
$ sudo nmcli g logging level debug domains wifi_scan
Then powered an access point, but was never really able to see it. From syslog, noticed that there is never really a scan, which explains why the ap never goes away and why it is not able to find it in the first place.
If I force a scan via cmdline it works as expected (and I noticed a scan also happens when changing connections).
Was also able to reproduce this issue on mako, with the following image:
phablet@
current build number: 173
device name: mako
channel: ubuntu-
alias: ubuntu-
last update: 2015-04-16 14:58:58
version version: 173
version ubuntu: 20150416
version device: 20150210
version custom: 20150416
In the mako case, I booted with a known connection in place, it connected successfully but it never really scans for other access points. Scan works fine after disconnecting though.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: network-manager 0.9.10.0-4ubuntu14
ProcVersionSign
Uname: Linux 3.19.0-14-generic x86_64
ApportVersion: 2.17.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Apr 16 14:21:42 2015
IfupdownConfig:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
InstallationDate: Installed on 2013-10-29 (534 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
IpRoute:
default via 192.168.1.1 dev wlan0 proto static metric 1024
10.0.3.0/24 dev lxcbr0 proto kernel scope link src 10.0.3.1
169.254.0.0/16 dev lxcbr0 scope link metric 1000
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.16
SourcePackage: network-manager
UpgradeStatus: Upgraded to vivid on 2013-10-31 (532 days ago)
mtime.conffile.
nmcli-nm: Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code 2: Error: Object 'nm' is unknown, try 'nmcli help'.
Related branches
- Mathieu Trudel-Lapierre: Approve on 2015-08-05
-
Diff: 64 lines (+15/-6)2 files modifieddebian/changelog (+7/-0)
debian/patches/0002-wifi-cull-the-scan-list-before-signalling-ScanDone-b.patch (+8/-6)
| Ricardo Salveti (rsalveti) wrote : | #1 |
| Changed in canonical-devices-system-image: | |
| importance: | Undecided → High |
| milestone: | none → ww22-2015 |
| tags: | added: connectivity |
| Changed in network-manager (Ubuntu): | |
| importance: | Undecided → High |
| Ivo Wever (ivo-wever) wrote : | #3 |
I'm seeing this as well: after upgrading to 15.04, I sometimes don't get automatically connected to my default network, because it hasn't been found yet. A manual 'sudo iwlist scan' is needed to get it to find the network, upon which it does automatically connect.
I installed a fresh copy of 15.04, retaining my home partition. /etc is entirely fresh
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → Tony Espy (awe) |
| status: | New → Confirmed |
| milestone: | ww22-2015 → ww24-2015 |
| Iain Lane (laney) wrote : | #4 |
I think I saw this bug on my laptop the other day. I did something like this.
1. Turn it on, log in
2. Look at the wireless list
3. Ah, there's no wifi here, I'll tether. Turn on the AP on my phone.
4. Wait for it to appear in NM so I can connect to it (or it auto connects if I've seen it before)
I waited about 5 minutes and the AP was never seen. Ended up restarting NM (sudo systemctl restart network-manager) and the AP was then seen and associated with. I didn't test comment #3's solution.
| Changed in canonical-devices-system-image: | |
| milestone: | ww24-2015 → ww34-2015 |
| Changed in network-manager (Ubuntu): | |
| assignee: | nobody → Tony Espy (awe) |
| Changed in canonical-devices-system-image: | |
| assignee: | Tony Espy (awe) → John McAleely (john.mcaleely) |
| Tony Espy (awe) wrote : | #5 |
It looks like this bug was introduced in Ubuntu when the rebase to NM 0.9.10.0 occurred.
The function supplicant_
Here's a diff of the cull_aps_
espy@shrike:% diff cull_aps_
10,14c10
< ---
< src/devices/
< 1 file changed, 24 insertions(+), 5 deletions(-)
<
< Index: b/src/devices/
---
> Index: network-
16,18c12,14
< --- a/src/devices/
< +++ b/src/devices/
< @@ -183,6 +183,10 @@ static void supplicant_
---
> --- network-
> +++ network-
> @@ -200,6 +200,10 @@ static void supplicant_
29c25
< @@ -1609,14 +1613,20 @@ supplicant_
---
> @@ -1810,14 +1814,22 @@ supplicant_
50a47,50
> +
> + schedule_scan (self, success);
> }
>
52,54c52
< if (priv->
< priv->requested
< @@ -1836,13 +1846,22 @@ cull_scan_list (NMDeviceWifi *self)
---
> @@ -2005,13 +2017,22 @@ cull_scan_list (NMDeviceWifi *self)
I'll rebuild with the line restored and report results.
| Tony Espy (awe) wrote : | #6 |
Note, I've confirmed the behavior on arale, krilin and mako running the latest stable ( OTA5 ) images.
I've also confirmed on my desktop, a Thinkpad 410s with Intel WiFi ( driver=iwlwifi ).
The behavior can be see by running wpa_cli ( as root ). Initially after boot, scan_results will return a list of APs, but after time, it will start returning an empty list ( unless associated, in which case the current AP will be returned ). Also on a system running 0.9.8.X ( <= 14.10 ), you'll see periodic scan events reported by wpa_cli:
<3>CTRL-
<3>CTRL-
| description: | updated |
| Changed in network-manager (Ubuntu RTM): | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| assignee: | nobody → Tony Espy (awe) |
| Tony Espy (awe) wrote : | #7 |
Just verified that restoring the call to schedule_scan in supplicant_
| tags: | added: hotfix |
| Changed in network-manager (Ubuntu Vivid): | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
| assignee: | Mathieu Trudel-Lapierre (mathieu-tl) → Tony Espy (awe) |
| Changed in network-manager (Ubuntu): | |
| status: | Confirmed → In Progress |
| Changed in network-manager (Ubuntu RTM): | |
| status: | Confirmed → In Progress |
| Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package network-manager - 0.9.10.0-4ubuntu19
---------------
network-manager (0.9.10.
[ Tony Espy ]
* debian/
that added APN, USERNAME and PASSWORD to NM_SETTING_GSM object.
NM doesn't actually need access to these settings, and USERNAME/
PASSWORD can cause issues with NM's secrets needed logic.
* debian/
debian/
debian/
debian/
to NMModemOfono's modem_state handling. Added get/set_
methods to NMSettingsConne
ofono connections to 30s. Finally added a 5s delay to NM_POLICY's activation
logic triggered when a modem device is disconnected. This allows modem time to
settle and NM to process the resulting DBus state changes. (LP: #1461593)
* debian/
debian/
debian/
debian/
changes collectively fix flight-mode on arale ( and other devices ), due to
some fundemental race conditions in the ofono logic. (LP: #1445080, #1440917)
* debian/
debian/
gprs-context 'Preferred' property. (LP: #1361864)
[ Mathieu Trudel-Lapierre ]
* d/p/0002-
Re-add schedule_scan() call after we get the ScanDone signal from the
supplicant. Otherwise we'd do one scan on startup and never scan again.
(LP: #1445134)
-- Mathieu Trudel-Lapierre <email address hidden> Wed, 05 Aug 2015 12:17:28 -0400
| Changed in network-manager (Ubuntu): | |
| status: | In Progress → Fix Released |
| Tony Espy (awe) wrote : | #9 |
FixReleased as version 0.9.10.
| Changed in network-manager (Ubuntu RTM): | |
| status: | In Progress → Fix Released |
| Tony Espy (awe) wrote : | #10 |
Changing Canonical System Image task to FixCommitted as 0.9.10.
| Changed in canonical-devices-system-image: | |
| status: | Confirmed → Fix Committed |
| Changed in canonical-devices-system-image: | |
| status: | Fix Committed → Fix Released |


Status changed to 'Confirmed' because the bug affects multiple users.