Multi restarts before firmware works

Whenever I need to restart my firmware, it sometimes takes multiple times to load. I will wait, and it will have the blue box startup for a long time (I've stayed for 10+mins before). The only way for klipper to load up is to do a few firmware_restarts or restart until it's loaded. Sometimes while restarting firmware I will get the failed automated restart of the MCU "mcu" or MCU 'mcu' shutdown: oids already allocated
No description
No description
No description
29 Replies
NecroDavid
NecroDavid2y ago
I have the same problem!
No description
NecroDavid
NecroDavid2y ago
It happens everytime I restart Klipper, clicking "restart" or "firmware restart" does nothing. I have to reboot my Pi to get things working
blacksmithforlife
Bit of a long shot, but what do you have plugged into your USB ports? https://github.com/Klipper3d/klipper/issues/5521 Maybe related in that something on the USB ports of the pi is misbehaving?
GitHub
SKR2: MCU 'mcu' shutdown: oids already allocated · Issue #5521 · Kl...
I'm trying to replace an SKR1.4 for an SKR2, but I can't seem to be able to connect. I used the generic SKR2 config with only the mcu serial path adjusted. The specific SKR2 board I...
NecroDavid
NecroDavid2y ago
Clicking here gets you out of that situation, but everytime I do "Save & restart" on the config it does it again.
No description
NecroDavid
NecroDavid2y ago
No description
afraid-scarlet
afraid-scarlet2y ago
Disable (or better, mask) and/or uninstall ModemManager from your RPi I.e. either this:
sudo systemctl stop ModemManager.service
sudo systemctl mask ModemManager.service
sudo systemctl stop ModemManager.service
sudo systemctl mask ModemManager.service
so it won’t start at boot. or:
sudo apt remove modemmanager
sudo apt remove modemmanager
To completely uninstall it (you’ll hardly need it)
afraid-scarlet
afraid-scarlet2y ago
Klipper
Recent KlipperScreen commits break Klipper on Buster
This is a heads up that a rather bizarre issue has surfaced with some of the recent updates to KlipperScreen, see My post on Discord and the surrounding posts. Two of my printers, both running Pi OS Buster started behaving erratically a few days ago - particularly when attempting FIRMWARE_RESTART. One printer is on Duet 3 Mini with Pi3B+ and t...
fair-rose
fair-rose2y ago
When this started to happen I had my board, touchscreen, and webcam in the USB slots. No issues then suddenly issues. I have removed the webcam as that was maybe the oddball. Thanks, it looks like the Mask of that worked. I did a few starts and it loaded great. I am going to test it a few more times after doing some stuff
NecroDavid
NecroDavid2y ago
Thank you, it worked for me too, I did not move anything on my USB ports
ptegler
ptegler2y ago
this just fixed it for me as well. I did a full remove
afraid-scarlet
afraid-scarlet2y ago
So am I :-). I don’t think I will use dialup or LTE modem on printers RPi ever.
vicious-gold
vicious-gold2y ago
Maybe smilar situation with Octopus pro 441, EBB36 v1.2 and RPI3b with brand new usb cable (ugreen). For me that the EBB36 who take time to be detected after a firmware reboot and i have to manually restart the klipper service after 30-60sec otherwise the connection does not automatically redo most of the time. but i have not found solution. (ps: with RatOS 2) I'm auto quote : for me i have just tested to stop+mask ModemManager.service and that the solution ! now a restart work fine and take ~3 sec 👍 😽
miklschmidt
miklschmidt2y ago
I will make this default! Thanks so much for this, i've been chasing this myself in an unrelated project and thought it was a hardware problem. Jesus! Thank you!
afraid-scarlet
afraid-scarlet2y ago
Maybe, just maybe, it is better to keep ModemManager installed but masked. Since this glitch was caused by updating KlipperScreen to some of its version (sic!) which installed ModemManager (sic! - I didn't check whether it was alerady installed or not), probably due to indirect dependency/suggestion, and therefore we've got what we got. In case of ModemManager installed and masked (couldn't be started), anything what depends on ModemManager will be satisfied, yet ModemManager won't be started. I like the "uninstall" method. But if you want to make it bullet-proof, maybe the "mask" method will be better.
miklschmidt
miklschmidt2y ago
Maybe, just maybe, it is better to keep ModemManager installed but masked
that was the plan gonna do something like this:
if [[ -e /etc/systemd/system/ModemManager.service ]]
then
MM_LINK=$( readlink -f /etc/systemd/system/ModemManager.service )
if [ $MM_LINK != "/dev/null" ]
then
report_status "Disabling ModemManager"
sudo systemctl stop ModemManager.service 2> /dev/null
sudo systemctl mask ModemManager.service
fi
fi
if [[ -e /etc/systemd/system/ModemManager.service ]]
then
MM_LINK=$( readlink -f /etc/systemd/system/ModemManager.service )
if [ $MM_LINK != "/dev/null" ]
then
report_status "Disabling ModemManager"
sudo systemctl stop ModemManager.service 2> /dev/null
sudo systemctl mask ModemManager.service
fi
fi
afraid-scarlet
afraid-scarlet2y ago
I'm thinking whether just single line systemctl mask ModemManager.service wouldn't do the whole trick.
miklschmidt
miklschmidt2y ago
It does work, it'll just mask it even if it's not installed. Which i guess is fine. Not sure what happens if it's already mask will check Nothing. Good.. Well i guess i'll just do that 😂 Only reason i did the checking is that i want to run it on update as well to fix existing printers, and i don't want to spam the output.
afraid-scarlet
afraid-scarlet2y ago
Then systemctl is-enabled ModemManager.service might help There are several places, not just /etc/systemd/system/ which systemd is checking so use directly systemd method should be safer.
miklschmidt
miklschmidt2y ago
doh. That's a lot simpler 😂 You're totally right Will fix this
afraid-scarlet
afraid-scarlet2y ago
But if you’ll ask for non-existent service (or not installed) you might get a stderr message from it (kinda drawback).
miklschmidt
miklschmidt2y ago
i'll just send it to /dev/null and use the exit code
disable_modem_manager()
{
sudo systemctl is-enabled ModemManager.service > /dev/null
if [[ $? -eq 0 ]]
then
report_status "Disabling ModemManager"
sudo systemctl mask ModemManager.service
fi
}
disable_modem_manager()
{
sudo systemctl is-enabled ModemManager.service > /dev/null
if [[ $? -eq 0 ]]
then
report_status "Disabling ModemManager"
sudo systemctl mask ModemManager.service
fi
}
There we go
afraid-scarlet
afraid-scarlet2y ago
Damn, masking doesn't stop the service :-(. So the systemctl stop ... line before systemctl mask ... is necessary.
Arthur_C
Arthur_C2y ago
I have the same issue on a BTT-Manta-M8P with a CM4 on it. I will try sudo systemctl stop ModemManager.service sudo systemctl mask ModemManager.service as I have no idea what @kmarty and @miklschmidt are saying later on in this post ...;-)
miklschmidt
miklschmidt2y ago
That’s all you need 👍
billyd
billyd16mo ago
Masking worked for me as well. Perhaps this should be pinned if it isn't already. I had the issue for awhile and just lived with it by shutting down and restarting until I stumbled across this thread. Ps mask on modemmanger.service also cuts down the firmware boot time in half when first starting up in addition to fixing restart problems.
miklschmidt
miklschmidt16mo ago
I did this in RatOS v2.0 and it’s baked into the klipperscreen install script now
national-gold
national-gold16mo ago
Do you thing this would help with my situation
miklschmidt
miklschmidt16mo ago
No it's a different issue. This is already incoporated in v2.0 btw.
national-gold
national-gold16mo ago
That's fair enough just wondered