4

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
  • 49
  • 1
  • 1
  • 3
  • Is there any change with the ethernet detached? – chili555 Dec 31 '16 at 00:12
  • Do you have an entry for wlp3s0 in /etc/network/interfaces? – steeldriver Dec 31 '16 at 00:15
  • @chili555 this is a headless machine in a closet, so it'd be difficult to test that...might try if i can't get anywhere else – jayekub Dec 31 '16 at 00:19
  • @steeldriver no, but there's also no entry in there for my ethernet interface and that's working fine – jayekub Dec 31 '16 at 00:20
  • @jayekub that's all good, I was checking that there was **not** an entry (which might prevent network-manager from managing the interface itself) – steeldriver Dec 31 '16 at 00:26
  • I had the same issue. It was a network driver interface fault. I solved updating the driver interface (a RALink MT7601 in my case). You can find everything here: https://launchpad.net/~thopiekar/+archive/ubuntu/mt7601 – Gianluca Oct 31 '18 at 06:21
  • I had a similar problem for which restarting `wpa_supplicant` worked. – Milind R Apr 28 '21 at 17:34

3 Answers3

8

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.

  • Thanks!! It took so long to figure out why WiFi was not working on my work notebook, and this was the answer. I still don't understand why there is this switch in addition to `rfkill`, but I finally have working WiFi. – jplatte Oct 31 '19 at 14:00
0

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!

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
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>
healthybodhi
  • 101
  • 1