1

When i try to connect to any wireless networks I get:

Failed to add/activate connection (32) ... -1 Unknown

I have already many SO answers, such as this one rebuilding the PolicyKit directory. This Ubuntu 14.04 LTS ultrathin Dell XPS has no ethernet port so this has not been easy to debug and I cannot run system updates unless you have ways to make that work over usb?

My /etc/network/interfaces:

auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp

Also, running sudo /etc/init.d/networking restart says

stop: Job failed while stopping start: Job is already running: networking

I tried all these in as well with no success:

sudo modprobe -r iwlwifi && sudo modprobe iwlwifi [until i run this i can see no network ssids]
sudo service network-manager restart
rfkill unblock all
sudo rm /etc/udev/rules.d/70-persistent-net.rules
sudo ifdown wlan0 && sudo ifup -v wlan0

the last line above produces this..

$sudo ifdown wlan0 && sudo ifup -v wlan0
ifdown: waiting for lock on /run/network/ifstate.wlan0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/88:53:2e:99:36:8f
Sending on   LPF/wlan0/88:53:2e:99:36:8f
Sending on   Socket/fallback
Configuring interface wlan0=wlan0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1

dhclient -1 -v -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases wlan0    
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/88:53:2e:99:36:8f
Sending on   LPF/wlan0/88:53:2e:99:36:8f
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18 (xid=0x92ac315a)
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15 (xid=0x92ac315a)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openvpn
run-parts: executing /etc/network/if-up.d/postfix
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
$

enter image description here

2

Your /etc/network/interfaces file is faulty. Since Network Manager is running, it is unnecessary to declare wlan0 in that file. Please return it to default:

auto lo
iface lo inet loopback

Reboot and let us hear your report.

If this is ineffective, double-check all your settings in Network Manager. Click the icon and select Edit Connections. Be certain that your WiFi connection is set to Client mode. Also, check that under IPv4 settings, the method is set to Automatic (DHCP). If you've made any changes, restart NM:

sudo service network-manager restart

Is there any improvement? If not, let's return to /etc/network/interfaces. Set it us as follows:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-ssid <your_network_ssid>
wpa-psk <your_secret_key>

Reboot. Did you connect? If so, I will next edit this answer to suggest that you purge and reinstall Network Manager.

We see this in your log:

Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore Dec 13 16:48:20 eataylor-Dell-System-XPS-L321X wpa_supplicant[4530]: Failed to initialize control interface '/var/run/wpa_supplicant'.#012You may have another wpa_supplicant process already running or the file was#012left by an unclean termination of wpa_supplicant in which case you will need#012to manually remove this file before starting wpa_supplicant again.

Please do:

sudo rm /var/run/wpa_supplicant/wlan0

Reboot. Check again:

sudo ifdown wlan0 && sudo ifup -v wlan0

Any improvement?

This is a summary of the steps we took in chat.

After you remove /var/run/wpa_supplicant/wlan0, connect to your phone's hotspot as your router seems troublesome. Then do:

sudo apt-get purge network-manager*
sudo apt-get install --reinstall wpasupplicant
sudo apt-get install network-manager network-manager-gnome

Comment out the wlan0 lines in /etc/network/interfaces and reboot. You connected perfectly.

  • even if embarrassed i was very excited by the simplicity of this answer, but did that and still get Failed to add/activate connection. Any other ideas @chili555 ? thank you. – E.A.T Dec 13 '16 at 10:45
  • Please see my edit above in a few minutes. – chili555 Dec 13 '16 at 13:15
  • My Network Connections list is empty. When I try to add on, select Wi-Fi, and give it any SSID/security, I get Connection add failed - thank you again @chili555 – E.A.T Dec 13 '16 at 23:37
  • By using /etc/network/interfaces we are bypassing Network Manager as we suspect it has a problem. What is the result of: sudo ifdown wlan0 && sudo ifup -v wlan0 – chili555 Dec 14 '16 at 0:38
  • please see the update to my question for the response to the ifdown/up. (it took a very long time to lock, but eventually finished this that above) – E.A.T Dec 14 '16 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.