Hi all, Iβve got an issue with running any resonance measurements on my setup: Voron Switchwire (Ender conversion), Odroid C2, ADXL345
I can get readings from ADXL sensor, but when I try to run resonance test, klipper crashes without any error in the klippy.log
Can someone help me here, what should be the steps for debugging this crash?
I tried to to dig around in the code for input shaping and it seems it crashes on importing numpy as a module.
I donβt understand why, numpy is correctly installed in the klippy-env virtual environment, but it crashes on import without catching the Import exception.
Iβve reinstalled whole virtualenv with kiauh scripts, modified ~/klipper/scripts/klippy-requirements.txt to install latest numpy when updating klipper and it still crashes when running TEST_RESONANCES AXIS=X OUTPUT=resonances
Running TEST_RESONANCES AXIS=X OUTPUT=raw_data works just fine.
Iβve also upgraded from Python 3.8.10 to Python 3.11.7, reinstalled klipper + packages, moonraker and reflashed MCU host, but the issue still persistβ¦
Does this command fails? ~/klippy-env/bin/python -c "import numpy" (It shouldnβt print anything)
If there is an error, does this fixes it? : OPENBLAS_CORETYPE=ARMV8 ~/klippy-env/bin/python -c "import numpy"
numpy has a bunch of dependencies and it sounds like one of them isnβt loading. Try python3.8 -v -c "import numpy" to get more info on whatβs actually throwing the illegal instruction.
Finally managed to get resonance measurements running, but with a big workaround (issues described in this post were when I was running latest official minimal Ubuntu 20.04 from hardkernel because I got SPI working there).
reflashed eMMC of my Odroid C2 with latest DietPi again (used it previously, but could not get SPI to work, so I switched back to that minimal Ubuntu)
reinstlalled everything (WiFi, Klipper, Moonraker, Mainsail, all the plugins, bells and whistles)
modified dietpiEnv.txt, modprobe and device tree to activate SPI interface and finally got it working
With this setup, Klipper runs just fine, I am able to get data from ADXL345 on /dev/spidev0.1 and finally TEST_RESONANCES now works properly.
I was able to do resonance measurements on both X and Y successfully.
Donβt know why I got problems with Illegal instruction when importing numpy on that minimal Ubuntu 20.04 previously (even when Iβve build numpy 1.18.5 locally it was throwing the same error)
But I am now up and running again (and hopefully this was my last obstacle ).