Print a calibration cube. Look at the corners. If they bulge outward — a visible “blob” at each vertex where the nozzle changes direction — your printer is over-extruding at deceleration points because the filament is still oozing while the nozzle slows down. Linear Advance (Marlin) and Pressure Advance (Klipper) solve this by predicting and pre-compensating for the pressure lag inside the nozzle. It’s the single highest-impact calibration you can do after e-steps and first layer.
The Physics Problem: Why Corners Bulge
Filament isn’t rigid. It’s a compressible, viscoelastic fluid inside the hotend. When the extruder pushes filament, the melt zone compresses slightly before the nozzle pressure rises enough to extrude. When the extruder stops or decelerates for a corner, the compressed filament continues to ooze for 10–30ms — roughly the time it takes the melt-zone pressure to equalize to atmospheric.
This produces a characteristic pattern: a slight under-extrusion at line start (pressure building), over-extrusion mid-line (pressure stable), and a bulge at line end (residual pressure bleeding out). Linear Advance addresses this by retracting filament slightly before deceleration events and advancing it slightly before acceleration events, canceling the compression/decompression lag.
The Parameter: What the “K” Value Means
Both Linear Advance (Marlin M900 K0.05) and Pressure Advance (Klipper pressure_advance: 0.05) use a K-factor that represents the time constant of filament compression — essentially, how many seconds of extrusion flow are “stored” as compression in the melt zone.
A K of 0.05 means the nozzle needs 0.05 seconds (50ms) of advance or retraction to compensate for compression effects. Higher K values = more compressible filament or longer melt zone.
Calibration Procedure (Marlin — Linear Advance)
- Enable Linear Advance:
M900 K0(temporary, for testing). - Print the Marlin Linear Advance calibration pattern (available on Thingiverse and Printables — search “Marlin Linear Advance test”).
- The pattern prints lines at progressively higher K values (typically 0 to 0.2 in 0.01 increments).
- Examine each line:
– Correct K: Line width is uniform with no visible bulge at the line end.
– Too low: Bulge at line end, slightly thinner at line start.
– Too high: Gap at line start, line-end is thin — over-compensation. - Choose the K value where the line is most uniform from start to end.
- Save permanently:
M500(EEPROM) or addM900 K0.05to start G-code.
Calibration Procedure (Klipper — Pressure Advance)
Klipper’s method is more interactive and precise:
- Ensure
pressure_advance: 0in[extruder]section of printer.cfg. RESTART. - Print a 100mm square, single wall, 0.4mm line width, 0.2mm layer height, at 100mm/s.
- In Mainsail/Fluidd console, send tuning commands mid-print:
SET_PRESSURE_ADVANCE ADVANCE=0.02 - Observe 10mm of extrusion. Increase by 0.005 increments:
SET_PRESSURE_ADVANCE ADVANCE=0.025
SET_PRESSURE_ADVANCE ADVANCE=0.03 - The correct value produces uniform line width at the corner — no bulge, no gap.
- Add the final value to printer.cfg:
pressure_advance: 0.045
Per-Filament K Values: Reference Table
The required K value depends primarily on filament stiffness (shore hardness) and melt viscosity:
| Filament Type | Direct Drive K (Marlin) | Bowden K (Marlin) | Pressure Advance (Klipper) | Notes |
|---|---|---|---|---|
| PLA (standard) | 0.04–0.06 | 0.4–0.8 | 0.04–0.06 | Most consistent, calibrate once |
| PLA+ / Tough PLA | 0.05–0.08 | 0.5–1.0 | 0.05–0.08 | Slightly softer, more compression |
| PETG | 0.06–0.10 | 0.6–1.2 | 0.06–0.10 | Higher viscosity, needs more compensation |
| ABS | 0.04–0.07 | 0.4–0.9 | 0.04–0.07 | Similar to PLA but temperature-dependent |
| ASA | 0.05–0.08 | 0.5–1.0 | 0.05–0.08 | Similar to ABS |
| TPU (95A) | 0.10–0.20 | 0.8–2.0+ | 0.10–0.20 | Very compressible, wide range |
| TPU (85A) | 0.20–0.40 | Not recommended | 0.20–0.40 | May not extrude reliably on Bowden |
| Nylon (PA6) | 0.06–0.10 | 0.6–1.2 | 0.06–0.10 | Hygroscopic, calibrate with dry filament |
| PC (Polycarbonate) | 0.05–0.08 | 0.5–1.0 | 0.05–0.08 | High temp, low compressibility |
These are starting points, not universal values. Every hotend geometry (nozzle diameter, melt zone length, heat break design) shifts the K value. Calibrate per printer, per filament — the 10 minutes it takes saves hours of failed prints.
Parameter Interaction: K Value vs Print Speed
The K value is theoretically independent of print speed — it represents a time constant, not a distance. However, at very high speeds (>150mm/s), the extruder motor may not have the torque to execute the rapid retraction/advance pulses that Linear Advance commands. This produces a characteristic “clicking” from the extruder stepper during direction changes.
If you hear extruder clicking during directional changes at high speed:
1. Reduce print speed by 25mm/s and retest.
2. Increase extruder stepper current by 50–100mA (within motor specs).
3. On Klipper, reduce pressure_advance_smooth_time in [extruder] — this spreads the compensation over more time, reducing instantaneous torque demands.
Marlin vs Klipper: Key Differences
| Feature | Marlin Linear Advance | Klipper Pressure Advance |
|---|---|---|
| Configuration | M900 K0.05 in G-code or EEPROM |
pressure_advance: 0.05 in printer.cfg |
| Tuning | Print calibration pattern, pick best | Live-tune via console during print |
| Per-filament switching | Requires G-code change or filament profile | Can be set in filament-specific macros |
| Smooth time | Fixed | Adjustable via pressure_advance_smooth_time |
| StealthChop compatibility | Issues on some TMC drivers | Works reliably with StealthChop |
| Square Corner Velocity | Required to enable LA in Marlin | Not applicable, always active |
The biggest practical difference: Klipper lets you change pressure advance mid-print from the console, making calibration dramatically faster. Marlin requires re-printing the test pattern for each attempt.
Common Mistakes & What Most Users Get Wrong
Mistake 1: Calibrating Linear Advance before calibrating e-steps. Linear Advance assumes your baseline extrusion rate is correct. If you’re over-extruding by 5% because your e-steps are off, no K value will produce clean corners — you’re compensating for two problems with one variable and the result will be wrong at different speeds. E-steps first, flow rate second, Linear Advance third.
Mistake 2: Using the same K value for every nozzle temperature. Filament viscosity is strongly temperature-dependent. PLA at 200°C has roughly 30% higher melt viscosity than PLA at 220°C. A K value calibrated at 200°C will be too high at 220°C (over-compensation) and too low at 190°C (under-compensation). If you change nozzle temperature, re-calibrate Linear Advance.
Mistake 3: Expecting Linear Advance to fix all corner artifacts. Linear Advance addresses extrusion-rate corner artifacts. It does not fix ringing/ghosting (use input shaping), layer shifts (check belt tension), or Z-seam visibility (use coasting, wipe, or seam painting). Diagnose the specific corner problem before reaching for the K value.
Mistake 4: Setting K too high on Bowden setups. Bowden extruders with long PTFE tubes require very high K values (0.4–1.2) because filament compression happens along the entire tube length. At these values, the extruder motor makes rapid back-and-forth movements that can wear the filament, grind it, or overheat the stepper. If your Bowden setup needs K > 1.0 for clean corners, consider converting to direct drive — the print quality improvement is more dramatic than any firmware compensation.
⚠️ Regulatory Notice: Linear Advance and Pressure Advance are firmware-level extrusion compensation features that do not modify the printer’s safety systems (thermal runaway, endstop logic, power failure recovery). However, modifying start G-code to include
M900commands does affect print behavior. In 2026, for printers used in commercial or educational settings, document any firmware parameter changes in the printer’s maintenance log. Always test Linear Advance with a calibration print before using it on production parts — incorrect K values can cause layer adhesion failures that are invisible on the surface but weaken the part structurally.
See Also
Linear Advance pairs with other extrusion calibrations. Before tuning K, make sure your extrusion fundamentals are solid — see our e-step and flow rate calibration guide. If you’re dealing with stringing alongside corner blobs, our stringing solutions guide covers retraction and coasting. For Klipper users who want the full calibration suite, the input shaping calibration guide addresses the ringing half of corner quality.
Clean corners start with a hotend that has consistent melt-zone geometry. The Slice Engineering Copperhead hotend uses a bimetallic heat break that creates a sharp thermal transition — reducing the melt zone length and making pressure advance behavior more predictable across temperature ranges. I’ve installed these on all my direct-drive printers and K values now hold consistent within ±0.005 across 190–230°C.
