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 677588 - Usability: disabling autoconnect for a network to which connecting is impossible (e.g. no known password) isn't easily doable
Usability: disabling autoconnect for a network to which connecting is impossi...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 690604 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-06-06 22:05 UTC by el
Modified: 2016-03-02 11:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SecretAgent: differentiate user actions from automatic connections (3.70 KB, patch)
2012-06-14 18:31 UTC, Giovanni Campagna
none Details | Review
Policy: do not reset connection retries for permanently failed connections (3.39 KB, patch)
2012-06-14 18:31 UTC, Giovanni Campagna
none Details | Review

Description el 2012-06-06 22:05:08 UTC
Currently, the Gnome 3 network settings dialog only allows to edit the options of the current wlan network _if connected_. All other known networks to which the machine is currently not connected cannot be customized. nm-connections-editor is there, but the average user won't know of it.

This is a scenario where the average user will be stuck:
1. user connects to a new password-secured network accidentially (user doesn't actually have the password and will never be able to connect)
2. user realizes their mistake, but now the user gets constantly prompted for the password (due to bug 677541 which makes it worse) and has no obvious way of removing the network, since for that they would need to be successfully connected

Expected result:
The user can open the network settings, can somehow get to a list of known networks (without nm-connections-editor magic or hidden tweak tool stuff) and remove the bogus network or disable autoconnect to it

Actual result:
The user is stuck with password prompt spams and will most likely need to consult help of some sort to find out how to get rid of it

Please note this is based on personal experience, so maybe I missed some magic button which allows to solve this. But I actually ran into this myself and the only solution seemed to be nm-connections-editor, so if Gnome 3 can already do this it needs to be clearer/more accessible.
Comment 1 Milan Bouchet-Valat 2012-06-07 08:36:24 UTC
The actual bug is that if you click by mistake on a network for which you do not have the password, it should not be remembered as a preferred connection. I think this was discussed previously in a bug report, but I can't find it. Giovanni?
Comment 2 Giovanni Campagna 2012-06-07 17:45:18 UTC
Probably it was discussed somewhere, can't remember either.
The problem is, what we have now is a single autoconnect boolean. Right now, it is true by default, because generally you want to connect automatically to known wifi, but the shell can't distinguish between misclicks and willful activations, so it ends up being always true.
(CC-ing Dan Williams in case there is something I'm missing, or in case it's possible to improve NetworkManager's interface).

Also, at the NetworkManager layer, it would make sense to mark as permanently failed a connection for which secret retrieval failed at least once. So you would get the dialog the first time, click cancel, then be never prompted until activated manually again.

Btw, IMHO the bug is that you can't forget non active connections, and that's a control-center bug, not a gnome-shell one.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-06-07 17:52:36 UTC
Yeah, the problem is that you get prompted for the password multiple times, For a failed secret, you should re-prompt. If you hit Cancel, not really.
Comment 4 Milan Bouchet-Valat 2012-06-11 17:15:18 UTC
(In reply to comment #2)
> Probably it was discussed somewhere, can't remember either.
> The problem is, what we have now is a single autoconnect boolean. Right now, it
> is true by default, because generally you want to connect automatically to
> known wifi, but the shell can't distinguish between misclicks and willful
> activations, so it ends up being always true.
Isn't it possible at the Shell level to set the autoconnect boolean to FALSE if you click on Cancel the first time you try to connect to a network? There are two conditions: 1) The connection was not known before, and 2) You clicked cancel. Sounds like a reasonable behavior to me.

> (CC-ing Dan Williams in case there is something I'm missing, or in case it's
> possible to improve NetworkManager's interface).
> 
> Also, at the NetworkManager layer, it would make sense to mark as permanently
> failed a connection for which secret retrieval failed at least once. So you
> would get the dialog the first time, click cancel, then be never prompted until
> activated manually again.
Would make sense too.

> Btw, IMHO the bug is that you can't forget non active connections, and that's a
> control-center bug, not a gnome-shell one.
IMHO that's the second part of the bug. Even if the c-c part was fixed, we would still want to fix the present bug (because you don't want to require users to go to the control center just to forget a network they chose by mistake).
Comment 5 el 2012-06-11 20:16:07 UTC
> Isn't it possible at the Shell level to set the autoconnect boolean to FALSE if
> you click on Cancel the first time you try to connect to a network? There are
> two conditions: 1) The connection was not known before, and 2) You clicked
> cancel. Sounds like a reasonable behavior to me.

Sounds reasonable to me aswell. Would make the situation a lot better for those not aware of nm-connections-editor who run into this unfortunate situation.
Comment 6 Giovanni Campagna 2012-06-14 18:31:07 UTC
Ok, so I looked at NetworkManager sources, and here is something I think could improve the current situation.
I didn't implement the autoconnect frobbing at the shell layer because that is a global property, and therefore could affect multi user system where one knows the necessary secrets and the others don't. This kind of configuration changes should be done in the control center panel.

Btw, both NM patches are NOT TESTED, I don't want to mess with system daemons.
Comment 7 Giovanni Campagna 2012-06-14 18:31:24 UTC
Created attachment 216439 [details] [review]
SecretAgent: differentiate user actions from automatic connections

Some secret agents implement system modal behavior for secret
requests, and would like to differentiate it for automatic connections
(as it could be annoying if a dialog pops up from nowhere)
Comment 8 Giovanni Campagna 2012-06-14 18:31:35 UTC
Created attachment 216440 [details] [review]
Policy: do not reset connection retries for permanently failed connections

If a connection failed 4 times in a row, there are high chances
it won't work 5 minutes after. This is in particular true if it
failed due to missing secrets, as that condition won't change unless
a new secret agent is registered, and even in case of temporary
connectivity problems the user can rely on the session agents to
force a connection that is known to work.
Comment 9 Giovanni Campagna 2012-06-14 18:33:12 UTC
Comment on attachment 216439 [details] [review]
SecretAgent: differentiate user actions from automatic connections

Now that I look at it, I mentally merged this with bug 660293, but they don't need to...
Comment 10 Matthias Clasen 2012-06-27 16:31:30 UTC
<mclasen> dcbw: while I'm soliciting comments: https://bugzilla.gnome.org/show_bug.cgi?id=677588
<dcbw> mclasen: discussed that with Owen a while back actually
<dcbw> mclasen: this would be an all-NM fix, but need to figure out a way to do it that doesn't screw admin-provided connections that are just dropped into client machines
<dcbw> mclasen: basically, the Timestamp will get updated to something !0 if the connection was ever successful, so that's a great way to figure this out, except that you rarely set a timestamp when dropping in new connections since the timestamp was never required for autoconnect before
Comment 11 Dan Williams 2012-06-27 17:17:03 UTC
What we really want to do here, instead of changing the "retries" counter, is to key autoconnect off *both* the autoconnect property, and the "timestamp" property.  Timestamp will get updated to !0 whenever the connection is successful, so when looking for automatic networks, we could just ignore anything that has a zero timestamp.

This breaks two cases:

1) admin-deployed connections that you haven't connected to yet, but which the admin expects will autoconnect when you're in range.  These may not have timestamps because they weren't useful for this sort of thing before.

2) Networks you haven't connected to in a year, since the global timestamp code landed on 2011-03-02, which was released as part of 0.9.0.

Both these cases will no longer autoconnect to that saved network, but obviously it could be picked from the menu.

Anyway, I think this should be fixed in NM, and that clients shouldn't have to care about it since NM should just do the right thing.
Comment 12 Dan Williams 2012-06-27 17:17:38 UTC
Maybe just to test this out, we only check timestamp for wifi connections, since that's where the pain really is.
Comment 13 Milan Bouchet-Valat 2012-12-21 14:39:55 UTC
*** Bug 690604 has been marked as a duplicate of this bug. ***
Comment 14 Tom Verdaat 2012-12-25 16:58:57 UTC
After my bug report was marked a duplicate I looked at this report. Temporarily disabling autoconnect for known networks that won't connect right now in order to prevent being spammed with the password window pop-up would be the elegant way to go.

So could someone explain to me why this bug is still unconfirmed given these 12 comments? And is there any progress on it since June? Thanks!
Comment 15 Jasper St. Pierre (not reading bugmail) 2012-12-25 19:20:46 UTC
(In reply to comment #14)
> So could someone explain to me why this bug is still unconfirmed given these 12
> comments?

We do not use the UNCONFIRMED status.
Comment 16 el 2016-03-02 11:41:12 UTC
Has this been fixed? It seems fixed for me, I'm only seeing 1-2 password prompts and then the reconnect mechanism will give up. (which is good!)

I'll close this for now since it seems as if it has been fixed. If someone still sees this, please comment and I'll reopen