Linear Advance and Pressure Advance: Extrusion Compensation for Sharp Corners and Clean Prints — 2026 Guide

Your printer lays down perfect straight lines but over-extrudes on corners — blobs at the start of each perimeter, bulging seam lines, and rounded internal corners that should be sharp. The nozzle pressure didn’t drop fast enough when the print head decelerated. Linear Advance (Marlin) and Pressure Advance (Klipper) solve this by predicting and compensating for the pressure lag in the nozzle.

The Problem: Nozzle Pressure Lag

Think of the filament path as a spring. The extruder pushes filament into the melt zone, but the plastic compresses before it exits the nozzle — it’s a compressible column of molten polymer. When the print head slows for a corner, the extruder stops pushing, but residual pressure in the melt zone continues forcing plastic out for a fraction of a second. Result: a blob at the corner entry and a thin line at the corner exit where pressure has fully depleted.

The longer the filament path, the worse the problem. Bowden setups with 300-500mm of PTFE tube have far more spring than direct drive. That’s why Bowden printers show worse corner blobbing — the column of filament between extruder and hotend compresses more.

Linear Advance (Marlin’s term) and Pressure Advance (Klipper’s term) both work the same way: they calculate how much extra filament to push during acceleration and how much to retract during deceleration, proportional to the print speed change. The K factor (a value like 0.05 to 0.15) determines the magnitude of this compensation.

Calibrating Linear Advance (Marlin)

Step 1: Enable Linear Advance in Firmware

Linear Advance (LA) is a compile-time option in Marlin. In Configuration_adv.h, uncomment #define LIN_ADVANCE and recompile. The default K value is 0, which disables it — you’ll set the actual value later via g-code.

On TMC2208/TMC2209 drivers in stealthChop mode, LA can cause the extruder to stall silently. Marlin 2.0.x automatically switches to spreadCycle during LA moves if STEALTHCHOP_E is disabled. If your extruder makes grinding noises during LA calibration, check that the driver is in spreadCycle mode for E — not stealthChop.

Step 2: Print the Calibration Pattern

Marlin includes a built-in calibration tool. Send M900 K0 to reset, then use the Marlin Linear Advance calibration generator (available on the Marlin website) to produce a g-code file that prints lines at varying K values. The pattern prints a series of lines at increasing K factors — typically from 0 to 0.2 in 0.01 increments for direct drive, 0 to 1.5 in 0.05 increments for Bowden.

Step 3: Read the Results

Examine each line. The correct K value produces a line of uniform width from start to end. Too low: the line starts thick and tapers thin (residual pressure pushing extra plastic at the start). Too high: the line starts thin and thickens (over-compensation retracting too much filament).

For direct drive: K typically falls in the 0.04-0.08 range.
For Bowden: K typically falls in the 0.4-1.2 range, depending on tube length and filament type.

Step 4: Store the Value

Once you’ve identified the correct K, send M900 K0.06 (replace with your value) and then M500 to save to EEPROM. Verify with M503 — the saved K value should appear in the output.

Calibrating Pressure Advance (Klipper)

Klipper’s calibration method is more automated. The test print is a square tower with corners at different speeds, and you measure which PA value produces the sharpest corners.

Run the Klipper Pressure Advance calibration command:

TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005

This prints a tower where PA increases by 0.005 every layer. After printing, measure the height at which corner quality is best. If the best corners appeared at 15mm height: 15 × 0.005 = PA value of 0.075.

Direct drive in Klipper: 0.04-0.08
Bowden in Klipper: 0.4-1.0

LA/PA Values by Setup Type

Extruder Type Bowden Length Filament Type Typical K (Marlin) Typical PA (Klipper)
Direct Drive N/A PLA 0.04-0.06 0.04-0.06
Direct Drive N/A PETG 0.06-0.10 0.06-0.09
Direct Drive N/A TPU 0.10-0.20 0.10-0.18
Bowden 300mm PLA 0.4-0.6 0.4-0.6
Bowden 500mm PLA 0.7-1.2 0.7-1.1
Bowden 300mm PETG 0.5-0.8 0.5-0.7
Bowden 500mm PETG 0.8-1.5 0.8-1.4

Recalibrate when you change: filament brand (even same material), nozzle size, print temperature, or extruder type (Bowden to direct drive or vice versa). The K value is specific to the entire filament path at a specific temperature.

Common Mistakes & What Most Printers Get Wrong

Mistake 1: Calibrating LA/PA at the wrong temperature. A K value calibrated at 200°C for PLA is wrong at 215°C — the melt viscosity changes. Calibrate at the temperature you actually print at. If you switch from 200°C PLA to 230°C PETG, recalibrate for the PETG temperature.

Mistake 2: Running linear advance with stealthChop on the extruder. TMC2208/2209 drivers in stealthChop mode can’t handle the rapid extrusion/retraction pulses that LA generates. The extruder stalls and grinds filament. Disable stealthChop on E (STEALTHCHOP_E disabled in Marlin) or use Klipper where the MCU firmware handles this automatically.

Mistake 3: Setting PA too high and getting gaps in the print. If PA is 0.2 on a direct drive setup (should be 0.05-0.08), the extruder retracts so aggressively during deceleration that it creates visible gaps. The symptom: thin lines at the end of each perimeter segment. Reduce PA/LA until the line width is uniform end-to-end.

Mistake 4: Using the same K value for all filaments. PETG is more compressible in the melt zone than PLA — it needs a higher K. TPU is even more compressible. If you calibrated for PLA and started printing PETG with the same K, your corners will still blob. Calibrate per material. Keep a sticky note on the printer with K values for each filament you use regularly.

⚠️ Safety Notice: Linear Advance and Pressure Advance change extruder behavior during prints. After calibrating, always monitor the first layer of your next print — an incorrectly high K value can cause extruder skipping, which grinds filament and creates a partial clog. Filament dust from grinding is a fire hazard if it accumulates near the hotend. Clean your extruder gear regularly when tuning LA/PA.

Pressure Advance in Klipper works best with a consistent extruder. Our E-Step Calibration guide ensures your extruder is feeding accurately before you start tuning PA. If you’re getting stringing that looks like PA-related artifacts, make sure it’s not actually a retraction issue.

For printers running Klipper, a reliable extruder is essential for consistent pressure advance. The BMG dual-gear extruder eliminates the filament slip that causes PA values to drift mid-print — install one before spending hours calibrating advanced features.

Leave a Comment

Scroll to Top