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…
On this page
| Property | Value |
|---|---|
| Command | M900 |
| Function | Linear advance factor |
| Firmware | Marlin |
| Group | Extrusion |
| Syntax | M900 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
| Parameter | Meaning |
|---|---|
K | Advance factor. Direct drive often 0.02–0.1, Bowden 0.3–1.0 (Linear Advance 1.5) |
Example
M900 K0.06
M500Tips 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.
Related commands
More extrusion commands
| Command | Function | Firmware |
|---|---|---|
G10 | Firmware retract (G10 / G11) | Marlin and Klipper |
G92 | Set position (G92 E0) | Marlin and Klipper |
M82 | Absolute extrusion (M82 / M83) | Marlin and Klipper |
M221 | Flow percentage | Marlin and Klipper |
SET_PRESSURE_ADVANCE | Pressure advance (Klipper) | Klipper |
SET_RETRACTION | Change firmware retraction | Klipper |
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