What M900 means
Extrusion pressure does not rise and fall instantly. Marlin Linear Advance changes extruder motion in response to planned speed changes so corners and line starts receive a more consistent amount of material. M900 K selects the calibrated compensation factor; K0 disables the feature.
The number is not portable across firmware families or even necessarily across two hardware setups. Klipper uses SET_PRESSURE_ADVANCE with its own model and units, while RepRapFirmware uses M572. Extruder type, Bowden length, nozzle, material and motion settings all affect calibration, so a value copied from another printer is only a guess.
Syntax and parameters
M900M900 K<factor>M900 K<factor> [T<extruder>]KMarlin Linear Advance factor; K0 disables Linear Advance.
TExtruder index when the relevant multi-extruder option is enabled.
L / SSecondary K slot and slot selection when EXTRA_LIN_ADVANCE_K is enabled.
Practical examples
Report the current factor
M900Requests the current Linear Advance configuration from compatible Marlin firmware.
Set a calibrated factor
M900 K0.18Sets K to 0.18. This example is illustrative, not a recommendation for a particular printer.
Firmware context
| System | Status | What changes |
|---|---|---|
| Marlin | Common | Available only when Linear Advance or the relevant motion feature is compiled and configured. |
| Klipper | Check dialect | Uses SET_PRESSURE_ADVANCE; an M900 macro may exist but is not the native command. |
| RepRapFirmware | Check dialect | Uses M572 for pressure advance, with a value that must not be treated as a Marlin K factor. |
| CNC controllers | Not applicable | Linear Advance is an extrusion-control feature, not a generic CNC M900 meaning. |
What this viewer can show
The viewer does not simulate firmware pressure compensation or change geometry for M900. The command may be present in the file, but visual output shows the commanded path rather than stepper-level advance behavior.
Common mistakes
- Calibrate on the actual printer, extruder, nozzle and material combination.
- Do not translate numeric values directly between Marlin, Klipper and RepRapFirmware.
- A G-code viewer cannot validate whether the firmware feature is compiled, enabled or mechanically well tuned.
Primary sources
This page is an original explanation, reviewed against the firmware documentation below. Always confirm commands against the firmware and configuration on the machine that will execute them.