Every print with sharp corners has the same problem: the nozzle slows down for the corner, but the pressure built up inside the melt zone doesn’t dissipate instantly. Result: bulging corners, inconsistent line widths, and seams you can feel with a fingernail. Linear Advance (Marlin) and Pressure Advance (Klipper) solve this by predicting the pressure change and adjusting extruder output before the nozzle changes speed. The calibration takes one test print per filament type. That’s 15 minutes for corners that are actually square.
Linear Advance / Pressure Advance: What It Fixes
Extrusion isn’t instant. When your nozzle moves at 60mm/s, there’s pressure built up in the melt zone pushing filament out. When the nozzle decelerates for a corner, that pressure keeps pushing — excess plastic oozes out and creates a bulge. When the nozzle accelerates out of the corner, it takes a moment for pressure to rebuild — causing a thin spot.
Pressure advance works by moving the extruder slightly ahead of the nozzle movement. During deceleration, the extruder retracts a tiny amount to relieve pressure. During acceleration, it pushes extra filament to rebuild pressure before the nozzle reaches full speed. The result: consistent extrusion regardless of speed changes.
How Linear Advance Works in Marlin
In Marlin firmware, Linear Advance uses a K-factor value (typically 0.0 to 2.0) that represents how much the extruder should lead or lag the nozzle movement. The formula the firmware uses:
extruder_position = (K × nozzle_acceleration × filament_cross_section) + base_extrusion
A K-factor of 0 means Linear Advance is off. Higher values produce more aggressive pressure compensation. The correct value depends on your filament type, hotend design, and print temperature.
Enabling in Marlin:
M900 K0.05 ; set K-factor
M500 ; save to EEPROM
How Pressure Advance Works in Klipper
Klipper’s implementation is called Pressure Advance and uses a slightly different algorithm with a value in seconds (typically 0.0 to 0.2). It represents how far in advance the extruder should start compensating for pressure changes.
Enabling in Klipper (printer.cfg):
[extruder]
pressure_advance: 0.04
Calibration: Finding the Right K-Factor
Marlin Linear Advance Calibration (Pattern Method)
- Download the Marlin Linear Advance calibration pattern from the Marlin website. It prints lines with varying K-factors printed next to each other.
- Slice the pattern with your normal print settings — temperature, speed, layer height. Do not change these for the test.
- Print and examine the lines. The correct K-factor is the line where:
– The line width is most consistent from end to end
– The starting point of the line has no bulge
– The ending point of the line shows clean cutoff without a blob - If lines look identical from K=0.0 to K=2.0, Linear Advance may not be enabled in firmware. Verify with
M503and check forM900.
Klipper Pressure Advance Calibration (Tower Method)
- In the Klipper web interface, run the Pressure Advance tuning command:
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005 - This prints a tower where pressure advance increases every 1mm of height
- Examine the tower. The correct value is at the height where:
– Corners are sharp with no bulging
– There’s no gap between the perimeter and the infill at the top surface
– The top layer is smooth and fully filled - Measure the height of the best-looking region with calipers, multiply by the FACTOR, and round to the nearest 0.005
Per-Filament Values (Starting Points)
| Filament | Marlin K-Factor (Direct Drive) | Marlin K-Factor (Bowden) | Klipper ADVANCE |
|---|---|---|---|
| PLA | 0.02-0.05 | 0.4-0.8 | 0.02-0.05 |
| PETG | 0.04-0.08 | 0.5-1.0 | 0.04-0.08 |
| TPU | 0.08-0.15 | N/A | 0.08-0.15 |
| ABS | 0.03-0.06 | 0.4-0.9 | 0.03-0.06 |
| ASA | 0.03-0.06 | 0.4-0.9 | 0.03-0.06 |
Bowden setups need significantly higher K-factors because the long filament path acts like a spring — more pressure compensation is needed to overcome the elasticity of the filament inside the tube.
Linear / Pressure Advance Parameter Table
| Parameter | Marlin (Linear Advance) | Klipper (Pressure Advance) | Effect if Too High | Effect if Too Low |
|---|---|---|---|---|
| K-factor/Advance | 0.0-2.0 (unitless) | 0.0-0.2 (seconds) | Under-extrusion at start of lines, gaps | Bulging corners, inconsistent width |
| Smooth Time | 0.02-0.04 (optional) | 0.04 (smooth_time) | Delayed response, corners still bulge | Extruder jerks, visible stepping |
What Most People Get Wrong
Mistake 1: Using the same K-factor for all filaments. PLA at 200°C has different melt viscosity than PETG at 240°C. They require different pressure compensation. Consequence: You calibrate once with PLA, prints look perfect, then your PETG prints have bulging corners and you wonder why. Fix: Calibrate separately for every filament type you use. Save the values in your slicer’s start G-code with M900 K{value} for Marlin or in separate Klipper filament profiles.
Mistake 2: Calibrating Linear Advance with wet filament. Moist filament creates inconsistent extrusion that masquerades as pressure issues. The calibration pattern shows erratic results and the “best” K-factor is basically random. Consequence: You set K-factor based on moisture artifacts, actual prints look worse than with Linear Advance disabled. Fix: Dry your filament before calibration. If you see inconsistent line widths across all K-factors on the test pattern, the problem is moisture or partial clog — not pressure advance.
Mistake 3: Enabling Linear Advance on a printer with a loose extruder tension arm. Linear Advance commands rapid, small extruder movements. A loose tension arm or worn extruder gear will skip during these micro-movements. Consequence: Rhythmic under-extrusion that looks like evenly-spaced gaps in the print — often mistaken for a clogged nozzle. Fix: Ensure your extruder has proper tension, the gear isn’t worn, and the filament path has no obstructions before enabling Linear Advance. The feature exposes mechanical weaknesses that plain extrusion masks.
Mistake 4: Not disabling Linear Advance for certain features. Linear Advance and certain other features interact poorly. Coasting (slicer feature that stops extrusion slightly before the end of a line) combined with Linear Advance can cause gaps. In Marlin, Linear Advance is incompatible with Junction Deviation — you must use Classic Jerk instead. Consequence: Weird gaps at seam locations or inconsistent corner quality. Fix: Disable Coasting when using Linear Advance. In Marlin, ensure M900 is set and Junction Deviation is off (M205 J0 or not configured).
⚠️ Safety Notice: Always follow manufacturer safety guidelines when calibrating your 3D printer. Calibration involves moving extruder and axes at potentially high speeds — keep hands clear during operation. Hotend temperatures during calibration exceed 200°C. Ensure your printer is on a stable, fire-resistant surface. Some filaments (ABS, ASA) emit fumes — use in a well-ventilated area with proper filtration.
For the firmware foundation that makes Pressure Advance possible, see our Klipper Firmware Installation Guide. If you’re chasing extrusion consistency alongside pressure advance calibration, our 3D Printer E-Step Calibration guide covers proper extruder tuning.
The Trianglelab CHC Pro hotend with its ceramic heater and short melt zone responds to Pressure Advance changes noticeably faster than standard hotends — if you’re serious about corner quality on fast prints, a high-flow hotend with low melt-zone volume makes a measurable difference. For budget Marlin setups, a standard E3D V6 with a properly calibrated K-factor already produces corners clean enough for drone mounts and functional parts.
