5

i've been googling this issue for the better part of a day with no success. i'm tring to connect to wifi using nmcli. i've got a connection created using my wifi device:

% nmcli c
NAME                UUID                                  TYPE             DEVICE  
Wired connection 1  89fdde8a-22e1-3c03-8b36-8299f2e95d43  802-3-ethernet   enp0s10 
Wi-Fi connection 1  826416aa-2030-4984-9685-8962857f59d9  802-11-wireless  --      
% nmcli c show "Wi-Fi connection 1"
connection.id:                          Wi-Fi connection 1
connection.uuid:                        826416aa-2030-4984-9685-8962857f59d9
connection.interface-name:              wlp3s0
...

but when i try to bring it up i get this:

% sudo nmcli c up "Wi-Fi connection 1"
Error: Connection activation failed: No suitable device found for this connection.

since "nmcli connection show" clearly shows that connection being associated with wlp3s0, i can only assume the reason is that NetworkManager thinks the device is "unavailable"

% nmcli d 
DEVICE   TYPE      STATE        CONNECTION         
enp0s10  ethernet  connected    Wired connection 1 
wlp3s0   wifi      unavailable  --                 
lo       loopback  unmanaged    --

most people's issues with this seem to be solved with "rfkill unblock wifi". however, even after doing this, and restarting NetworkManager, i'm still unable to connect to wifi...

% rfkill unblock wifi
% rfkill list
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
% sudo systemctl restart NetworkManager
% nmcli d
DEVICE   TYPE      STATE        CONNECTION 
enp0s10  ethernet  connected    enp0s10    
wlp3s0   wifi      unavailable  --         
lo       loopback  unmanaged    --
% sudo nmcli c up "Wi-Fi connection 1"
Error: Connection activation failed: No suitable device found for this connection.

in /var/log/syslog, i see these interesting lines:

Dec 30 15:55:24 providence NetworkManager[3851]: <info>  [1483142124.5273] (wlp3s0): using nl80211 for WiFi device control
Dec 30 15:55:24 providence NetworkManager[3851]: <info>  [1483142124.5299] manager: (wlp3s0): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/0)
Dec 30 15:55:24 providence kernel: [ 1498.556769] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Dec 30 15:55:24 providence NetworkManager[3851]: <info>  [1483142124.5359] device (wlp3s0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

what the heck does "reason 'managed'" mean??

i've also tried disabling power management for wifi in NetworkManager by dropping this into /etc/NetworkManager/conf.d/:

[connection]
wifi.powersave = 2

upon rebooting, the interface is blocked again...

i must be missing something really obvious? because this is crazy...

ps. it's worth pointing out that this gives me the expected list of wifi networks in range, seemingly indicating that the hardware is fine:

% sudo ifconfig wlp3s0 up
% sudo iwlist wlp3s0 scan
...
jayekub
  • 59

3 Answers3

9

I had the same problem, same output from all the commands, and the log shows the same errors. Running # iwlist wlp4s0 scanning (my wifi interface is that instead of your wlp3s0), shows all networks as if the wifi was working properly.

If # rfkill list shows blocked you'll need to toggle it such that its unblocked. Then, running # /etc/init.d/networking restart && dhclient should enable the wifi network, and it should be visible by nmcli now.

$ nmcli radio should show:

WIFI-HW  WIFI      WWAN-HW  WWAN    
enabled  disabled  enabled  enabled 

Now, nmcli provides a way to enable that wifi radio, via the command $ nmcli radio wifi on - after this, your interface should work!

Hopefully this works for anyone reading this, none of the other solutions seemed to fix it for me.

1

WPA Supplicant and NetworkManager may conflict if they both attempt to manage the same interface. Try to disable wpa_supplicant with:

sudo pkill wpa_supplicant
sudo systemctl disable wpa_supplicant.service

Now try:

nmcli d

It should show:

DEVICE          TYPE      STATE         CONNECTION                    
wlp3s0          wifi      connected     myconnection

instead of:

STATE: unavailable

Hope this will help you!

stalaun
  • 11
0

I had a similar issue and modified a script from this post:

The key was to:

nmcli radio wifi on
sleep 2
nmcli c up <your SSID>