Cellular data not activated after exiting flight mode
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
Canonical Phone Foundations | ||
| | network-manager (Ubuntu) |
High
|
Tony Espy | ||
| | network-manager (Ubuntu RTM) |
High
|
Tony Espy | ||
Bug Description
Cellular data is not activated in ~50% of the cases in arale after setting then unsetting flight mode.
I obtained the attached log this way:
1. Disabled wifi (to have less noise) and removed syslog (to make smaller the attached one)
2. Reboot
3. See cellular data is on: route is right, I have network access
4. Set flight mode
5. Unset flight mode
6. Data is not restored even after waiting for a few minutes. ccmni0 interface is down.
list-modems shows that the modem is data-attached
list-contexts output shows that no IP context has been activated
Doing
usr/share/
sudo ip route add default dev ccmni0
ping 8.8.8.8
works and I receive the ping responses.
$ system-image-cli -i
current build number: 12
device name: arale
channel: ubuntu-
last update: 2015-04-16 08:06:39
version version: 12
version ubuntu: 20150416.0
version device: a17b9320788e721
version custom: 20150416.0
+ NetworkManager 0.9.10.
Related branches
- Alfonso Sanchez-Beato: Approve on 2015-06-26
- Mathieu Trudel-Lapierre: Approve on 2015-06-24
-
Diff: 708 lines (+688/-0)3 files modifieddebian/changelog (+9/-0)
debian/patches/lp1445080-fix-modem-flight-mode.patch (+678/-0)
debian/patches/series (+1/-0)
- Mathieu Trudel-Lapierre: Approve on 2015-07-20
-
Diff: 762 lines (+301/-188)6 files modifieddebian/changelog (+7/-0)
debian/patches/0001-wwan-add-support-for-using-oFono-as-a-modem-manager.patch (+215/-183)
debian/patches/lp1445080-modify-device-modem-avail.patch (+44/-0)
debian/patches/lp1445080-nm-modem-check-for-set-mm-enabled-func.patch (+28/-0)
debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch (+5/-5)
debian/patches/series (+2/-0)
| Ricardo Salveti (rsalveti) wrote : | #2 |
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → Canonical Phone Foundations (canonical-phonedations-team) |
| description: | updated |
| Changed in network-manager (Ubuntu): | |
| status: | New → Incomplete |
| Tony Espy (awe) wrote : | #3 |
@Ricardo
Can you let me know what version of network-manager is in your images?
I just tried to reproduce this with mako ( vivid-proposed #178 ) and it works just fine. The version of the NM in this image is 0.9.10.0-4ubuntu15. This version contains my most recent re-connect fix, which might be what your hitting. See bug #1418077 for details.
| Tony Espy (awe) wrote : | #4 |
Also when debugging issues with NM connections, please add the output of 'nmcli d' to the bug reports, as this will show NM's view of the connections.
| Tony Espy (awe) wrote : | #5 |
I did managed to reproduce this on arale ( vivid-proposed #165 ) with the recent version of NM which fixes bug #1418077.
'nmcli d' shows the modem as disconnected. list-modems shows the ConnectionManager interface both powered and attached per Alfonso's original description. The modem is registered to a carrier using UMTS, and list-contexts shows no active contexts.
| Changed in network-manager (Ubuntu): | |
| status: | Incomplete → Confirmed |
| Tony Espy (awe) wrote : | #6 |
@Ricardo
Can you also confirm that the modem is online too when you try to reproduce? Just want to ensure you're not hitting the urfkill saved state problem. Also does a reboot restore a working connection?
| Changed in network-manager (Ubuntu): | |
| importance: | Undecided → High |
| assignee: | nobody → Tony Espy (awe) |
| Ricardo Salveti (rsalveti) wrote : | #7 |
Yup, modem is online just fine, the side effect is the same described by Alfonso (and you at comment #5).
Modem is online, powered and attached, without any active context.
current build number: 179
device name: m75
channel: ubuntu-
last update: 2010-01-01 01:29:38
version version: 179
| Tony Espy (awe) wrote : | #8 |
@Ricardo
What about mako? I have a hunch this is arale-specific as I couldn't reproduce on mako.
| Ricardo Salveti (rsalveti) wrote : | #9 |
Just tested again and was again able to reproduce on mako:
phablet@
[ /ril_0 ]
Revision = M9615A-
Serial = 353918052313257
Online = 1
Type = hardware
Features = ussd net gprs sms rat sim
Emergency = 0
Model = Fake Modem Model
Lockdown = 0
Powered = 1
Interfaces = org.ofono.
Manufacturer = Fake Manufacturer
[ org.ofono.
[ org.ofono.
[ org.ofono.
State = idle
[ org.ofono.
CellId = 3198203
Technology = umts
Status = registered
Mode = auto
Name = VIVO
Strength = 45
[ org.ofono.
Attached = 1
Powered = 1
Bearer = hspa
Suspended = 0
[ org.ofono.Phonebook ]
[ org.ofono.
VoiceBusy = +550174891818716
[ org.ofono.
[ org.ofono.
[ org.ofono.
Alphabet = default
Bearer = cs-preferred
[ org.ofono.
[ org.ofono.
[ org.ofono.
[ org.ofono.
Retries =
LockedPins =
PinRequired = none
Present = 1
[ org.ofono.
...
| Ricardo Salveti (rsalveti) wrote : | #10 |
And works fine after a reboot (still with wifi disabled).
| Ricardo Salveti (rsalveti) wrote : | #11 |
It seems NM was trying to connect, but that never actually succeeded:
Apr 21 21:47:01 ubuntu-phablet NetworkManager[
Apr 21 21:49:01 ubuntu-phablet NetworkManager[
Apr 21 21:51:01 ubuntu-phablet NetworkManager[
Apr 21 21:53:01 ubuntu-phablet NetworkManager[
| Jonathan Cave (jocave) wrote : | #12 |
Version: ubuntu-
Slightly different scenario with similar symptoms:
* Tesco Mobile SIM in slot 1 (O2 MVNO)
* On booting the phone registers on network and cellular data is enabled
* Can browse internet etc
* After some time it appears the network drops (bars empty)
* It reconnects quickly but the data connection does not come back up
| Jonathan Cave (jocave) wrote : | #13 |
list-contexts when data is working
| Jonathan Cave (jocave) wrote : | #14 |
list-contexts when data down
| Jonathan Cave (jocave) wrote : | #15 |
| Tony Espy (awe) wrote : | #16 |
@Jonathan
That's a very different scenario as Flight-Mode is not involved, please add your comments to bug #1424791 instead.
| Tony Espy (awe) wrote : | #17 |
I've just tried on krillin ( vivid-proposed / #193 ); conformed NM version is: 0.9.10.0-4ubuntu15. I had a single AT&T SIM in the first slot.
WiFi disabled, I toggled FM on/off ten times. Sometimes I'd tap the toggle as soon as it became active, sometimes I waited up to 1-2m before toggling. Although there's lag to search and find a network, once signal bars appear, the 2g icon appears shortly ( <30s ) thereafter.
| Changed in canonical-devices-system-image: | |
| status: | New → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | Fix Released → Confirmed |
| importance: | Undecided → High |
| milestone: | none → ww22-2015 |
| tags: | added: connectivity |
| Will Quincay (mini-lee) wrote : | #18 |
On Aquaris BQ e4.5, Ubuntu 14.10 (r22), image part 20150528.
After reboot in flight mode, SIM card is recognized, but impossible to enter PIN code, the Unlock button is invalid.
You can reproduce it like that :
-set flight mode
-turn off the device
-turn on the device
-unset flight mode
-> the Unlock button is out of order...
a reboot with flight mode unset is needed to be able to enter PIN code.
Do not know if it could be linked with above messages...
Thanks
| Changed in network-manager (Ubuntu): | |
| status: | Confirmed → In Progress |
| Changed in canonical-devices-system-image: | |
| status: | Confirmed → In Progress |
| Changed in network-manager (Ubuntu RTM): | |
| status: | New → In Progress |
| importance: | Undecided → High |
| assignee: | nobody → Tony Espy (awe) |
| Tony Espy (awe) wrote : | #19 |
@Will
Thanks for your comment. I was just able to reproduce this using a devel image from two weeks ago ( ubuntu-
| Tony Espy (awe) wrote : | #20 |
@Will
It appears that this may be related to an enhancement/fix which auto-unlocks the phone when FlightMode was toggled and a PIN-locked SIM was inserted. This works well ( at least with one PIN-locked SIM installed... I didn't try two ).
| Tony Espy (awe) wrote : | #21 |
So regarding the original bug, there are two scenarios that can happen when FlightMode is enabled on arale. These same scenarios could also occur on other platforms as well, which would explain why @Ricardo was able to reproduce on mako.
1. When FlightMode is enabled, often the first event NM sees is the ofono gprs context's 'Settings' property change to {} ( ie. the connection has been closed, so no IP settings exist anymore ). This failure of an active connection causes the connection_retry count ( currently at 4 ) to drop by 1.
When this happens, NM immediately schedules an activation check ( on the idle queue ), but as not much else is happening, the activation attempt occurs almost immediately. The attempt fails, as ofono is in the middle of bringing down the modem. NM actually manages to try three times in a row, and then disables the connection because the retry_count of the connection has hit zero. This causes a 5m timer to be set, which will reset the retry count and re-trigger auto-activation.
When the timer fires, the reset fails to auto-activate the connection. The cause of why it fails to auto-activate when the timer goes off is still being investigated, but it believed to be related to the following scenario.
2. Other times when FlightMode is enabled, it's possible for the NM_MODEM_OFONO instance to detect that the modem has gone offline and/or detached from GPRS *before* the active connection drops. This is good, because there's code that recognizes this, and disables auto-connect for the connection ( so the whole retry / 5m timer logic doesn't trigger ). There's also code that re-enables auto-connect when it seems the modem re-attach to GPRS and go Online.
At some point during the modem online process, the device state goes from UNAVAILABLE to DISCONNECTED, which triggers NM_DEVICE to refresh it's available connections. This eventually bubbles down to a function in the NM_MODEM_OFONO class called check_compatibl
This
@Will, @Tony:
The behaviour you see is probably related to indicator-network, so if you open a bug please include that package too. I think the behaviour has improved after latest landings for that package which fixed some problems for PUK-blocked SIMs, although issues still remain.
I do not really think that the auto-unlocking change is related, as that would not trigger after a reboot.
| Changed in canonical-devices-system-image: | |
| milestone: | ww22-2015 → ww24-2015 |
| Łukasz Zemczak (sil2100) wrote : | #23 |
This bug was fixed in the package network-manager 0.9.10.
---------------
network-manager (0.9.10.
* debian/
NMModemOfono's modem state logic to get rid of a race condition
that can cause flight-mode to fail and leave the modem stuck
with no active connections (LP: #1445080).
-- Tony Espy <email address hidden> Sat, 27 Jun 2015 16:08:26 -0400
| Changed in network-manager (Ubuntu RTM): | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| milestone: | ww24-2015 → ww28-2015 |
| Launchpad Janitor (janitor) wrote : | #24 |
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 |


I could also easily reproduce that with mako/arale 173, without any custom network manager packages.