Here are steps to check and solve the problem for NetworkManager under Ubuntu Linux when you get the “device is strictly unmanaged” message.
Step 1 - Check for netplan settings
Make sure renderer is NetworkManager in the /etc/netplan/:
ls /etc/netplan/
# if config file is 01-network-manager-all.yaml
cat /etc/netplan/01-network-manager-all.yaml
Check for /etc/NetworkManager/NetworkManager.conf file too:
sudo cat /etc/NetworkManager/NetworkManager.conf
Step 2 - List managed devices
Type:
nmcli device
Note down unmanaged devices and their type, such as wifi, ethernet, wireguard, etc.
Step 3 - Check /etc/NetworkManager/conf.d/ directory
Make sure your device is not marked as unmanaged-devices
sudo grep -ri unmanaged-devices /etc/NetworkManager/conf.d/
sudo grep -ri unmanaged-devices /etc/NetworkManager/
Step 4 - Check for /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf file
sudo vim /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
Make sure Ethernet, Wifi, WireGuard all set as exception. Here is how it looks when ethernet and wireguard disabled:
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma
Add ethernet by appending to the unmanaged-devices list. For example:
except:type:ethernet
For wireguard:
except:type:wireguard
Here is how it should look:
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma,except:type:ethernet,except:type:wireguard
Finally reload config:
sudo systemctl reload NetworkManager.service
Verify it:
nmcli device
nmcli connection show
Turn networking off and on again:
nmcli networking off
nmcli networking on
Test it:
nmcli connection up wg0
nmcli connection up 'Wired connection 1'