A while back, I wrote about installing NetworkManager if NextDNS activate fails to work.
Only… I realised that for some reason on Raspberry Pi (4), WiFi stopped working with the following errors:
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.2204] device (wlan0): state change: config -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7525] device (wlan0): set-hw-addr: set MAC address to 92:F3:ED:C2:8F:9B (scanning)
Feb 17 11:55:02 tyr NetworkManager[449]: <warn> [1676631302.7559] device (wlan0): Activation: failed for connection 'superuser.one'
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7562] device (wlan0): supplicant interface state: scanning -> disconnected
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7562] device (p2p-dev-wlan0): supplicant management interface state: scanning -> disconnected
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7577] device (wlan0): supplicant interface state: disconnected -> interface_disabled
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7578] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> interface_disabled
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7579] device (wlan0): supplicant interface state: interface_disabled -> disconnected
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7579] device (p2p-dev-wlan0): supplicant management interface state: interface_disabled -> disconnected
Feb 17 11:55:02 tyr NetworkManager[449]: <info> [1676631302.7585] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
The WiFi SSID and password (wpa_supplicant
) never changed, so I wasn’t sure what it was. However, as most Pi’s are wired I didn’t pay much attention, until today.
As I had one RPi where nextdns activate
worked fine, without NetworkManager installed, and where WiFi worked, I figured there was something evil about NetworkManager (= breaks my WiFi) and NextDNS not actually needing it…
I reverted my changed from my previous post (and removed some extra stuff that was not needed in my case, YMMV):
apt purge -y network-manager dnsmasq-base resolvconf modemmanager ppp ; apt install -y powermgmt-base openresolv ; apt autoremove -y
The powermgmt-base, and modemmanager, ppp parts are likely not needed, but this is just a copy and paste of what I did.
Reboot… And WiFi worked again. However, nextdns activate
would still throw an error:
# nextdns activate
Error: NetworkManager resolver management: exit status 5
Going through the source code (yay for open-source) I noticed:
var networkManagerFile = "/etc/NetworkManager/conf.d/nextdns.conf"
That file indeed existed on both RPis that had the activate
issue.
I ran the following command…
rm /etc/NetworkManager/conf.d/nextdns.conf
But that still gave the same error. But as I had purged the entire NetworkManager, I didn’t need its lingering config files… So, why not rid ourselves of everything:
rm -r /etc/NetworkManager
And tada… Now activate
works fine:
tyr ~ # nextdns activate
tyr ~ #
Go figure ¯\_(ツ)_/¯
Leave a Reply…