You are not logged in.

#1 2018-01-13 02:31:44

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

NetworkManager (KDE) won't connect to any network automatically

Hello. Recently I've noticed that NetworkManager doesn't automatically connect to wireless on boot. It does on wake from suspend, though.
I can see the wireless network; turning wifi on and off doesn't make it work. Once I've manually connected through the GUI, it always works!
Relevant journalctl:


Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9439] policy: auto-activating connectio n'mynetworkSSID'
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9459] device (wlp4s0): Activation: starting connection 'mynetworkSSID' (e77381c8-515a-4003-a3f4-a1ac682a27c8)
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9470] device (wlp4s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9474] manager: NetworkManager state is now CONNECTING
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9499] device (wlp4s0): set-hw-addr: reset MAC address to F0:D5:BF:CA:EC:11 (preserve)
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9759] device (wlp4s0): supplicant interface state: inactive -> disabled
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9775] device (wlp4s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9780] device (wlp4s0): Activation: (wifi) access point 'mynetworkSSID' has security, but secrets are required.
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9780] device (wlp4s0): Activation: (wifi) access point 'mynetworkSSID' has security, but secrets are required.
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9782] device (wlp4s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jan 12 18:30:14 copernicus NetworkManager[577]: <warn>  [1515799814.9801] device (wlp4s0): No agents were available for this request.
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9802] device (wlp4s0): state change: need-auth -> failed (reason 'no-secrets', sys-iface-state: 'managed')
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9806] manager: NetworkManager state is now DISCONNECTED
Jan 12 18:30:14 copernicus NetworkManager[577]: <warn>  [1515799814.9814] device (wlp4s0): Activation: failed for connection 'mynetworkSSID'
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9819] device (wlp4s0): supplicant interface state: disabled -> inactive
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9847] device (wlp4s0): set-hw-addr: set MAC address to 56:BD:FF:38:17:28 (scanning)
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9926] device (wlp4s0): supplicant interface state: inactive -> disabled
Jan 12 18:30:14 copernicus NetworkManager[577]: <info>  [1515799814.9930] device (wlp4s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jan 12 18:30:15 copernicus NetworkManager[577]: <info>  [1515799815.0389] device (wlp4s0): supplicant interface state: disabled -> inactive

Then this continues for some time, until I manually connect. Any ideas?

Offline

#2 2018-01-13 12:29:38

seth
Member
Registered: 2012-09-03
Posts: 7,240

Re: NetworkManager (KDE) won't connect to any network automatically

You either have multiple network managing services running

systemctl list-unit-files --state=enabled
systemctl list-units | grep -iE '(net|dhcp|wpa|conn|wicd)'

or face https://bbs.archlinux.org/viewtopic.php?id=232311

Offline

#3 2018-01-13 12:33:04

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

Re: NetworkManager (KDE) won't connect to any network automatically

I only have:
NetworkManager-dispatcher.service           enabled
NetworkManager.service                             enabled

So no conflict there. I'll try "nmcli connection modify "mynetworkSSID" wifi-sec.wps-method disabled" and reboot.
Thanks!

Offline

#4 2018-01-13 12:42:09

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

Re: NetworkManager (KDE) won't connect to any network automatically

No dice - which makes sense, because I didn't get any error notifications in my tray, as described in that post.

Offline

#5 2018-01-15 19:00:20

pentix
Member
Registered: 2016-03-29
Posts: 9

Re: NetworkManager (KDE) won't connect to any network automatically

It could be a KDE / KNetworkManager specific thing, I experienced the same issues in the past days...

Offline

#6 2018-01-15 19:43:36

seth
Member
Registered: 2012-09-03
Posts: 7,240

Re: NetworkManager (KDE) won't connect to any network automatically

Stupid question: is kwallet running while it's failing?

Offline

#7 2018-01-16 00:23:53

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

Re: NetworkManager (KDE) won't connect to any network automatically

Presumably; systemd journal tells me that kwallet handled the sddm login; and checking processes it is running.
Perhaps there is a permissions issue on accessing my secrets?

"Activation: (wifi) access point 'mynetworkSSID' has security, but secrets are required."

Offline

#8 2018-01-16 08:37:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,710

Re: NetworkManager (KDE) won't connect to any network automatically

There's still some form of race between when NetworkManager attempts to connect and when kwallet is opened by SDDM, the thread seth linked to is marked as [SOLVED] and the commit mentioned in the linked bugreport in that thread has landed in the NetworkManager package, but it doesn't seem to be a complete fix. FWIW it isn't as reproducible on my setup as it used to be, I'm not entirely sure on what condition the connection fails. I presume that not being quick enough with your login might make kwallet miss the NM connection window. Though NM is supposed to wait iirc. There recently has been this commit but I suck at interpreting our version numbers and am not sure if it has landed in our package yet

Online

#9 2018-03-07 00:36:49

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

Re: NetworkManager (KDE) won't connect to any network automatically

Just an update: a few days ago I noticed that this issue seems to have gone away; unfortunately I rebooted today and it seems to have come back.
Maybe certain situations change the race conditions?

Offline

#10 2018-03-07 00:50:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,710

Re: NetworkManager (KDE) won't connect to any network automatically

The nature of race conditions is that it might happen that the correct order is hit, or not. So it's up to chance if it works out.

The present situation is: kwallet starts -> NM scans for connection and requests secrets for the known connection -> success or NM scans for connection, requests secrets, no secret provider, give up -> kwallet starts -> NM only reattempts for secrets on explicit connection request

Online

#11 2018-03-07 00:51:39

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

Re: NetworkManager (KDE) won't connect to any network automatically

That makes sense.
So what should I do? I could create a pause during startup, I suppose. Or just wait?

Offline

#12 2018-03-07 10:21:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,710

Re: NetworkManager (KDE) won't connect to any network automatically

A simple workaround without resorting to such hacks would be to declare your connection as a "system connection" (and maybe available to all users, not sure if that one is necessary though) within the connection settings. That will make NM handle the secrets itself, though that will make the passphrase stored plaintext, though in a root-only readable directory. For the actual issue that is a bug in NM and should probably be fixed there. I'm not sure if there's currently an active bug report I might check later tonight.

There is https://bugzilla.gnome.org/show_bug.cgi?id=794014 even has a patch, not on my machine might test this otherwise.

Last edited by V1del (2018-03-07 10:34:11)

Online

#13 2018-03-07 11:38:12

yochaigal
Member
From: Boston
Registered: 2011-02-06
Posts: 202

Re: NetworkManager (KDE) won't connect to any network automatically

Yes, marking the password as unencrypted seems to have fixed it. My machine is LUKS encrypted anyways, so it isn't a huge deal.
Thanks

Offline

Board footer

Powered by FluxBB