Ubuntu Server 20.04 Connected to WIFI but network no available

I am having a serious issue for a while now, and I haven't been able to fix it, I can't find a proper solution. I am using a Raspberry PI 4 with Ubuntu Server 20.04 and installed ubuntu desktop. Right now I have Wifi access, but when I try to connect to another wifi network it says "Wifi Unavailable" and the Visible Networks panel loads indefinitely without finding any network. Also, when I choose the select network option it says "No networks"

The first time a installed the OS I set the necessary configuration in /etc/netplan/50-cloud-init.yaml

network:
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  version: 2
  wifis:
    wlan0:
      dhcp4: true
      dhcp6: true
      optional: true
      access-points:
        "home network":
           password: "password"

Then, I used these commands:

sudo netplan apply
sudo reboot

It seemed everything was fine, right now I have wifi access and can ping without any issues at all. The problem is that some commands show me that the wlan0 device is not working. When I use:

journalctl -e | grep NetworkManager

I get:

<error> [1632057111.4048] sup-iface[0xaaaae2bf5cd0,wlan0]: error adding interface: wpa_supplicant couldn't grab this interface.
<info>  [1632057121.3969] device (wlan0): supplicant interface state: starting -> down
<info>  [1632057121.3971] device (wlan0): supplicant interface keeps failing, giving up

Also If I use:

nmcli d

I get:

wlan0 wifi unavailable

If I try to create a hotspot for the raspberry it says that wlan0 is unavailable, but I don't understand that since I am already connected and have wifi access!

Any ideas of what I can do?

EDIT 1: I tried changing the renderer to NetworkManager but this didn't work either.


I am using a Raspberry PI 4 with Ubuntu Server 20.04 and installed ubuntu desktop.

Servers usually use netplan to manage networking. Desktop installs use Network Manager. You have netplan all set up nicely but want Network Manager to work properly.

I suggest that you amend your netplan file to:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Follow with:

sudo netplan generate
sudo netplan apply
sudo service NetworkManager restart

You should now be able to select and connect to any network at the NM icon at the top right of your desktop: https://nfgk.files.wordpress.com/2013/08/network-manager.jpg?w=540