The slicer writes G1 X102.35 Y47.10 E0.0312 F12000: go to that point at 200 mm/s, extruding 0.0312 mm of filament. That line is a request, not an order carried out. The firmware, the program running on the control board's microcontroller (MCU), turns it into thousands of step pulses and into heater and fan power, and it can slow the move down or refuse it. That is why the same G-code prints differently on two firmwares. As of late 2026 there are three main families: Marlin, Klipper and its derivatives, and vendor firmware, open or closed.
What firmware does
In that line, F is in mm/min (12,000 mm/min is 200 mm/s). With the relative extrusion (M83) that Orca, Bambu Studio and PrusaSlicer's profiles use by default, E is the filament for that segment; Cura uses absolute extrusion by default, and then E is the running position (What a slicer does covers the details). Firmware matters to you for three reasons: each one caps speed, handles corners and adds compensations in its own way; half of your "printer settings" live in the firmware, not the slicer; and an update can change how the machine measures the bed or how fast it prints.
It reads the G-code line by line (from the SD card, over USB or over the network) and queues up the moves that follow. It needs that queue: to know how fast it can leave a corner it has to know the next move, and if that move does not arrive in time it slows down as a precaution.
The motion planner applies the machine's limits: maximum velocity, maximum acceleration and cornering speed (jerk or junction deviation in Marlin, square_corner_velocity in Klipper). From those it builds a speed profile for every move. That is why the slicer's speed is a ceiling, never a promise: a short segment between two corners starts braking before it ever reaches that speed, as the acceleration figure in What a slicer does shows. Print time is limited by acceleration more than by top speed; the values by machine class are in Acceleration, resonance and input shaping.
The kinematics translate XYZ into motor rotation. On a bedslinger each axis has its own motor; on a CoreXY both XY motors take part in every move; on a delta the conversion is trigonometry. The last step is steps per millimeter, which is plain pulley-and-belt arithmetic. A 1.8° motor gives 200 steps per revolution; at 1/16 microstepping that is 3,200. With a 20-tooth GT2 pulley, the belt travels 2 mm × 20 = 40 mm per revolution. 3,200 / 40 = 80 steps/mm. Klipper expresses it the other way round: rotation_distance = 40, the millimeters per revolution. Because microstepping is set separately, in microsteps, you can change it without recalculating anything.
The extruder has its own equivalent (E-steps in Marlin, rotation_distance in Klipper). It is set at the factory and you only touch it when you change the extruder or its gears (Extruders: direct drive or Bowden). Never tune steps per millimeter by measuring a printed part: you would bake the material's shrinkage into the firmware, and parts would come out wrong with every other filament. Parts that print the wrong size explains how to separate the causes.
On top of the G-code, the firmware adds its compensations:
- Bed mesh and fade: adds the measured height at each point of the plate to Z, then tapers that correction away to nothing a few millimeters up, because no plate is perfectly flat (Bed probing and Z offset).
- Skew correction: compensates for X and Y not being exactly 90° apart, because no frame is perfectly square (Parts that print the wrong size).
- Input shaping: splits every change in acceleration into offset impulses that cancel out at the machine's resonant frequency (toolhead, belts, frame), so ripples do not appear on the walls (Acceleration, resonance and input shaping).
- Pressure advance: pushes more filament when accelerating and less when braking, because nozzle pressure takes time to build and fall: the filament and the molten plastic compress like a spring between the drive gear and the tip, far more so with a Bowden (Pressure advance and clean corners). Klipper calls it pressure advance; Marlin calls it linear advance.
The heaters are regulated by a PID loop (a controller that sets the power from how far the temperature is from the target) that holds the nozzle, the bed and, on some machines, the chamber at temperature. Thermal runaway protection cuts the heater when the measured temperature stops responding to the power applied, and the firmware also cuts it if the thermistor reads out of range (loose or shorted). Its margins, and why you never widen them, are covered in Fire risk and unattended printing.
Finally, the sensors: endstops or motor stall detection for homing, the probe, the filament runout sensor, the door sensor, the accelerometer and, on 2026 machines, load cells, eddy-current sensors and cameras. The firmware reads them and decides whether to pause, retry or stop everything. What each one measures is in Sensors, cameras and failure detection.
Typical failure: the profile says 500 mm/s and 20,000 mm/s², but the firmware's limits are lower and the part takes far longer than the estimate. Use the manufacturer's printer profile or have the slicer write the limits into the G-code: "How to apply limits" › "Emit to G-code" in PrusaSlicer, the "Emit limits to G-code" checkbox in Orca (Printer, filament and process profiles).
Marlin
In Marlin everything runs on the board's MCU: reading the G-code, planning and generating steps. It started life on 8-bit boards; 32-bit boards are the norm today. Some advice from those slow boards no longer holds, such as not printing over USB because curves came out jerky (Advanced toolpaths).
The configuration is compiled. Features are switched on in Configuration.h and Configuration_adv.h, and enabling or disabling one means compiling a new binary and flashing it, that is, writing it to the board. Many values can be changed on the fly with M-codes and saved with M500 to the EEPROM, the board's memory that keeps values through a power-off:
M92: steps per millimeter.M201,M203,M204: maximum acceleration, maximum feed rate and print acceleration.M851: probe offset (Z offset).M900: the pressure advance K factor.M593: input shaping.M420: enables the mesh and sets the fade height.
Two traps here. Forget M500 and the change is lost at power-off. And after an update, the values saved in EEPROM override the new firmware's defaults: M502 restores the compiled ones and M500 saves them.
Marlin offers pressure advance (linear advance), object canceling with M486, G2/G3 arcs with ARC_SUPPORT, SKEW_CORRECTION and two kinds of mesh: bilinear and UBL (Marlin's unified bed leveling, with more points and editable). Input shaping has been in since 2.1.2, with the frequency set by hand or read off a test print: stock Marlin does not measure it on its own with an accelerometer. Fixed-time motion (FT_MOTION) is still experimental.
You will find it on legacy bedslingers (Ender 3 and 3 V2, Anycubic i3 Mega) and on many budget machines, often as a vendor build with features cut out. Prusa's Buddy firmware descends from it.
The usual failures: flashing a community build made for another board, another thermistor or another probe; enabling a feature that does not fit in an 8-bit board's memory; and older cheap machines compiled without thermal runaway protection (Fire risk and unattended printing).
Klipper
Klipper splits the work between two computers. A host computer (a Raspberry Pi or a Linux computer built into the printer) runs the G-code parsing, the planner and the compensations in Python. The board's MCU only receives step sequences that are already worked out, each with its timestamp, and sends back sensor readings. The planner therefore has a real computer's power behind it, and the heavy math (input shaping, high step rates, several boards at once) does not load the board. That does not make Klipper faster on its own: speed comes from the mechanics, the hotend's flow and the acceleration. What it gives you is computing headroom and a convenient way to tune input shaping and pressure advance.
The configuration is a text file, printer.cfg, read on restart. Changing a value needs no compiling; the MCU firmware is flashed once, at install. Calibration results (Z offset, mesh, input shaping) are written to the file with SAVE_CONFIG. A typo stops the printer from starting and shows an error message: the fault is in plain sight, which is what you want.
What it brings:
- Automatic input shaping tuning with an accelerometer:
SHAPER_CALIBRATEpicks the type and the frequency. - Pressure advance with
SET_PRESSURE_ADVANCEor in the config. - Parameters with a physical meaning:
rotation_distance,square_corner_velocityandminimum_cruise_ratio, which replacedmax_accel_to_decel. - Mesh with
fade_end, and adaptive mesh, which needs the slicer to label objects forexclude_object(Bed probing and Z offset). exclude_object,skew_correctionandverify_heater.- Macros: commands you define yourself. A
START_PRINTmacro receives the temperatures from the slicer's start G-code and runs the start-up sequence.
The interface is separate. Moonraker provides the API; Mainsail and Fluidd are the browser interface, and KlipperScreen the touchscreen one. They are separate projects from Klipper.
G2 and G3 only work with the [gcode_arcs] section; if a G2 returns "Unknown command", that section is missing. On Klipper, leave "Arc fitting" off in the slicer: the host digests straight segments without effort, and the arc only adds one more thing to configure (Advanced toolpaths).
Recent versions add the sweeping resonance test and support for eddy-current sensors and load cells.
Klipper on commercial machines. Many printers ship with a vendor-modified Klipper: Creality K1 and K2, Elegoo Neptune 4, the Qidi range, the Sovol SV08 and the Snapmaker U1; Anycubic, on the Kobra 3 and S1, uses a rewrite based on it. It is usually an old Klipper version with the vendor's own additions (the filament switcher, camera detection) and a locked configuration. Some give you root or SSH access from the menu, like Creality's K2, and others have community alternative firmware. The GPL license requires the changes made to Klipper to be published; manufacturers comply, sometimes months late and with closed binaries for their additions. The rule of thumb: do not install mainline Klipper over the vendor's unless you accept losing those additions and the support.
The usual failures: "Lost communication with MCU" or "Timer too close", which almost always come down to the USB cable, the host's power supply or an overloaded host (check cable, supply and SD card before touching the config); a calibration lost because you did not run SAVE_CONFIG; and a printer.cfg copied from another machine, with different pins, a different rotation_distance or obsolete parameter names, so it refuses to start.
Vendor firmware
Prusa (MK4S, CORE One, XL) runs Buddy, open source (GPL), derived from Marlin and heavily rewritten. It has input shaping, pressure advance and load-cell probing at the nozzle. On the XL and the CORE One it adds phase stepping, a correction to each motor's current, calibrated per machine, that reduces noise and fine vertical marks. You change settings from the menus, PrusaLink or Prusa Connect, and from the G-code in PrusaSlicer's profiles: pressure advance arrives as M572 in the filament start G-code. Prusa ships several releases a year, and an update can change defaults.
Bambu Lab uses closed firmware. You cannot edit the limits, the steps or the input shaping: the machine calibrates itself (resonances, flow dynamics per filament, bed and, on dual-nozzle machines, the offset between nozzles), and Bambu Studio or Orca send each filament's values in the G-code. On the network it works through the cloud by default. Since 2025, firmware with "authorization control" requires third-party software to go through Bambu Connect. With LAN-only mode and, within it, developer mode, local tools talk to the printer without the cloud, at the cost of the cloud features. How to weigh that choice is covered in Closed and open ecosystems.
The rest. Many manufacturers use closed or semi-closed firmware, sometimes on a Klipper base. RepRapFirmware, on Duet boards, is the other open family: it is configured with G-code files and is common on large custom-built machines and some professional ones. Industrial machines are closed and serviced by the manufacturer's technicians.
What closed firmware really gives you: the manufacturer has already measured the printer and the calibrations run on their own, so there are fewer numbers you can get wrong. What it costs you: you cannot fix a wrong default, add a sensor or keep a feature the manufacturer removes.
What you tune, and where
The rule: a value lives where it changes. If it changes with the machine, it goes in the firmware: steps per millimeter, limits, input shaping, probe offset, thermal protections. If it changes with the filament, it goes in the slicer's filament profile: pressure advance K factor, flow, temperatures. If it changes from one part to the next, it goes in the process profile. A value stored in the wrong place is lost or goes wrong as soon as you change spool or printer (Printer, filament and process profiles). The G-code flavor ("G-code flavor") in the printer profile must also match the firmware: Marlin 2, Klipper, RepRapFirmware or the vendor's. With the wrong one, the slicer emits commands the firmware ignores or rejects.
The last command wins: a value sent in the G-code replaces the stored one for that print. Typical failure: you tune pressure advance in printer.cfg, or with M900 and M500, and the filament profile sends a different K at the start of every print, so your tuning never applies. Keep it in the filament profile and nowhere else. How to calibrate it is in Pressure advance and clean corners.
| Value | Marlin | Klipper | Prusa (Buddy) | Bambu Lab |
|---|---|---|---|---|
| Steps per millimeter | M92 + M500 |
rotation_distance in printer.cfg |
factory-set | factory-set, not adjustable |
| Speed and acceleration limits | M201, M203, M204 + M500 |
max_velocity, max_accel, minimum_cruise_ratio |
factory limits; the slicer works below them | factory limits; the slicer works below them |
| Pressure advance | M900 K |
SET_PRESSURE_ADVANCE or pressure_advance |
M572 from the filament profile |
K per filament from the flow dynamics calibration |
| Input shaping | M593, frequency by hand |
SHAPER_CALIBRATE with accelerometer + SAVE_CONFIG |
built in, adjustable in the menu | automatic in the calibration routine |
| Z offset | M851 or baby-stepping + M500 |
probe z_offset, Z_OFFSET_APPLY_PROBE + SAVE_CONFIG |
automatic with the load cell + "Live Adjust Z" | automatic with the probe |
| Mesh fade | M420 Z |
fade_end |
— | — |
| PID tuning | M303 with U1 (without it the result is not applied) + M500 |
PID_CALIBRATE + SAVE_CONFIG |
calibration menu | calibration routine |
| Thermal runaway | compiled in | verify_heater |
fixed | fixed |
Updating without losing your calibration
You update to fix bugs and security flaws, gain new calibrations, or make the machine work with new filament switchers, nozzles or slicer versions. Do not do it blind: an update can wipe or reinterpret the stored calibration and change defaults, and on a closed system it can change what you are allowed to do over the network (Bambu's authorization control). A real case: Prusa's 6.5.3 fixed X and Y input shaping parameters being swapped on its CoreXY machines, and asked anyone who had edited them to restore the factory values or recalibrate.
The routine:
- Read the release notes.
- Do not update before a long print or halfway through a batch.
- Write down your values: Z offset, pressure advance per filament, any edited limit. On Klipper, copy
printer.cfg; on Marlin, save the output ofM503. - Keep the previous firmware in case you need to roll back.
- After updating, run the machine's calibration, or the sequence in What to calibrate, and in what order, and print a test part you know well.
Third-party firmware on a commercial machine. It is possible on open machines or ones with root access. You lose the manufacturer's support and sometimes its own features, and you risk flashing a build for another board or one with the protections disabled. Never disable thermal runaway protection or widen its margins to make an error go away (Fire risk and unattended printing).
When it fails
Firmware error messages are literal and almost always point at the cause. These are the ones you will see most often.
| Symptom | Cause | Fix |
|---|---|---|
| "Unknown command" on a G2 in Klipper | [gcode_arcs] is missing |
Turn off "Arc fitting" in the slicer or add [gcode_arcs] to printer.cfg |
| "Must home axis first" (Klipper) | A move before homing | Put G28 at the start of the start G-code or the START_PRINT macro |
| "Move out of range" (Klipper) or the nozzle crashes | G-code sliced for another printer, or wrong printer profile or G-code flavor | Reslice with this printer's profile |
| The print takes far longer than estimated | The firmware's limits are lower than the profile's | Use the manufacturer's printer profile or emit the limits in the G-code |
| A setting reverts after power-off | M500 or SAVE_CONFIG was not run |
Save after every calibration |
| The first layer changed after an update | The Z offset was reset or the probing routine changed | Recalibrate the Z offset |
| Tuning pressure advance changes nothing | The filament profile sends a different value | Keep the value in the filament profile only |
| "Lost communication with MCU" or "Timer too close" | Cable, host power supply or overloaded host | Check cable, supply and SD card before the config |
| "MINTEMP" or "MAXTEMP" (Marlin) | The thermistor reads out of range: loose, broken or shorted | Check the thermistor and its wiring; do not print until it is fixed |
| "Thermal Runaway", "Heating failed" (Marlin) or "Heater extruder not heating at expected rate" (Klipper) | The block loses heat faster than the protection allows: fan duct changed, silicone sock missing, loose cartridge or thermistor | Fix the hardware and redo the PID tuning |
| A third-party app or slicer cannot send to a Bambu | Authorization control | Bambu Connect, or LAN-only mode with developer mode |
See also
- Printer, filament and process profiles: which profile each value belongs in so nothing overrides it.
- Pressure advance and clean corners: how to calibrate the K the firmware applies.
- Acceleration, resonance and input shaping: acceleration by machine class and how resonance is measured.
- Volumetric flow sets the speed: the speed limit the hotend sets.
