After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702838 - [MM 0.8] check current power state when setting new power state
[MM 0.8] check current power state when setting new power state
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-06-21 22:02 UTC by Dan Williams
Modified: 2013-06-24 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the issue. (9.74 KB, patch)
2013-06-23 09:25 UTC, Aleksander Morgado
committed Details | Review

Description Dan Williams 2013-06-21 22:02:06 UTC
MM doesn't have any interaction with rfkill at this time, which we probably should have eventually.  This leads to issues with Gobi devices when they get rfkilled and un-killed, they are in low-power state but MM thinks they are still in "on" state because it didn't notice the transition and MM thinks it's the only thing changing power state.

A quick fix would be to double-check the current power state in mm_iface_modem_set_power_state() instead of relying on the cached power state from initialization.

Eventually we probably want plugins to be able to set the power state of the modem if it changes outside of MM, and possibly create a generic power-state handler that listens to the kernel rfkill or something.  This will get tricky though, since there are multiple rfkill "switches" (some hardware and some software) and they interact in non-obvious ways.  Plus, only internal devices actually get rfkilled by the laptop killswitch.  Happy to expand on this if you want more info on the rfkill tragedy since we've been dealing with it in NM for years.
Comment 1 Aleksander Morgado 2013-06-23 09:25:19 UTC
Created attachment 247553 [details] [review]
Patch for the issue.
Comment 2 Dan Williams 2013-06-24 17:13:56 UTC
Review of attachment 247553 [details] [review]:

Looks good!
Comment 3 Aleksander Morgado 2013-06-24 17:54:22 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.