Failed to detect NetworkManager Service

My printer decided today to stop showing the web interface and when i checked on the kipper screen, it shows that it failed to detect network service. So now i can't view mainsail web interface nor i can SSH into my printer. I'm not sure how i managed to break the network as i properly shutdown klipper before turning the printer off and I always update Ratos first if available. Is there other way to fix this issue without reinstalling Ratos? I'm running latest Ratos 2.1 Thank you
No description
57 Replies
TheTik
TheTik14mo ago
klipperscreen broke/changed some stuff, if you do a search in here you'll see lots of posts. You should still be able to navigate to ratos.local from your computer or phone though
Yathani
YathaniOP14mo ago
I was able to initially access SSH through pi@ratos.local but then i reinstalled klipper screen and now even rato.local does not work 😅
The GP's
The GP's14mo ago
I have the exact same issue. If I unplug the screen and reboot the printer, the printer connects to my wifi. If I turn the printer on with the screen connected I get the same network manager issue and the printer doesn't connect. Network manager is installed and up to date aswell
blacksmithforlife
Network manager doesn't work with Rat-OS wifi @miklschmidt didn't you pin the specific version of klipper screen that works?
The GP's
The GP's14mo ago
So do we know why it's asking for it and why it's installed on my ratrig from a default install of ratos
blacksmithforlife
See the post by thetik above
The GP's
The GP's14mo ago
So are we saying in the newer versions of klipperscreen and we should revert back to an older version?
miklschmidt
miklschmidt14mo ago
Newest should work. I have no idea how klipperscreen affects network connectivity when NetworkManager is not available, that would be a klipperscreen bug. FWIW i can't reproduce that on my machines, but i'm running 2.1. Klipperscreen dropped support for everything but NetworkManager. We don't use NetworkManager, so the klipperscreen network panel doesn't work. That's intentional by the klipperscreen author (and i prefer it like this as it always killed the wpa-supplicant symlink before, imo you should not use it for networking, use the configurator). It should not kill your network connection though.
The GP's
The GP's14mo ago
So I'm completely up to date on ratos and all the other programmes. Still running 2.0.x version not 2.1 I know you mentioned the configurator, but where would this be fixed in that? Little lost in this as I don't use it for networking. On first boot I logged into ratos and gave it my wifi, screen came later. When screen is connected it works fine, but stops the printer connecting to WiFi. If I unplug it, it connects to my wifi
miklschmidt
miklschmidt14mo ago
That might be the issue. I believe klipperscreen force installed network manager at one point. If network manager exists, klipperscreen probably tries to start it, killing everything else in the process. You can try this:
ssh pi@ratos.local
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
sudo reboot now
ssh pi@ratos.local
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
sudo reboot now
I know you mentioned the configurator, but where would this be fixed in that?
Nothing about klipperscreen is fixed in the configurator, but the wifi configuration should be done through the configurator, just like instructed in the docs.
The GP's
The GP's14mo ago
Thinking about this, a while back I did have connection issues where I was able to see my router from the network tab on the screen and reconnected through that wonder if this caused it to use the screen for connection
miklschmidt
miklschmidt14mo ago
Yep this is bad sec
The GP's
The GP's14mo ago
OK, I understand this now. Will deleted network manager and rerun the wifi connection via ratos local. Cheers for your help
miklschmidt
miklschmidt14mo ago
Klipperscreen would have broken that functionality if you used that to connect to a network You can restore it like this:
ssh pi@ratos.local
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
ssh pi@ratos.local
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
The GP's
The GP's14mo ago
One of these problems, where it being sometimes working doesn't help debug the problem.
miklschmidt
miklschmidt14mo ago
indeed
The GP's
The GP's14mo ago
Should I only run this, or run this after uninstalling network manager Uninstalling
miklschmidt
miklschmidt14mo ago
first disable network manager:
ssh pi@ratos.local
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
ssh pi@ratos.local
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
then restore the symlink
ssh pi@ratos.local
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
ssh pi@ratos.local
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
Then reboot (that's what sudo reboot now does). That should restore the ratos configurator wifi setup functionality and stop klipperscreen from busting the wifi connection.
The GP's
The GP's14mo ago
Awesome. Thanks for you help on this. Been driving me mad
miklschmidt
miklschmidt14mo ago
You don't need the second ssh pi@ratos.local if you're already connected via ssh obviously, i just copy pasted the previous stuff 😄 Np, hopefully it works too.. 😅
The GP's
The GP's14mo ago
Haha. Yeah I understood that bit Ran the commands via shh, which has made it go to the ratos configurator, unfortunately it keeps on saying my credentials are invalid. Any clue why this maybe as its the correct password. I did see in the root directory on the sd card their is a wpa txt file I can manually add my credentials? Thinking I might start from scratch with ratos 2.1 and see if this fixes everything
Yathani
YathaniOP14mo ago
My Pi started a wifi with Ratos and when I tried to join the network to configure my home network, it says incorrect password for "raspberry". I think i will just reinstalled Ratos again at this point and I hope this issue won't come back again from klipper screen.
miklschmidt
miklschmidt14mo ago
did see in the root directory on the sd card their is a wpa txt file I can manually add my credentials?
That'll work yes, that's essentially what the configurator does.
unfortunately it keeps on saying my credentials are invalid
That means it can't save the password to the ratos-wpa-supplicant.txt file, most likely because the password isn't accepted by the wpa_passphrase command. Could be a special character thing for the SSID or Password, earlier versions of 2.0 didn't properly escape/quote the strings.
it says incorrect password for "raspberry"
Then you've somehow changed it, or you didn't enter it correctly?
miklschmidt
miklschmidt14mo ago
GitHub
RatOS/src/modules/hotspot/config at 2d118e8fa4d4d9f1cf1bdd128bd9df6...
The preconfigured Raspberry Pi image that makes it easy to run Klipper + Moonraker + Mainsail on your printer. - Rat-OS/RatOS
The GP's
The GP's14mo ago
That makes sense as my password for the WiFi does use special characters. I can access that file from the sd card, if I changed it in their and plug in my sd card would you think it would work? Don't particularly want to change my password as that's alot of updating other devices
miklschmidt
miklschmidt14mo ago
Yep that should work
Yathani
YathaniOP14mo ago
Then likely it got changed when i reinstalled klipper screen which prompt me to install Network Manager at the end. I clicked Yes thinking it will fix the issue but apeparently not
miklschmidt
miklschmidt14mo ago
Yeah that breaks everything
The GP's
The GP's13mo ago
Just to let you know, installed ratos 2.1 which had the same issue with special characters in my wifi password. Edited the wpa text file on the sd card and manually added my details under WPA and it works perfectly. Thanks for your help
miklschmidt
miklschmidt13mo ago
hmmm... that's annoying. Did the password written to the wpa file by the configurator look correct? Or did it not actually get that far?
The GP's
The GP's13mo ago
It wouldn't get that far as it said invalid credentials. I did try the normal way first then reverted to inputing them manually directly on the sd card. You need to take the sd card out and write it from your PC as that text file is locked while in the pi
miklschmidt
miklschmidt13mo ago
You need to take the sd card out and write it from your PC as that text file is locked while in the pi
Just sudo nano /boot/ratos-wpa-supplicant.txt. It's not locked it's just not modifiable by anyone but root 🙂 Can you construct a password using the problematic characters (that is obviously very different from your actual password) so i have something to test with?
The GP's
The GP's13mo ago
Ahh OK. That's my lack of knowledge on Linux. Other than that ratos 2.1 works beautifully. I won my printer from the formnext giveaway you did so hadn't gone through the configurator before. It's very well thought out
miklschmidt
miklschmidt13mo ago
Aah nice! congratulations on the win 🙂 Appreciate it
The GP's
The GP's13mo ago
So my password just has an @ in it. The rest is just normal upper and lower case letters
miklschmidt
miklschmidt13mo ago
got it, thank you, will look into what's happening 👍
The GP's
The GP's13mo ago
Happy to help.
Godzilla_Bill_K4IBC
Can you also please check the "!" character as well?
miklschmidt
miklschmidt13mo ago
i reckon both require the same fix, but yes will include a test for that 👍
TheTik
TheTik13mo ago
TDD?
miklschmidt
miklschmidt13mo ago
It's bash, and though there are bash testing libraries, it's really awful to use 😂 But i might be able to write them from typescript. I'm not big on TDD (i never get anything done), but i do regression tests and integration tests.
TheTik
TheTik13mo ago
Yeah, I'm trying it out in a personal project, wish we did more at work. Anyway, sorry to derail the thread 😄
Godzilla_Bill_K4IBC
If I have to I can change password. It was assigned to me by ISP but I can change it if necessary. Means updating every device in house but no big deal.
The GP's
The GP's13mo ago
You can input the password manually via a txt file on the sd card
Godzilla_Bill_K4IBC
Y'all are making this old man dig deep as RPi and Bullseye are my biggest weaknesses. I can do this. I will do this.
miklschmidt
miklschmidt13mo ago
fortunately you don't need to know any of those, just put your pi's SD card in a card reader and edit the ratos-wpa-supplicant.txt file with a simple text editor (ie notepad or preferably vscode or notepad++, but not wordpad) on windows.
Godzilla_Bill_K4IBC
Yeah I do use Notepad++. I assume I do this after first boot of RPi not before.
miklschmidt
miklschmidt13mo ago
either works
The GP's
The GP's13mo ago
Haha, hope it works. I didn't fancy changing my wifi password, so this way is easier
jLynx
jLynx3mo ago
I tried this and initially it worked. but then when I did a full power off/on reboot, it didnt connect to the wifi again. Still have connection via eth0 though Note: it only happens when I have the HDMI for my screen plugged in any thoughts here @miklschmidt ?
The GP's
The GP's3mo ago
This is an ongoing issue with me aswell. If I unplug my screen it works fine. If I plug it in and reboot doesn't connect
miklschmidt
miklschmidt3mo ago
@jLynx &@The GP's sorry for the late reply. That sounds alot like HDMI interference, see: This is a known issue with the Raspberry Pi 4. The HDMI port can generate radio frequency (RF) interference that disrupts the 2.4GHz Wi-Fi band, especially at higher display resolutions. The issue is with the Pi's hardware design. Here are several workarounds ordered from the most effective and simplest to the more involved: 1. Use 5GHz Wi-Fi: The interference primarily affects the 2.4GHz band. If the user's router and network support 5GHz, switching the Raspberry Pi to a 5GHz network is the most reliable solution. 2. Change 2.4GHz Wi-Fi Channel: The interference is strongest on the lower 2.4GHz channels (1-3). Configure the Wi-Fi router to use a higher channel, such as 7 or 11. 4. Improve Shielding: * High-Quality HDMI Cable: Use a short, well-shielded HDMI cable. Poorly shielded cables can radiate more interference. * Ferrite Beads: Clamping ferrite beads onto the HDMI and power cables can help suppress RF noise. 5. Use an external Wi-Fi Dongle: If the other solutions fail, using a USB Wi-Fi dongle (preferably on a short USB extension cable to move it away from the Pi) can bypass the onboard Wi-Fi module. Note, we don't support #5, you'd have to configure the network manually.
The GP's
The GP's3mo ago
Thankyou. Will try these fixes and let you know if any of them solves the issue
jLynx
jLynx3mo ago
Omg this is crazy and I think that was the solution. I switched from the provided hdmi to another one I had and the problem went away!
The GP's
The GP's3mo ago
I think i need to do the same. Done both 1 and 2 and no luck. I am using a coiled hdmi cable to keep it neat underneath, but now thinking if it can coil its probably not shielded
jLynx
jLynx3mo ago
I specifically got this cable just fyi https://a.aliexpress.com/_mOV2Gef
sorkana
sorkana2mo ago
I have the same issue - either WLAN or external monitor via HDMI
I tried NetworkManager but that didn't help. I try your list tomorrow. Solution 1 solved it. Changed the Network to 5Ghz and it worked right away. The yellow klipper info about the Network_Manager vanished after commenting out the [network_manager] enable: false in the moonraker.conf thank you for your tips on this topic - I just wanted to throw away the external monitor 😀

Did you find this page helpful?