What does linear advance do?
Linear advance pushes extra filament while the toolhead speeds up and less while it slows, in proportion to extrusion speed, so lines keep full width instead of starting thin and bulging at corners. It is what Marlin and Prusa’s MK3 firmware call pressure advance. Its strength is the K factor (M900 K), around 0.1 to 2.0 in Marlin.
The number
| Firmware | Name, and where K is set | Off | K values its makers give |
|---|---|---|---|
| Marlin 1.1.9 to 2.1.2.9 | Linear Advance 1.5: M900 K, or LIN_ADVANCE_K in Configuration_adv.h (ADVANCE_K from 2.1.2) |
M900 K0 |
Around 0.1 to 2.0; sample K 0.22 |
| Marlin 1.1.8 and earlier | Linear Advance 1.0: M900 K |
M900 K0 |
30 to 130 for PLA; sample 75 |
| Prusa MK3S, MK3, MK2.5S, MK2.5, firmware 3.9.0 and later | Linear Advance 1.5: M900 K in PrusaSlicer’s filament start G-code |
M900 K0 |
PLA 0.05, PETG 0.08, ASA and ABS 0.04 (0.4 mm nozzle) |
| Prusa MK4/S, MK3.9/S, XL, MINI/+, firmware 5.0.0 and later | Pressure Advance: M572 S; an M900 K is converted 1:1 |
M572 S0 |
Set per nozzle size in PrusaSlicer’s start G-code |
| Klipper v0.13.0 | Pressure advance: pressure_advance in [extruder], or SET_PRESSURE_ADVANCE ADVANCE= |
0, the default | 0.050 to 1.000, the high end for Bowden extruders |
| Bambu Lab | Flow Dynamics: “Factor K”, from Bambu Studio’s calibration | No off value: Bambu Studio’s K fields accept only above 0 and below 2 | 0.015 in Bambu’s PLA Basic example, 0.4 mm nozzle |
Values come from Marlin’s docs and the Configuration_adv.h of Marlin 1.1.8, 1.1.9 and 2.1.2.9; Prusa’s Linear Advance and Pressure Advance articles; Klipper’s v0.13.0 docs; and Bambu Lab’s Flow Dynamics Calibration wiki page.
Why do lines start thin without it?
Because nozzle pressure lags the extruder. Marlin’s docs treat the filament between drive gear and nozzle as a spring that must compress before it extrudes, so a fast line starts starved, ends over-extruded and bleeds out at corners (how pressure advance works).
- Drive gear runs ahead as the head speeds up
- Without linear advance the line starts thin
- With it the line is full width from the start
What does “linear” mean in linear advance?
The extra push is a straight multiple of speed: advance equals K times the change in extrusion speed, so doubling one doubles the other. Marlin’s Configuration_adv.h calls the feature “Linear Pressure Control”.
Linear advance vs pressure advance: what is the difference?
They are one correction under two names, measured in the same unit; only the implementation differs.
- Marlin Linear Advance 1.5 runs the extruder at a fixed speed offset during each pressure change. If that offset would exceed the extruder jerk limit, it lowers print acceleration for the move, most often on Bowden printers.
- Klipper averages extruder velocity over
pressure_advance_smooth_time, 0.040 s by default (what smooth time does), and puts no limit on the extra extruder movement.
Slicers treat them as one number. Bambu Studio’s and OrcaSlicer’s tooltips describe the setting as “Pressure advance (Klipper) AKA Linear advance factor (Marlin)”, and OrcaSlicer writes it as M900 K for Marlin or SET_PRESSURE_ADVANCE ADVANCE= for Klipper. Neither firmware’s docs say a tuned value carries across, and both tie it to the extruder, nozzle and filament. Retest before you trust a carried-over value.
Is pressure advance the same as the K value?
No: pressure advance is the feature, and K is the number that sets its strength. Klipper names that number pressure_advance, Marlin takes it as M900 K and Bambu Lab calls it Factor K (where it is in Bambu Studio). Bambu’s wiki says K is just a common letter for a constant.
What is the linear advance K factor?
It is how far ahead the extruder runs, in millimeters of filament per 1 mm/s of extrusion speed: Prusa’s PLA value of 0.05 means 0.05 mm ahead per 1 mm/s. M900 K0.05 sets it, M900 alone reports it and M900 K0 turns it off. Marlin says to go higher for flexible filament or a longer filament path, so Bowden extruders need more than direct drive.
Marlin’s sample of 0.22 was written for 3 mm PLA on a direct drive with about 6.5 cm from drive gear to heat break. In Marlin 2.1.2.9’s Configuration_adv.h the setting is ADVANCE_K; releases up to 2.1.1.7, and Marlin’s docs page, call it LIN_ADVANCE_K.
Why are some K values 30 to 130 and others 0.05?
The big ones are Linear Advance 1.0 values, on a different scale. Marlin’s docs put 1.0 values for PLA at 30 to 130 and 1.5 values at around 0.1 to 2.0, so a K above 10 was written for 1.0. Marlin 1.1.8 and earlier run 1.0 (sample K 75); 1.1.9 and later run 1.5 (sample 0.22). Recalibrate rather than reuse an old value: Marlin 2.1.2.9 rejects anything above 10 with ?K value out of range (0-10).
Prusa’s MK3 firmware takes both from 3.9.0: an M900 K below 10 switches it to 1.5, and 1.0 values are converted automatically. Converted values can differ from ideal 1.5 ones, so Prusa recommends reslicing with 1.5 values.
How to check it on your own print
- Confirm it is compiled in. Send
M900from a terminal such as Pronterface or OctoPrint. A reply startingecho:Advance K=means your firmware has it;echo:Unknown command: "M900"means the build left it out. Marlin’s stockConfiguration_adv.hleaves#define LIN_ADVANCEcommented out: uncomment it and reflash. - Calibrate the extruder’s steps/mm, then print a K test. Marlin’s calibration pattern prints each line slow, fast, slow and raises K line by line. For Linear Advance 1.5, run it from about 0.1 to 2.0 and keep the line whose speed changes barely show (how to read the test). On the MK3, Prusa offers calibration G-code per material.
- Read the corners. Blobs on sharp corners mean raise K; missing filament means lower it (signs K is too high).
- Set it per filament. Put
M900 K<value>at the end of the start G-code: in PrusaSlicer, the custom G-code section of Filament Settings; in Cura, Settings > Printer > Manage Printer > Machine Settings. Marlin’s docs then recommend a firmware K of 0. - Turn off slicer workarounds that Marlin’s docs say interfere: coasting (“Coast at end”), extra restart length after retract, wipe while retracting and combing.
- Recheck retraction. Marlin says it may drop as low as 0 once K is tuned; Klipper’s docs still suggest a small retract, such as 0.75 mm.
- If the extruder skips or moves slow down, K is too high for that acceleration. Lower K or acceleration; on Marlin, also check the extruder jerk setting or shorten the Bowden tube. Klipper’s docs flag values over about 0.200 for skipping.
- Recalibrate after changing filament, print temperature, nozzle or extruder.
Sources
- Linear Advance, Marlin Firmware documentation (accessed October 24, 2026)
- M900 Linear Advance Factor, Marlin Firmware documentation (accessed October 24, 2026)
- Marlin/Configuration_adv.h at 2.1.2.9, Marlin on GitHub (accessed October 24, 2026)
- Marlin/Configuration_adv.h at 2.1.1.7, Marlin on GitHub (accessed October 24, 2026)
- Marlin/Configuration_adv.h at 1.1.9, Marlin on GitHub (accessed October 24, 2026)
- Marlin/Configuration_adv.h at 1.1.8, Marlin on GitHub (accessed October 24, 2026)
- Marlin/src/gcode/feature/advance/M900.cpp at 2.1.2.9, Marlin on GitHub (accessed October 24, 2026)
- Marlin/src/gcode/gcode.cpp at 2.1.2.9, Marlin on GitHub (accessed October 24, 2026)
- Marlin/src/gcode/parser.cpp at 2.1.2.9, Marlin on GitHub (accessed October 24, 2026)
- Marlin/src/core/language.h at 2.1.2.9, Marlin on GitHub (accessed October 24, 2026)
- Linear Advance, Prusa Knowledge Base (accessed October 24, 2026)
- Pressure Advance, Prusa Knowledge Base (accessed October 24, 2026)
- 3.9.0 Firmware for MK3, MK3S, MK2.5 and MK2.5S, release notes, Prusa-Firmware on GitHub (accessed October 24, 2026)
- docs/Pressure_Advance.md at v0.13.0, Klipper on GitHub (accessed October 24, 2026)
- docs/Kinematics.md at v0.13.0, Klipper on GitHub (accessed October 24, 2026)
- docs/Config_Reference.md at v0.13.0, Klipper on GitHub (accessed October 24, 2026)
- docs/G-Codes.md at v0.13.0, Klipper on GitHub (accessed October 24, 2026)
- Flow Dynamics Calibration, Bambu Lab Wiki (accessed October 24, 2026)
- src/libslic3r/PrintConfig.cpp at v02.08.02.61, Bambu Studio on GitHub (accessed October 24, 2026)
- src/libslic3r/PrintConfig.cpp at v2.4.2, OrcaSlicer on GitHub (accessed October 24, 2026)
- src/libslic3r/GCodeWriter.cpp at v2.4.2, OrcaSlicer on GitHub (accessed October 24, 2026)
- src/slic3r/Utils/CalibUtils.cpp at v02.08.02.61, Bambu Studio on GitHub (accessed October 24, 2026)