KlipperLab
Two black 3D printers with blue filament spools side by side, the left wired to a Raspberry Pi and control board, the right to a single mainboard
comparisons

Klipper vs Marlin Firmware: Setup, Input Shaping, Tradeoffs

Decide whether to keep Marlin or switch to Klipper. Compare standalone printing, settings and input shaping, then check your board and rollback plan.

By KlipperLab Editorial · ·Updated · 9 min read

Keep Marlin if you want your 3D printer to run standalone from its board and print from an SD card. Switch to Klipper if text-file configuration and built-in accelerometer tuning are worth keeping a Linux host running through every print. Before flashing, match the config to your actual board, confirm the host is ready, and obtain a Marlin recovery image and its flashing instructions.

What the Split Actually Changes

Marlin handles motion, heaters and the printer controls on the mainboard. An attached computer is optional when you print from the printer’s own media. Klipper’s Linux host computes when the motors should step and sends that schedule to the printer board, which executes it. A Klipper screen or web interface still relies on that host. Marlin introduction, Klipper features and Klipper installation.

For what runs on each device, see how Klipper works.

Side by Side

Everyday decisionKlipperMarlin
Print without a hostLinux host required during the printStandalone from SD or USB media on supported builds
Change a settingEdit printer.cfg and reload it with RESTARTChange supported settings at runtime, or rebuild and flash for compile-time changes
Tune input shapingMeasure with a supported accelerometer or use a ringing test printRead a test print and set the integrated ZV shaper with M593
Compensate for extrusion pressurePressure AdvanceLinear Advance, with its K factor set through M900
Control the printerWeb interface or supported display, with the host runningOnboard controls or optional host

For extrusion pressure, see the Marlin M900 reference and the Klipper pressure advance guide.

Configuration Workflow Is the Day-to-Day Difference

On Klipper, keep a copy of the working printer.cfg. Edit the file, run RESTART in the console, then use STATUS to confirm it loaded. If Klipper reports a configuration error, fix it or restore the working copy and restart again. Ordinary config edits leave the board firmware in place. Klipper installation and configuration checks.

Marlin builds hardware and feature choices into firmware, typically from Configuration.h and Configuration_adv.h. A change to the configured build area requires a rebuild and flash. Runtime settings, such as preheat temperatures, can be changed on the printer and saved if EEPROM settings are enabled. Marlin configuration and M500 save settings.

Tuning Features Are Not Symmetric

Klipper can suggest a shaper and frequency for each axis from accelerometer data. It also reports suggested acceleration limits for controlling smoothing. A ringing test print is an option without a sensor. The tradeoff is between reducing ringing and preserving fine detail as acceleration rises. Klipper measuring resonances and resonance compensation.

Use the ADXL345 setup guide for sensor wiring and the input shaper and acceleration sizer to explore the relationship between shaper choice, frequency and acceleration.

Does Marlin Have Input Shaping?

Yes. Marlin added the integrated ZV shaper in 2.1.2. With INPUT_SHAPING_X and INPUT_SHAPING_Y enabled in the build, M593 sets the X and Y frequencies and damping at runtime. Marlin’s 2.1.3 Fixed-Time Motion uses M493 and has its own shaper settings, including choices such as ZVD and MZV. Marlin motion control settings, M593 reference and M493 reference.

Tuning Marlin input shaping without an accelerometer

For the integrated ZV shaper on a Cartesian printer, start with the zigzag frequency and damping patterns. For CoreXY, use the ringing tower method below. Marlin calibration pattern generator and M593 reference.

  1. Fill in the printer and material settings in the calibration pattern generator, select Generate G-code, and download the frequency pattern and the two damping patterns using the download buttons.
  2. Print the frequency pattern. The sweep uses high acceleration, so keep the generator settings within your machine’s limits. Read Y on the front horizontal zigzag and X on the vertical zigzag. Measure from the start of each pattern to where the zigzag changes or breaks. At 62 mm, Marlin’s X-axis example gives 62 ÷ 2 = 31 Hz. Apply it with M593 X F31 and set Y from its own reading. M593 frequency sweep and calibration pattern notes.
  3. Once both frequencies are set, print the damping patterns. Pick the pass that looks most uniform before the resonance point. In Marlin’s example the seventh X pass gives 7 × 0.05 = 0.35, so send M593 X D0.35. Repeat for Y. M593 damping sweep.
  4. Run M593 by itself to read back the active settings. Send M500 to save them if the build has EEPROM_SETTINGS enabled. With that option disabled, record the values so you can reapply them. After a restart, use M593 again to confirm the saved values loaded. M593 reference, M500 save settings and Marlin EEPROM guide.
  5. If Linear Advance is enabled, recheck its K factor after shaping is tuned. M900 reports the current factor. Calibration pattern notes and M900 reference.

Ringing tower option. Use the STL and layer-change G-code in Marlin’s tower instructions. For CoreXY, rotate the model 45° to isolate the A and B motors. With the documented 0.2 mm layers and 15–60 Hz sweep, 20 mm at the cleanest X layer gives about 29.8 Hz by 15 + 45 × (20 / 0.2 − 2) / 297. Marlin’s example uses M593 X F29.84. Save under the same EEPROM prerequisite. M593 ringing tower instructions.

Reliability and Failure Surface

On a standalone Marlin print, the printer board reads the print file and controls the machine. On Klipper, the host adds a power supply and a connection to the printer board that both need to stay up. Check the Klipper hardware requirements before committing to the switch.

What happens if the Klipper host crashes mid-print

The print stops. Klipper’s host must reconfirm that an enabled heater should stay on. If the microcontroller stops receiving that confirmation, it is designed to enter shutdown and turn off the heaters and stepper motors. Klipper FAQ.

Who Should Run Which

  • Keep Marlin if standalone printing matters, your current print quality is good, or you only want to reduce ringing. Check whether your build already supports M593 before replacing it.
  • Switch to Klipper if you want to tune from accelerometer data, edit configuration without rebuilding for each change, or use programmable macros. Switch once you have a matching config, a working host and a recovery plan. Klipper features.

Marlin Alternatives Besides Klipper

RepRapFirmware can run on a compatible Duet board in standalone mode, like Marlin, and uses a text configuration file. Its M593 supports shapers including MZV, ZVD, EI2 and EI3. Duet3D also documents M955 for configuring an accelerometer and M956 for collecting data. Duet3D configuration guide and RepRapFirmware changelog.

If you’re shopping for a printer and want to use its factory workflow, the Bambu Lab P1S is another option. Bambu Lab’s P1S profile.

Switching Costs

The work is matching the controller, configuring the printer and verifying its inputs and outputs before the first print. How much configuration you need depends on whether an example matches your machine or you start with a generic board config. Klipper installation and configuration checks.

The switch, step by step

Before flashing

  • Match the printer and the board. Find a printer-*.cfg for the printer and verify that it matches the board actually installed. If there’s no match, find a board-specific generic-*.cfg and plan to customize it for the machine. Klipper installation and Marlin’s printer configuration notes.
  • Read the config’s header comments. Identify the make menuconfig choices and the flashing procedure for your board. If the comments give custom instructions, follow those. Klipper installation.
  • Confirm the host. Have a Linux machine ready with Klipper and a compatible front end such as Mainsail or Fluidd. Verify you can open its interface before replacing the printer firmware. Klipper installation.
  • Prepare the way back. Save a known-good Marlin image and the flashing procedure for your exact printer and board revision. If you need an image, check Marlin’s prebuilt options for a match or use your matching configuration to build a binary. For a custom build, keep both the configuration and the binary. If available, copy the active settings from M503 so you can restore your tuning. Marlin build and install, Auto Build Marlin and M503 report settings.

Build and flash using the board’s method

On the host, run cd ~/klipper/ and make menuconfig. Apply the settings from the config’s header, press Q then Y to save, and run make. Use the flashing method for that config. Klipper installation.

If you need the USB serial ID for flashing, run ls /dev/serial/by-id/* with the board connected. If several entries appear, unplug the board and run ls /dev/serial/by-id/* again. The entry that disappears belongs to the board. Reconnect it before a USB flash. Klipper installation.

  • SD-card flash. Disconnect the host USB cable from the printer board first. USB can backfeed power and prevent the flash. Check whether the bootloader needs a new filename on each flash, such as firmware1.bin then firmware2.bin, or accepts firmware.bin and renames it to firmware.cur. Copy the built image to the SD card under the required name and restart the board with the card inserted, following the config’s instructions. Klipper installation and bootloader guide.
  • ATmega serial flash. Where the config calls for it, run sudo service klipper stop, then make flash FLASH_DEVICE=/dev/serial/by-id/YOUR-BOARD using the actual serial path. After flashing, run sudo service klipper start. Klipper installation.
  • RP2040 boot-mode flash. Where the config calls for it, put the board in boot mode if required. Run sudo service klipper stop, make flash FLASH_DEVICE=first, then sudo service klipper start. Klipper installation.

Connect and check the printer

For a USB serial setup, connect the board and run ls /dev/serial/by-id/* after flashing, even if you ran it before. The ID may have changed. Use the resulting path for serial: under [mcu] in printer.cfg. If the port is ambiguous, repeat the unplug check above. Klipper installation.

Run RESTART, then STATUS. Once Klipper reports ready, follow its configuration checks for temperature readings, heaters, endstops and motor direction before homing or printing. Cut printer power if the temperature rises unexpectedly during the initial check. Klipper configuration checks.

Go back to Marlin

Flash the matching Marlin image using the procedure you saved. An SD bootloader and a USB upload may require different files and steps. With EEPROM settings enabled, M501 loads valid saved settings and falls back to defaults if the data fails validation. Check the active values against your M503 record and reapply any needed tuning. Auto Build Marlin, M501 restore settings and M503 report settings.

FAQ

Is Klipper faster than Marlin

Switching firmware alone gives no fixed print-time gain. Input shaping has little effect on time by itself. What can shorten a print is a higher usable acceleration, which you need to tune for your printer’s ringing and smoothing. Klipper resonance compensation.

Can Marlin use an ADXL345 for input shaping

Marlin’s documentation describes measuring resonance separately in a browser with a compatible USB accelerometer board fitted with an ADXL345. Apply the measured frequency with M593 for the integrated ZV shaper. Klipper provides accelerometer-based calibration within the firmware workflow. Marlin input shaping and Klipper measuring resonances.

Does Klipper work with my printer’s stock screen

Check the display controller against Klipper’s [display] entries. For example, Klipper lists hd44780 and st7920 displays. If the stock controller lacks a matching entry, check for model-specific support before counting on the screen. Klipper configuration reference.

Documentation basis. Klipper’s installation and reference docs and the Marlin G-code docs were used. Release references are Klipper 0.14.0 and Marlin 2.1.2.10 / 2.1.3 beta 3. The ZV procedure applies from Marlin 2.1.2. No flashes or calibration prints were run for this comparison.

Sources

  1. Klipper: Features
  2. Klipper: FAQ
  3. Klipper: Releases
  4. Klipper: Installation
  5. Klipper: Configuration Checks
  6. Klipper: Bootloaders
  7. Klipper: Configuration Reference
  8. Klipper: Measuring Resonances
  9. Klipper: Resonance Compensation
  10. Marlin: Introduction
  11. Marlin: Configuration
  12. Marlin: Download
  13. Marlin: Motion Control Settings
  14. Marlin: Input Shaping
  15. Marlin: M593 ZV Input Shaping
  16. Marlin: M493 Fixed-Time Motion
  17. Marlin: Input Shaping Calibration Pattern
  18. Marlin: M500 Save Settings
  19. Marlin: EEPROM
  20. Marlin: M501 Restore Settings
  21. Marlin: M503 Report Settings
  22. Marlin: M900 Linear Advance Factor
  23. Marlin: Example Printer Configurations
  24. Marlin: Build & Install
  25. Marlin: Auto Build Marlin
  26. Duet3D: Configuring RepRapFirmware
  27. Duet3D: RepRapFirmware 3.x Changelog
  28. Bambu Lab: P1S Bambu Studio Profile

Related