GNOME Bugzilla – Bug 646395
WWAN section behaves strangely
Last modified: 2011-04-11 17:35:21 UTC
It seems like items aren't correctly cleaned out when things change. If modem-manager dies or is restarted for some reason, you'll get a menu with a bunch of different widgets all over the place. Same thing if the modem is enabled and disabled. Not sure what's going on here, but nm-tool reports devices correctly so its likely a device tracking issue in the indicator.
Created attachment 184835 [details] screenshot showing the problem
Furthermore, if the WWAN device is unplugged or otherwise removed, the menu removes the connections, but not the random status items that you see, and it still has a "Mobile Broadband" section even if NM doesn't expose any WWAN devices.
The additional items seem to be triggered by clicking the WWAN enable switch in the menu. Due to an NM issue the device isn't getting enabled correctly, but it puts a string "invalid" at the bottom of the connection list. When I unplug the modem, the WWAN section disappears, but when I replug it, the "invalid" item is still at the bottom of the list. Is the code not throwing everything in the WWAN section away when there aren't any WWAN devices or something?
Created attachment 184973 [details] [review] NetworkMenu: fix handling WWAN devices NMDeviceModem._createSection was not checking whether it should have shown the connection list, resulting in status item shown even if the device was in an invalid state. Also, fix a logic error when creating the operatorItem and fix overriding _clearSection protected method. --- Bug 606074 has two other patches that may help here. Please test, because my Nokia phone all of a sudden decided that it doesn't want to work.
Bug 646074 I mean.
I haven't been able to reproduce this, with lots of playing around with connect, disconnect, plug in, unplug, kill, restart, etc. Can you give a better how-to-reproduce?
Comment on attachment 184973 [details] [review] NetworkMenu: fix handling WWAN devices > _createSection: function() { >+ if (!this._shouldShowConnectionList()) >+ return; NMDeviceWired._createSection() doesn't have this check either, though I can't figure out if it matters. >- if (this.mobileDevice.operator_name) >+ if (!this.mobileDevice.operator_name) > this._operatorItem.actor.hide(); ugh! ok, that fixes the "mysterious blank signal strength entry when using cdma" bug. >- clearSection: function() { >+ _clearSection: function() { and this is clearly correct
The WWAN menu doesn't handle multiple devices well. The problem with that is that if you have more than one WWAN device, the whole section gets shown, but it muddles up the two devices. Plus, when that happens, you can get invalid device states shown in the menu, because the section is shown, but the device you just plugged in will initially be in "unmanaged" state and that translates to "invalid" in the network.js code. Patch for device states forthcoming, but the problem is really that we need to handle multiple 3G devices better. It's not a common use-case, but if you have a built-in 3G card that you no longer use (because say it's GSM and you switched to Verizon CDMA for work or something) and you have an external dongle that you do use, then this will happen. Or, if you have a Bluetooth phone and an internal 3G card. Or, if you bought the device with a built-in 3G card that uses bands for one network (AT&T for example) but does not support 3G on other networks (T-Mobile), and thus you bought an external T-Mobile dongle, but you havent' taken apart the laptop to remove the original 3G card. I think the current applet structure doesn't really work well for multiple devices of each type because it appears to be based on "sections", where we really do need to be based on the devices themselves. Thus we run into problems where the current design doesn't properly separate devices from each other in the menu if you have more than one of a kind. Separating on devices works well because if you *do* only have one of a kind, then the menu looks exactly like it does now and is not complicated. But then if you ever plug in a second device, the device method can cope with it. See the next screenshot for an example of two WWAN devices. The devices aren't mentioned by name so you have no idea which device is which and which one can be used for what, for example.
Created attachment 185350 [details] two wwan devices (one CDMA, one GSM)
That's a duplicate of bug 646074
with all currently-pending patches, everything looks right with two wwan devices, except that the Mobile Broadband header still has a toggle switch.
Comment on attachment 184973 [details] [review] NetworkMenu: fix handling WWAN devices Attachment 184973 [details] pushed as c7dfd08 - NetworkMenu: fix handling WWAN devices
(In reply to comment #11) > with all currently-pending patches, everything looks right with two wwan > devices, except that the Mobile Broadband header still has a toggle switch. Which is right, because NetworkManager exposes a global "wwan-enable" property. (Docs describe it as something like airport mode but for WWAN only). The fact that switching it has no effect is not a bug in the shell.
hm... ok, it seems weird, but if that's by design then everything here is fixed