3D printer G-code · Marlin

M900: Linear advance factor (Marlin)

Linear advance factor — Sets the K factor of Linear Advance. The firmware pushes extra filament when the head accelerates and less when it brakes, so the pressure in the nozzle follows the…

By cnccode · Updated
On this page
  1. What does M900 do?
  2. Parameters
  3. Example
  4. Tips from practice
  5. Related commands
  6. More extrusion commands
  7. Frequently asked questions
PropertyValue
CommandM900
FunctionLinear advance factor
FirmwareMarlin
GroupExtrusion
SyntaxM900 K<factor>

What does M900 do?

Sets the K factor of Linear Advance. The firmware pushes extra filament when the head accelerates and less when it brakes, so the pressure in the nozzle follows the speed. Corners become sharp and line ends no longer bulge. Klipper calls this pressure advance.

Parameters

ParameterMeaning
KAdvance factor. Direct drive often 0.02–0.1, Bowden 0.3–1.0 (Linear Advance 1.5)

Example

G-code
M900 K0.06
M500

Tips from practice

  • Find K with a pressure advance tower or a pattern test.
  • The value changes with filament, temperature and nozzle.
  • Some stepper drivers in standalone mode do not work well with linear advance.

Marlin. Many Marlin commands only exist when the feature is enabled in the firmware build. If the printer answers "Unknown command", the feature is missing. Klipper does not understand most of these settings codes; it uses printer.cfg instead.

More extrusion commands

CommandFunctionFirmware
G10Firmware retract (G10 / G11)Marlin and Klipper
G92Set position (G92 E0)Marlin and Klipper
M82Absolute extrusion (M82 / M83)Marlin and Klipper
M221Flow percentageMarlin and Klipper
SET_PRESSURE_ADVANCEPressure advance (Klipper)Klipper
SET_RETRACTIONChange firmware retractionKlipper

Test it before you print

Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.

Open the simulator

Frequently asked questions

What does M900 do on a 3D printer?
M900 is linear advance factor. Sets the K factor of Linear Advance. The firmware pushes extra filament when the head accelerates and less when it brakes, so the pressure in the nozzle follows the speed. Corners become sharp and line ends no longer bulge. Klipper calls…
Does M900 work in Klipper and Marlin?
M900 is a Marlin command. Klipper uses its own commands and printer.cfg settings for this task.
Was this page helpful?