Hi everyone,
I’m running into a very strange and frustrating issue and I’m running out of ideas.
Setup
Raspberry Pi 4B
Raspberry Pi OS Lite 64-bit (Bookworm)
Klipper on a Voron 2.4
CAN bus setup using a Mellow Fly board
CAN connected via umbelical at 500.000 bitrate and 128txlen
New microSD (SanDisk Class 10 U3)
About a week ago, the Raspberry Pi started going to 100% CPU usage constantly.
The printer becomes completely unresponsive: I can’t print, can’t move axes, nothing.
In htop I see:
-bash or sometimes systemd
CPU stuck at 100%
PIDs constantly changing
Killing the processes does nothing
What I already tried
Full clean reinstall of Raspberry Pi OS (twice)
Brand new microSD card
Fresh Klipper install
No KlipperScreen
Removed all plugins/extras one by one
Tested with zero plugins enabled
Same behavior on both SD cards
Even with a completely clean Klipper install (no KAMP, no ShakeTune, no TMC Autotune, no backups, nothing), the CPU still goes to 100%.
Because of this, I don’t think:
It’s a Klipper plugin issue
It’s SD card corruption
It’s a broken Klipper config
Plugins I normally use (but currently disabled):
KAMP
ShakeTune
TMC-AutoTune
Klipper Backup
KlipperScreen
Spoolman (running on another Raspberry, only shared over network)
Mobileraker Companion on a third rpi
Observations
The issue happens even when Klipper is basically idle
CPU usage is already maxed before doing any print
The fact that systemd / -bash show up with changing PIDs makes me suspect:
kernel / driver issue
USB / CAN bus related problem
IRQ storm or hardware-level issue rather than Klipper itself
Question
Has anyone seen:
Raspberry Pi 4 + Bookworm
CAN bus (Mellow Fly or similar)
Resulting in constant 100% CPU usage with systemd/bash?
Could this be:
a Bookworm kernel + CAN/USB driver issue?
an IRQ storm caused by CAN errors?
something related to USB power saving or CAN bitrate?
Any suggestions on what logs or tests to run next would be greatly appreciated.
I wish you had filled out the requested information for General Discussion questions because you haven’t given a full description of your system.
I would like to know:
What is your main controller board? On the same vein, what is the “Mellow Fly board” that you’re using for your toolhead or other controller?
How have you implemented the CAN connection - are you using the main controller board as a USB to CAN bridge or are you using an U2C board?
What do you mean when you say you have disabled the various plugins? Elsewhere you indicated that you removed them. What happens if you try setup with none of these apps installed during your setup process?
What is the process you are using to set up your full system with the CAN network? First off, it should be 1Mbps and the process I recommend (and I believe it is the most comprehensive and maintained is Esoterical’s):
Could I ask that you try Esoterical’s CAN setup process with no plugins and see how that works.
When you have done that, could you report back and include the information requested in the four points above?
I’m using a btt octopus, using a dedicated usb can bridge (mellow utoc) connected to a toolhead sb2040 pro mellow.
2)i’m using the utoc.
3)As plugin i mean the extras in klipper like KAMP,crownsnest, etc.., when starting klipper first time all seems to be ok, after reboot all gone wrong, aslo without extras.
4)I followed the esotherical guide, i’m using rn 500000 bitrate, because i setup the canbus long time ago, and i didnt have no issue until now, settupped before the 1M Bitrate was released.
As i start the printer, pi is connected on a dedicated 5v psu, connected to 24v, so when i power the printer it start, the 100% issue sometimes happen after 1 minutes from boot, sometimes instantly.
I update a week ago maybe klipper,os and other components using kiauh and this issue happen, someone suggested to me overheating but literally i’ve a fan directly on pi, spinning 24/7 when all powered on, other suggested to me is a broken wire, but really happen after some updates.
The only suggestion that I have for you is to pull the rPi SD Card with a newly imaged one and start the install process again. Save the old SD Card in case the newly imaged one behaves the same way so we two datapoints to look at.
It seems to me you have a software problem, if you haven’t updated Klipper for a long time and then did everything all at once, then maybe something didn’t get properly updated.
You did do:
sudo apt update
and
sudo apt upgrade
As part of your process to make sure everything accessible to the OS is updated?
i update klipper likely every version, but this night i wanna try to reinstall the os on a new microsd, install klipper but likely the version released on 7jan as before the first week all works fine, i did a 48 hours print the 9th of january.
After that setup can as i 've used until now, so 500k and 128txlen and try, if in this way works, maybe there is something with latest klipper release.
Yes i did a full upgrade when installed the os, i’m still on bullseye (debian on rpi os lite) but i dont think debian version is important as until now it worked perfectly.
After flashing mcu, so connecting only mcu installing klipper and flashing it, (dfu mode as voron suggest), for the first 3 minutes start good, after spikes come back.
So i disconnected mobo and reconnected all other stuff (UTOC and camera) and error is still here, 100% usage stay here also after rebooting and trying to boot with mobo disconnected
Maybe is a power issue? i mean, i use a dedicated 5v regulator to rpi gpio for powering on
You say “pids constantly changing” and I see that systemd is racking up a lot of cpu time. Perhaps a lot of processes are being (re)started. Does dmesg have any clues about the cause of all this activity?
after reflashing mcu for like 5 minutes it stay in normal states, after 5 minutes SPIKES goes back…so maybe its not related to version of klipper on mobo?
I runned a dmesg command, ill attach the log
dmesg only with BTT Octopus connected dmesg.txt (32.4 KB)
Could you please work at organizing the information so that it’s easier to follow? I think there’s also missing information here.
I’m not exactly sure what you’re saying here, what I think is in this post:
You did a new OS install (as I requested). No issues. You did a git clone https://github.com/dw-0/kiauh.git to install KIAUH but did not run it.
You checked the rPi operation and did not see any issues. You’re using htop to monitor operations.
I’m not sure why you disconnected the Octopus and U2C and Webcam.
You’re asking if booting up the rPi with U2C and the main controller board connected can lead to the problems you’re seeing.
The short answer is “No” but this is difficult to answer because you haven’t said if you have installed Klipper or any other apps.
Finally, you’re saying that when you connect the Octopus, execution jumps to 100% and put in an htop screenshot showing 100%.
I have no idea what’s happening here because I don’t know what’s installed in your system.
When I look at your final screenshot, I see that systemd processes are essentially overwhelming the rPi:
and I don’t see anything like what you are showing. In my system, I have installed, Klipper, Moonraker, Mainsail, Katapult, KlipperScreen along with updating the blob.bin file for the Raspberry Pi display. The base OS is the current rPi OS 64bit minimal from the Raspberry Pi Imager Windows application. I followed the Esoterical guide (listed above). That’s it.
In my original post, I asked you to explain the process you’re using to set up your full system and you still haven’t done that.
It appears that you’re very skilled with Linux and I’m going to suggest that you forget about that and just follow this process:
Image an SD Card using the Raspberry Pi Imager with the rPi OS 64bit Minimal.
SSH into the rPi and run sudo apt update followed by sudo apt upgrade
Run the Esoterical process, step by step.
Report on what happens at the end of the process when you try to connect the Octopus and the U2C.
Don 't do anything more than this.
Let’s see what happens and, if there aren’t any problems, we can go back and look at the other applications that you are installing.
Ok mate sorry, in some hours ill reorganize all informations, so maybe can be more easy.
So you mean doing all installation of rpi os lite, update it, install klipper using kiahu/manual way, after that setup can as esotherical guide do and report all right?
ok as u requested, i did a fresh install of rpi os lite 64bit based on debian trixie, latest available on rpi imager.
as now i installed only os and did a sudo apt update and after a sudo apt upgrade and process works fine.
There is NOTHING installed only pure os. (as now nothing is connected to rpi)
Now i’m starting the Esotherical guide for canbus, i setupped 1M
as bitrate and 128txlen as it suggest, i connected utoc and it’s seen as canbus adapter as guide told. For now no spike, (before reporting percentage i’m waiting at least 5 min from boot or installing/settingup.
just for a fast recap, in this moment, i reflashed os, upgraded it, installed klipper, moonraker and fluidd.
Followed the esotherical canbus guide for setting-up the canbus and flashing toolhead board.
At the moment on rpi i’ve connected only the utoc, for settingup the canbus and i don’t have any issue.
BTT Octopus is disconnected right now, should i reflash it? which way? with microsd or with usb as voron guide states? ( i think it can be flashed in both way {i really dont know difference between two methods and idk if one can lead to error than the other one},until now was flashed with usb way), should i try to flash using microsd?
Waiting for a response to proceed with the MCU ((btt octopus) flashing, and for suggested way.
Anyway canbus is fully setupped, and there are no spikes also after 35 minutes from boot, maybe i overlogged but i I want to make sure everything is easily understandable.
Either way is fine. Personally, I prefer using DFU Mode (I believe you have to put a jumper across the BOOT0 header pins before pressing Reset to get it into DFU Mode and then remove the jumper).
Now i should setup the entire printer, and add also klipperscreen, u suggest to install klipperscreen and check htop or setup printercfg..etc.. and after install klipperscreen, other plugin and only after check htop
ok mate now the basical stuff of my voron works (heating bed and nozzle, probing, movment in all direction, accelerometer query), so i think i can proceed to install the extras.
Before having issues i’ve:
List item
KlipperScreen
Crownsnest (using a wondershare camera with happycam proj.)
Kamp(only for adaptive purge)
Shake&Tune
Tmc AutoTune
Spoolman pointing on another rpi that i’ve where run another klipper instance
Klipper-Backup
Is there an order to install? Can you suggest to me something?
And i found a bug in fluidd where i cannot find theme section, is still present on contextual menu, but clicking on it theme selector doesnt appear, u know why? Thanks in advance mate!