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 690361 - ON/OFF button in Mobile Broadband is broken
ON/OFF button in Mobile Broadband is broken
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 781186 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-12-17 16:15 UTC by Martin Holec
Modified: 2017-04-13 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
.xsession-errors (17.39 KB, text/plain)
2012-12-17 16:22 UTC, Martin Holec
  Details
Patch fixing the broken switch button (866 bytes, patch)
2016-10-12 10:48 UTC, Jonathan Kang
none Details | Review
Updated patch (1.04 KB, patch)
2016-10-12 12:15 UTC, Jonathan Kang
none Details | Review
Improved patch (1.52 KB, patch)
2016-10-13 02:08 UTC, Jonathan Kang
none Details | Review
Patch needs review (2.36 KB, patch)
2016-10-13 07:18 UTC, Jonathan Kang
none Details | Review
Updated patch (1.97 KB, patch)
2016-10-17 08:02 UTC, Jonathan Kang
none Details | Review
Fix switch button in mobile network page (2.16 KB, patch)
2017-04-13 08:56 UTC, Jonathan Kang
none Details | Review
Fix switch button in mobile network page (2.32 KB, patch)
2017-04-13 13:42 UTC, Jonathan Kang
none Details | Review
network: Fix mobile broadband switch state (1.72 KB, patch)
2017-04-13 13:52 UTC, Bastien Nocera
committed Details | Review

Description Martin Holec 2012-12-17 16:15:17 UTC
ON/OFF button in Mobile Broadband is broken.

1. Setup Mobile Broadband connection and connect to it.
2. Open "Network Settings" - "Mobile Broadband".
3. Toggle ON/OFF button to OFF. -> Button stays ON, but connection is lost.

4. Disconnect from Mobile Broadband by switching to OFF in applet menu.
5. Open "Network Settings" - "Mobile Broadband".
6. Toggle ON/OFF button to ON. -> Button stays OFF, interface is still disabled.

7. Enable Mobile Broadband interface by switching to ON in applet menu.
8. Open "Network Settings" - "Mobile Broadband".
9. Toggle ON/OFF button. ->  "Mobile Broadband" tab disappears and "connection failed" notification pops-up.

see attached ~/.xsession-errors
Comment 1 Martin Holec 2012-12-17 16:22:08 UTC
Created attachment 231738 [details]
.xsession-errors
Comment 2 Aleksander Morgado 2012-12-18 10:06:29 UTC
This should probably go to gnome-control-center. Martin, can you move it there and specify the version you're using?

If you really think this is a problem in NM or MM; please provide debug logs of both while reproducing the issue.
Comment 3 Pavel Simerda 2012-12-31 13:41:48 UTC
Confirming, tested it yesterday on Fedora 17.

NetworkManager-0.9.6.4-3.fc17.x86_64
gnome-shell-3.4.1-6.fc17.x86_64
Comment 4 Jonathan Kang 2016-10-12 09:44:18 UTC
Moving this bug to gnome-control-center.

I noticed the status of "device_off_switch" button depends on the status of wwan radio. In mobilebb_enabled_toggled, you can find these codes:

> enabled = nm_client_wwan_get_enabled (client);

and

> gtk_switch_set_active (sw, enabled);

The wwan radio status should be enabled generally, and once mobilebb_enabled_toggled is called, the switch button will be set to ON.
Comment 5 Jonathan Kang 2016-10-12 10:48:41 UTC
Created attachment 337506 [details] [review]
Patch fixing the broken switch button
Comment 6 Jonathan Kang 2016-10-12 12:15:45 UTC
Created attachment 337508 [details] [review]
Updated patch

mobilebb_enabled_toggled() shouldn't be called in nm_device_mobile_refresh_ui().
Comment 7 Jonathan Kang 2016-10-13 02:08:08 UTC
Created attachment 337546 [details] [review]
Improved patch

Right now, changing wwan radio status changes the status of the switch button. While it shouldn't be the case. The case button should represent whether there is a mobile connection or not.
Comment 8 Jonathan Kang 2016-10-13 07:18:46 UTC
Created attachment 337557 [details] [review]
Patch needs review

If you have some time, please help review this patch.

Thanks.
Comment 9 Jonathan Kang 2016-10-17 08:02:08 UTC
Created attachment 337816 [details] [review]
Updated patch

The switch button should represent the state of the mobile device. So use the state of mobile device to decide the state of this switch button.
Comment 10 Bastien Nocera 2017-04-13 08:26:39 UTC
*** Bug 781186 has been marked as a duplicate of this bug. ***
Comment 11 Bastien Nocera 2017-04-13 08:29:32 UTC
Review of attachment 337816 [details] [review]:

Could you please add an explanation as to why this is necessary in the commit message? A comment in the code would also be appreciated.
Comment 12 Jonathan Kang 2017-04-13 08:56:04 UTC
Created attachment 349769 [details] [review]
Fix switch button in mobile network page

Comment added in the commit message and in the codes.
Comment 13 Bastien Nocera 2017-04-13 10:41:23 UTC
Review of attachment 349769 [details] [review]:

> Use the state of the mobile device to determine the state of the
> switch button.

Again, please add an explanation as to why and how you're fixing this.
Comment 14 Jonathan Kang 2017-04-13 13:42:46 UTC
Created attachment 349799 [details] [review]
Fix switch button in mobile network page

Why and how to fix this issue is added to the commit message.

Thanks for the review.
Comment 15 Bastien Nocera 2017-04-13 13:52:22 UTC
Created attachment 349800 [details] [review]
network: Fix mobile broadband switch state

The switch was only reflecting the value of the WWAN killswitch instead
of both the WWAN killswitch and the state of the connection itself.
Comment 16 Bastien Nocera 2017-04-13 13:56:04 UTC
Attachment 349800 [details] pushed as bb8ca23 - network: Fix mobile broadband switch state