[Bug 1079672] New: NetworkManager does not automatically connect to WLAN anymore
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672 Bug ID: 1079672 Summary: NetworkManager does not automatically connect to WLAN anymore Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Network Assignee: bnc-team-screening@forge.provo.novell.com Reporter: fkrueger@mailbox.org QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Given KDE Plasma 5.11.95, after updating to NM 1.10.2 (TW20180203) it does not connect automatically to my WLAN anymore, even though the option "Automatically connect to this network when it is available” in the KDE Network applet is chosen. In fact, it tries to connect, but quits after a while with the message "no password provided", even though its there (I am using Kwallet). I have to connect manually by using the "connect" button in the KDE Network applet. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c2
Wolfgang Bauer
I can confirm that. And: kwallet does not ask for the PW anymore, when a WIFI connection should be automatically established upon startup. I would add KDE maintainers here...
Well, it's probably to be expected that kwallet doesn't ask for a password either (because it's likely not even accessed for some reason). Does it help if you save the WiFI key system-wide? (Wireless Security tab in the connection settings) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c3
--- Comment #3 from Robby Engelmann
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c4
--- Comment #4 from Wolfgang Bauer
No, that did not help here.
Well, then it's obviously not related to kwallet... I suppose it's not a general problem in Plasma 5.12 either, as it works fine here on Leap 42.3 (with the key stored system-wide). And I think in that case plasma-nm is not even involved in getting the password. So I'd more suspect a problem in NetworkManager itself. Could somebody maybe try with GNOME? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c5
--- Comment #5 from Wolfgang Bauer
I suppose it's not a general problem in Plasma 5.12 either, as it works fine here on Leap 42.3 (with the key stored system-wide).
But then, I have it set up as system connection ("Allow all users to connect"), so it connects during boot already, before I even login. IIRC, it did work fine (as user connection with the key stored in kwallet) with a Krypton LiveCD last weekend too though, but I'm not completely sure at the moment. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c6
--- Comment #6 from Frank Kruger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Frank Kruger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c7
--- Comment #7 from Wolfgang Bauer
+ Fix libnm secret agent asynchronous initialization.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c8
--- Comment #8 from Robby Engelmann
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c9
--- Comment #9 from Frank Kruger
I had the hope, but unfortunately not.
I can confirm that the issue remains with NM 1.10.4. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c10
--- Comment #10 from Frank Kruger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c11
--- Comment #11 from Frank Kruger
I had the hope, but unfortunately not.
Can you confirm that the issue appears only after first login to the KDE desktop? After suspend/hibernate it works as expected. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c12
Mykola Krachkovsky
(In reply to Robby Engelmann from comment #8)
I had the hope, but unfortunately not.
Can you confirm that the issue appears only after first login to the KDE desktop? After suspend/hibernate it works as expected.
Confirm. After suspend auto connecting works fine. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Tom Wroblewski
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c13
Fabian Vogt
From what I can tell it's a race condition on login. When NM notices that there is a new session (through pam_systemd and logind), it tries to activate all connections immediately.
At this point the user is not even logged in (sddm just finished the PAM stuff) and nothing is up yet. NM keeps trying multiple times, but all of those happen practically without delay, so the last attempt is made even before the X session/wayland compositor is running, so NM is obviously unable to connect to anything. In this case it needs to wait for the agent provided by the networkmanagement kded module which is started in parallel to plasmashell. IMO this is a NM issue, it needs to actually give the agent a chance to start up. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c14
--- Comment #14 from Robby Engelmann
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c15
--- Comment #15 from Frank Kruger
I can reproduce this issue.
From what I can tell it's a race condition on login. When NM notices that there is a new session (through pam_systemd and logind), it tries to activate all connections immediately.
At this point the user is not even logged in (sddm just finished the PAM stuff) and nothing is up yet.
NM keeps trying multiple times, but all of those happen practically without delay, so the last attempt is made even before the X session/wayland compositor is running, so NM is obviously unable to connect to anything.
In this case it needs to wait for the agent provided by the networkmanagement kded module which is started in parallel to plasmashell.
IMO this is a NM issue, it needs to actually give the agent a chance to start up.
Seems to be a race condition. In fact, using 'systemctl restart NetworkManager' after login and it connects automatically, as expected. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
David Chute
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Arjen de Korte
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Dominique Leuenberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Dominique Leuenberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c24
Dominique Leuenberger
I can confirm that this patch does not solve the issue.
Pity, but thanks for testing. Can we please get a log file of NetworkManaer with log level=TRACE ? To enable, adjust /etc/NetworkManager/NetworkManager.conf and add:
[logging] level=TRACE
Thanks -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c25
Fabian Vogt
(In reply to Frank Kruger from comment #23)
I can confirm that this patch does not solve the issue.
Pity, but thanks for testing.
It appears to me like the failure mode changed - it no longer complains about not reaching the agent anymore. I assume that's caused by https://github.com/NetworkManager/NetworkManager/commit/78ef571972aa3bf81b28...
Can we please get a log file of NetworkManaer with log level=TRACE ?
Full journal of playing around in a VM attached - except for the first connection (no secret required yet) no autoconnect worked. Note that somewhere in the middle I installed NM 1.10.5-dev, but it made no difference. I also don't see any difference for system wide or per user connections. The important parts (system wide connection): - On NM start: Mär 02 21:24:51 localhost.localdomain NetworkManager[3392]: <debug> [1520022291.7605] settings-connection[0x55f639447360,23b03485-8ce9-4ef5-8860-bff9edf54ac3]: (802-1x:0x7f9f68005de0) secrets request error: No agents were available for this request. Mär 02 21:24:51 localhost.localdomain NetworkManager[3392]: <warn> [1520022291.7605] device (ens3): No agents were available for this request. - After login: Mär 02 21:25:18 localhost.localdomain plasmashell[3534]: org.kde.plasmaquick: New Applet "Netzwerke" with a weight of 62 Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8872] agent-manager: req[0x55f639547090, :1.146/org.kde.plasma.networkmanagement/1000]: requesting permissions Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8872] auth: call[17]: CheckAuthorization(org.freedesktop.NetworkManager.wifi.share.protected), subject=unix-process[pid=3495, uid=1000, start=155638] Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8873] auth: call[18]: CheckAuthorization(org.freedesktop.NetworkManager.wifi.share.open), subject=unix-process[pid=3495, uid=1000, start=155638] Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8919] auth: call[17]: CheckAuthorization succeeded: (is_authorized=0, is_challenge=1) [...] Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8955] auth: call[18]: CheckAuthorization succeeded: (is_authorized=0, is_challenge=1) Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8956] agent-manager: req[0x55f639547090, :1.146/org.kde.plasma.networkmanagement/1000]: agent registered Mär 02 21:25:18 localhost.localdomain NetworkManager[3392]: <debug> [1520022318.8957] policy: re-enabling autoconnect for all connections (only clear no-secrets flag) Then nothing happens. I'd expect NM to enable the ens3 connection after that. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c26
--- Comment #26 from Frank Kruger
(In reply to Frank Kruger from comment #23)
I can confirm that this patch does not solve the issue.
Pity, but thanks for testing.
Can we please get a log file of NetworkManaer with log level=TRACE ?
To enable, adjust /etc/NetworkManager/NetworkManager.conf and add:
[logging] level=TRACE
Please find enclosed the log file. By the way, NetworkManager from http://download.opensuse.org/repositories/home:/dimstar:/branches:/GNOME:/Fa... does not change anything related to this bug. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c27
--- Comment #27 from Mykola Krachkovsky
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c28
--- Comment #28 from Mykola Krachkovsky
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c29
--- Comment #29 from Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Dominique Leuenberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c30
--- Comment #30 from Frank Kruger
Created attachment 762586 [details] [PATCH] Fix setting the autoconnect block reason if no agents registered
I debugged it a bit and I think I found the issue. NM didn't set the right flag anymore when a connection fails because of no registered agents. Patch attached, test package available on https://build.opensuse.org/package/show/home:Vogtinator:branches:GNOME: Factory/NetworkManager
The patch solves the issue for me, NM works as expected. Thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c31
--- Comment #31 from Frank Kruger
(In reply to Fabian Vogt from comment #29)
Created attachment 762586 [details] [PATCH] Fix setting the autoconnect block reason if no agents registered
I debugged it a bit and I think I found the issue. NM didn't set the right flag anymore when a connection fails because of no registered agents. Patch attached, test package available on https://build.opensuse.org/package/show/home:Vogtinator:branches:GNOME: Factory/NetworkManager
The patch solves the issue for me, NM works as expected. Thanks!
I was too optimistic/fast. In fact, the issue is solved after a reboot, but is still there after logout/login. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c32
Fabian Vogt
(In reply to Frank Kruger from comment #30)
(In reply to Fabian Vogt from comment #29)
Created attachment 762586 [details] [PATCH] Fix setting the autoconnect block reason if no agents registered
I debugged it a bit and I think I found the issue. NM didn't set the right flag anymore when a connection fails because of no registered agents. Patch attached, test package available on https://build.opensuse.org/package/show/home:Vogtinator:branches:GNOME: Factory/NetworkManager
The patch solves the issue for me, NM works as expected. Thanks!
I was too optimistic/fast. In fact, the issue is solved after a reboot, but is still there after logout/login.
Hm. It's possible that the upstream commit introducing the bug has yet another bug that it doesn't consider the removal of agents correctly. I'll try to look at that, can you upload a new set of logs? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c33
--- Comment #33 from Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c34
--- Comment #34 from Frank Kruger
Created attachment 762589 [details] Fix logic error for race condition detection
(The commit I'm talking about is https://github.com/NetworkManager/NetworkManager/commit/ e2c8ef45ac9fba8d4f5722ab10831bf42085a110.patch btw)
I think there is a logic error in the detection of the race condition. The attached patch should fix that and as it gets rid of the magic constant the other patch isn't necessary anymore (but still correct IMO, so not superseded).
Test package available at the same location (version 1.10.4-335)
Please find enclosed the log file for NM 1.10.4-335. After logout/login I first get the error message "no password provided/wlan deactivated", but then kwallet opens, asks for the password and the connection is established. So it almost works as expected. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Frank Kruger
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c35
--- Comment #35 from Fabian Vogt
Created attachment 762590 [details] NM 1.10.4-335 Log
(In reply to Fabian Vogt from comment #33)
Created attachment 762589 [details] Fix logic error for race condition detection Test package available at the same location (version 1.10.4-335)
Please find enclosed the log file for NM 1.10.4-335. After logout/login I first get the error message "no password provided/wlan deactivated", but then kwallet opens, asks for the password and the connection is established. So it almost works as expected.
That appears to be a different issue and should be filed separately: NM sets the connection status to failed when it tries to enable the connection before the agent is registered. At that point the applet got started and shows the message. So I consider the patch to be working as expected. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672#c36
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Jose Sanz
http://bugzilla.opensuse.org/show_bug.cgi?id=1079672
Tom Wroblewski
participants (1)
-
bugzilla_noreply@novell.com