Auto-connect wifi network fails / manual connect works

Hi everyone,

I’m stuck with this.
Any help will be appreciated.
Thanks in advance.
Denis

OBJECTIVE
automatically join a wifi network at boot

SYSTEM INFO
cat /etc/issue => Ubuntu 16.04.1 LTS
uname -r => 3.14.65-78
GUI = MATE
system hardware = odroid C2
WiFi hardware= Odroid WiFi Module 0
currently working through x11vnc session after login screen with password
the system is also connected via ethernet

WHAT I HAVE DONE
I followed instructions from bdushok on this page:
https://ubuntu-mate.community/t/automatic-wifi-connection-on-startup/3216

I confirm that in the Network Connection Editor, the following boxes are checked:
“automatically connect to this network”
“all users may connect to this network”

OUTCOME:
the system fails to automatically join the WiFi network.
Yet once logged in with a standard user, I can successfully connect from the GUI

LOGS
tail -500 /var/log/syslog | grep networkmanager (edited to remove private details)
at 19:06:38 you have a failed automatic attempt
at 21:19:13 you have a successful manual attempt
As you can see, the sequence is not quite the same…


Sep 10 19:06:37 computer_name NetworkManager[3905]: <info>  [1473527197.7967] policy: auto-activating connection 'wifi_network_id'
Sep 10 19:06:37 computer_name NetworkManager[3905]: <info>  [1473527197.8011] device (wifi_interface_id): Activation: starting connection 'wifi_network_id' (511c4447-2dc2-4234-b7de-fc875f0b08a4)
Sep 10 19:06:37 computer_name NetworkManager[3905]: <info>  [1473527197.8021] device (wifi_interface_id): state change: disconnected -> prepare (reason 'none') [30 40 0]
Sep 10 19:06:37 computer_name NetworkManager[3905]: <info>  [1473527197.8055] device (wifi_interface_id): state change: prepare -> config (reason 'none') [40 50 0]
Sep 10 19:06:37 computer_name NetworkManager[3905]: <info>  [1473527197.8073] device (wifi_interface_id): Activation: (wifi) access point 'wifi_network_id' has security, but secrets are required.
**Sep 10 19:06:37 computer_name NetworkManager[3905]: <info>  [1473527197.8074] device (wifi_interface_id): state change: config -> need-auth (reason 'none') [50 60 0]**
**Sep 10 19:06:38 computer_name NetworkManager[3905]: <warn>  [1473527198.6930] device (wifi_interface_id): No agents were available for this request.**
**Sep 10 19:06:38 computer_name NetworkManager[3905]: <info>  [1473527198.6931] device (wifi_interface_id): state change: need-auth -> failed (reason 'no-secrets') [60 120 7]**
**Sep 10 19:06:38 computer_name NetworkManager[3905]: <warn>  [1473527198.6950] device (wifi_interface_id): Activation: failed for connection 'wifi_network_id'**
Sep 10 19:06:38 computer_name NetworkManager[3905]: <info>  [1473527198.6986] device (wifi_interface_id): state change: failed -> disconnected (reason 'none') [120 30 0]
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.2643] device (wifi_interface_id): Activation: starting connection 'wifi_network_id' (511c4447-2dc2-4234-b7de-fc875f0b08a4)
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.2661] audit: op="connection-activate" uuid="511c4447-2dc2-4234-b7de-fc875f0b08a4" name="wifi_network_id" pid=4709 uid=1001 result="success"
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.2685] device (wifi_interface_id): state change: disconnected -> prepare (reason 'none') [30 40 0]
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.2702] device (wifi_interface_id): state change: prepare -> config (reason 'none') [40 50 0]
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.2714] device (wifi_interface_id): Activation: (wifi) access point 'wifi_network_id' has security, but secrets are required.
**Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.2715] device (wifi_interface_id): state change: config -> need-auth (reason 'none') [50 60 0]**
**Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4249] device (wifi_interface_id): state change: need-auth -> prepare (reason 'none') [60 40 0]**
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4318] device (wifi_interface_id): state change: prepare -> config (reason 'none') [40 50 0]
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4328] device (wifi_interface_id): Activation: (wifi) connection 'wifi_network_id' has security, and secrets exist.  No new secrets needed.
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4331] Config: added 'ssid' value 'wifi_network_id'
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4331] Config: added 'scan_ssid' value '1'
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4332] Config: added 'key_mgmt' value 'WPA-PSK'
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4333] Config: added 'psk' value '<omitted>'
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4483] sup-iface[0x724f80,wifi_interface_id]: config: set interface ap_scan to 1
Sep 10 21:19:13 computer_name NetworkManager[3905]: <info>  [1473535153.4896] device (wifi_interface_id): supplicant interface state: inactive -> scanning
Sep 10 21:19:14 computer_name NetworkManager[3905]: <info>  [1473535154.8333] device (wifi_interface_id): supplicant interface state: scanning -> authenticating
Sep 10 21:19:14 computer_name NetworkManager[3905]: <info>  [1473535154.8409] device (wifi_interface_id): supplicant interface state: authenticating -> associating
Sep 10 21:19:14 computer_name NetworkManager[3905]: <info>  [1473535154.8643] device (wifi_interface_id): supplicant interface state: associating -> associated
Sep 10 21:19:15 computer_name NetworkManager[3905]: <info>  [1473535155.2509] device (wifi_interface_id): supplicant interface state: associated -> group handshake
Sep 10 21:19:18 computer_name NetworkManager[3905]: <info>  [1473535158.2338] device (wifi_interface_id): supplicant interface state: group handshake -> completed
Sep 10 21:19:18 computer_name NetworkManager[3905]: <info>  [1473535158.2339] device (wifi_interface_id): Activation: (wifi) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'wifi_network_id'.

----------


_**CONFIGURATION FILES**_
**/etc/NetworkManager/system-connections/wifi_network_id**
(edited to remove private details)

----------
[connection]
id=wifi_network_id
uuid=511c4447-2dc2-4234-b7de-fc875f0b08a4
type=wifi
permissions=
secondaries=
timestamp=1473519313

[wifi]
mac-address=7C:DD:90:AD:65:8F
mac-address-blacklist=
mac-address-randomization=0
mode=infrastructure
seen-bssids=32:1A:3D:AC:8B:F8;
ssid=wifi_network_id
security=wifi-security

[wifi-security]
group=
key-mgmt=wpa-psk
pairwise=
proto=
psk-flags=1
psk=<removed_for_obvious_reasons>

[ipv4]
dns-search=
method=auto

[ipv6]
dns-search=
ip6-privacy=0
method=ignore

----------

**/etc/wap_supplicant/wpa_supplicant.conf**
**/etc/wpa_supplicant.conf**
(edited to remove private details)
Different sources on the web placed this file either in /etc or in /etc/wpa_supplicant
I copied it in both places (just in case)

----------


ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="wifi_network_id"
scan_ssid=0
psk=<removed for obvious reasons>
key_mgmt=WPA-PSK
proto=WPA
pairwise=CCMP
group=CCMP
}

----------

Hi
There’s a major update to networking in the pipes for 16.04.1, it’s being pushed to users these days.
https://launchpad.net/ubuntu/+source/network-manager-applet/+changelog
Are you getting the updates on that platform?

I noticed the following behavior on x86_64:
Network Connections don’t activate automatically on boot.
However, they do connect automatically once I log in.
Edit: never mind that, I had forgotten to check the “all user may connect to this network” in the connection settings.

Hi,

I did a apt-get upgrade but this must have messed something as I cannot reach the Odroid now via ssh or vnc. Updates to this thread are pending delivery of a HDMI-VGA cable.
D.