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 772640 - Networkmanager 1.4.0 doesn't automatically active connections marked with "Automatically connect"
Networkmanager 1.4.0 doesn't automatically active connections marked with "Au...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: Beniamino Galvani
NetworkManager maintainer(s)
Depends on:
Blocks: nm-review
 
 
Reported: 2016-10-09 11:24 UTC by Herbert Wantesh
Modified: 2017-10-23 18:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Automatically connect disabled (97.57 KB, text/plain)
2016-10-10 16:16 UTC, Herbert Wantesh
  Details
"Available to all users" disabled (97.57 KB, text/plain)
2016-10-10 16:17 UTC, Herbert Wantesh
  Details
"Available to all users" enabled (130.03 KB, text/plain)
2016-10-10 16:17 UTC, Herbert Wantesh
  Details
[PATCH 1/2] session-monitor: use logging macros (4.61 KB, patch)
2016-10-12 12:43 UTC, Beniamino Galvani
none Details | Review
[PATCH 2/2] session-monitor: fix parsing of ConsoleKit database (1.07 KB, patch)
2016-10-12 12:43 UTC, Beniamino Galvani
none Details | Review

Description Herbert Wantesh 2016-10-09 11:24:23 UTC
Networkmanager 1.4.x doesn't automatically activate  connections marked with "Automatically connect" when the option "Available to all users" is deactivated.
I tested the versions 1.4.0 and 1.4.2.

Workaround:
* Enabe the option "Available to all users", which  solves the problem for 1.4.x
* downgrade networkmanager to 1.0.12, which solves the problem
Comment 1 Beniamino Galvani 2016-10-10 12:23:15 UTC
(In reply to Herbert Wantesh from comment #0)
> Networkmanager 1.4.x doesn't automatically activate  connections marked with
> "Automatically connect" when the option "Available to all users" is
> deactivated.
> I tested the versions 1.4.0 and 1.4.2.
> 
> Workaround:
> * Enabe the option "Available to all users", which  solves the problem for
> 1.4.x
> * downgrade networkmanager to 1.0.12, which solves the problem

Hi, I'm unable to reproduce this; can you please set 'level=TRACE' in the [logging] section of /etc/NetworkManager/NetworkManager.conf, reboot the system and attach NM logs ('journalctl -u NetworkManager -b' if you use journald or otherwise from syslog)? Thanks!
Comment 2 Herbert Wantesh 2016-10-10 16:16:24 UTC
Created attachment 337338 [details]
Automatically connect disabled
Comment 3 Herbert Wantesh 2016-10-10 16:17:25 UTC
Created attachment 337339 [details]
"Available to all users" disabled
Comment 4 Herbert Wantesh 2016-10-10 16:17:57 UTC
Created attachment 337340 [details]
"Available to all users" enabled
Comment 5 Beniamino Galvani 2016-10-11 09:57:25 UTC
Which distro are you using? Or, if you compiled NM from git, which
session tracking method are you using?

 ./configure --with-session-tracking=systemd|consolekit|no

When the connection is bound to a specific user, we automatically
enable it only if an active session for that user exists. Apparently
this worked the same on 1.0.12 but with one exception: when
session-tracking is disabled, on 1.0.12 we always auto-activated
the connection (as long as the specified user existed in the system),
while on 1.4 we don't anymore.
Comment 6 Herbert Wantesh 2016-10-11 16:56:40 UTC
(In reply to Beniamino Galvani from comment #5)
> Which distro are you using? Or, if you compiled NM from git, which
> session tracking method are you using?
> 
>  ./configure --with-session-tracking=systemd|consolekit|no
> 
> When the connection is bound to a specific user, we automatically
> enable it only if an active session for that user exists. Apparently
> this worked the same on 1.0.12 but with one exception: when
> session-tracking is disabled, on 1.0.12 we always auto-activated
> the connection (as long as the specified user existed in the system),
> while on 1.4 we don't anymore.

i use gentoo. It is compiled with --with-session-tracking=consolekit
and an active session exists for this user
Comment 7 Herbert Wantesh 2016-10-11 17:17:55 UTC
btw 1.0.12 was also compiled with --with-session-tracking=consolekit
Comment 8 Beniamino Galvani 2016-10-12 12:43:26 UTC
Created attachment 337513 [details] [review]
[PATCH 1/2] session-monitor: use logging macros
Comment 9 Beniamino Galvani 2016-10-12 12:43:54 UTC
Created attachment 337514 [details] [review]
[PATCH 2/2] session-monitor: fix parsing of ConsoleKit database
Comment 10 Beniamino Galvani 2016-10-12 12:45:46 UTC
Hi Herbert,

the two patches attached (actually only the second) should fix the issue, can you try them?
Comment 11 Thomas Haller 2016-10-12 13:43:39 UTC
patches lgtm
Comment 12 Herbert Wantesh 2016-10-12 16:33:29 UTC
thanks for the patches :) - i only applied patch (In reply to Beniamino Galvani from comment #9)
> Created attachment 337514 [details] [review] [review]
> [PATCH 2/2] session-monitor: fix parsing of ConsoleKit database

thanks for the patches :) - i only applied the 
"[PATCH 2/2] session-monitor: fix parsing of ConsoleKit database" patch everythings works again. thanks for the quick fix :)
Comment 13 Herbert Wantesh 2016-10-13 07:48:41 UTC
seems something is missing, as i have to restart networkmanager after every reboot to get it working. without a restart autoconnect doesnt work
Comment 14 Herbert Wantesh 2016-10-13 07:55:18 UTC
it seems consoleit wasn't up for whatever reasen, after starting it, nm works even after a reboot. so the patch is correct