Klippain Shake&Tune Resonance Analysis Plugin
Klippain Shake&Tune is a Klipper resonance analysis and input shaping calibration plugin that generates visual charts from vibration data collected by accelerometers, helping to troubleshoot mechanical issues and optimize Input Shaper filters.
FlyOS-FAST v1.3.5 and above comes with Shake&Tune pre-installed, no manual installation is required. Simply add the [shaketune] configuration section to printer.cfg and restart to use it.
For complete configuration parameters and instructions, please refer to: FlyOS-FAST Shake&Tune Plugin Documentation
Installation
Use an SSH tool to connect to the host machine and confirm the following conditions:
- Klipper firmware is installed on the host machine.
- An accelerometer (ADXL345, LIS2DW, etc.) is installed and properly configured, and
ACCELEROMETER_QUERYreturns data normally. - The
[resonance_tester]section is defined inprinter.cfg.
Pull or Update the Plugin
This step requires a connection to GitHub. After confirming the pull was successful, run the installation script.
cd ~
if [ -d ~/klippain-shaketune/.git ]; then
git -C ~/klippain-shaketune pull --ff-only
else
git clone https://github.com/Frix-x/klippain-shaketune.git ~/klippain-shaketune
fi
Run the Installation Script
cd ~/klippain-shaketune
chmod +x install.sh
./install.sh
systemctl restart klipper
If using the FlyOS-FAST system, the installation path should be adjusted to the /data/ directory. Please refer to the FlyOS-FAST specific documentation above for details.
Add Configuration Section
Add the following to printer.cfg:
[shaketune]
# result_folder: ~/printer_data/config/ShakeTune_results
# Path where processing results are saved; the folder is created automatically if it does not exist
# number_of_results_to_keep: 10
# Number of recent results to keep; old files are automatically cleaned up when exceeded
# keep_raw_data: False
# Set to True to also save the raw .stdata files, useful for troubleshooting or submitting feedback
# show_macros_in_webui: True
# Display Shake&Tune macro buttons in the Fluidd / Mainsail web interface
# timeout: 600
# Chart generation timeout in seconds; can be increased on low-performance devices
Save and restart Klipper.
Verify Installation
systemctl is-active klipper
After it returns active, enter macro commands such as TEST_RESONANCES in the web console to confirm the commands are recognized.
Available Macro Commands
After installation, the following macro commands are available in the web console or as G-code:
| Macro Command | Purpose |
|---|---|
TEST_RESONANCES AXIS=X | Measure X-axis resonance and generate spectrum charts with suggested Input Shaper parameters |
TEST_RESONANCES AXIS=Y | Measure Y-axis resonance and generate spectrum charts |
TEST_RESONANCES AXIS=X OUTPUT=raw_data | Only collect raw data without automatically generating charts |
COMPARE_RESONANCES | Compare the two most recent resonance measurements to observe the effect of adjustments |
BELTS_SHAPER_TUNING | Dedicated belt resonance test that generates a Hanning window spectrum comparison chart |
After each execution, Shake&Tune generates PNG chart files in the result_folder, which can be viewed directly through the Fluidd / Mainsail file manager.
Differences from Built-in Klipper Commands
Shake&Tune does not replace Klipper's built-in SHAPER_CALIBRATE but provides richer visual analysis on top of it:
| Feature | Klipper Built-in | Shake&Tune |
|---|---|---|
| Automatically calculates Input Shaper parameters | SHAPER_CALIBRATE writes directly to the configuration | TEST_RESONANCES generates charts for reference |
| Spectrum visualization charts | None | Automatically generates PNG spectrum charts |
| Belt tension comparison | None | BELTS_SHAPER_TUNING generates comparison charts |
| Comparison of multiple measurements | None | COMPARE_RESONANCES compares recent results |
Built-in commands are suitable for quick automatic calibration; Shake&Tune is suitable for scenarios where you need to view detailed spectrums, troubleshoot mechanical issues, or compare belt tension.
Common Issues
Chart Generation Timeout
Low-performance devices may time out when generating charts. Increase the timeout value in the [shaketune] section, for example: timeout: 900.
No Results Generated in the Result Folder
Confirm that the result_folder path exists and Klipper has write permissions.
ACCELEROMETER_QUERY Error After Installation
Shake&Tune does not affect the underlying accelerometer communication. If communication errors occur after installation, first troubleshoot the hardware and configuration according to Accelerometer Testing and Calibration.
Accelerometer Configuration and Testing: View Accelerometer Testing and Calibration
Resonance Compensation and Input Shaper Tuning: View Resonance Compensation and Pressure Advance Configuration Issues