Linear Advance / Pressure Advance — What It Is and How to Set It

Kalibracja Linear Advance i Pressure Advance — pomiar suwmiarką wydruku testowego przy drukarce 3D.

If you're seeing bulging corners on your prints even though temperature and retraction are already dialed in, you're probably missing one thing: pressure compensation in the filament feed path, a feature Marlin calls Linear Advance (K value usually 0.1–2.0) and Klipper calls Pressure Advance (value usually 0.050–1.000). It's a single number in your firmware that tells the extruder to speed up or slow down filament feeding slightly ahead of time so pressure in the nozzle keeps up with the toolhead's speed — without it, the printer constantly runs with a lag that shows up as a blob at corners and "creeping" material on sharp turns. If you've already dialed in retraction for your Bowden or Direct Drive setup, this guide is the natural next step — both features work together and complement each other.

We'll show you how Linear Advance differs from Pressure Advance, how to calibrate each step by step in both firmwares, and which starting values work well for typical setups — Bowden, Direct Drive, an enclosed CoreXY, and multi-material systems like AMS/CFS. Order matters here: this is the last step in the calibration chain, after temperature, flow, and retraction, so it's worth starting only once your earlier settings are already stable.

Starting settings for Linear Advance / Pressure Advance — table

ParameterValueComment
Marlin K — Direct Drive (PLA)0.1–0.4Start at the low end and raise by 0.05 steps
Marlin K — Bowden (PLA)0.6–1.2A longer feed path needs a higher value
Marlin K — Direct Drive (PETG)0.3–0.6PETG is more viscous than PLA
Marlin K — Bowden (PETG)0.8–1.5Test carefully, PETG strings more easily
Klipper PA — Direct Drive0.020–0.060Tuning tower test step: 0.005
Klipper PA — Bowden0.400–0.900Tuning tower test step: 0.020
Typical Pressure Advance range (Klipper)0.050–1.000The high end is practically only for Bowden
smooth_time (Klipper)0.040 s (default)Only change it if you see vibration artifacts on the print
Test speed (fast segment)80–100 mm/sMust clearly differ from the slow segment
Test speed (slow segment)20–25 mm/sSpeed contrast is what reveals the difference on the print

The values in the table are a starting point, not a finished result — you'll find the full step-by-step calibration further down, and you can check base temperature settings for your material in the print temperature table.

Why Linear Advance and Pressure Advance exist at all

An extruder isn't a simple piston — it's a springy system. Filament in the feed path compresses and expands slightly, and pressure in the heating chamber builds and drops with a lag relative to the motor's movement. When the toolhead moves in a straight line at constant speed, the system is in balance and you don't notice a problem. The trouble starts at corners and at speed changes: the toolhead slows down, but pressure in the nozzle still "closes out" excess material for a moment, so a bulge appears at the corner. On acceleration the opposite happens — pressure briefly drops and the line gets thinner.

Linear Advance and Pressure Advance solve this mathematically rather than mechanically: the firmware calculates ahead of time how much extra (or less) extruder motion is needed at a given moment so that nozzle pressure keeps up with toolhead speed. That's a different layer of correction than retraction — retraction handles gaps in extrusion, for example travel moves with no printing, while Linear Advance/Pressure Advance compensates for pressure during continuous printing. That's why both features make sense together, not instead of one another; if retraction isn't dialed in yet, K-factor won't give you clean corners either, because the errors will stack. We covered full retraction values for different setups in our guide on extruder e-steps calibration — another foundation that correct K-factor calibration builds on.

It's also worth understanding that the effect is larger the longer and "softer" the filament feed path is. In a Direct Drive setup the motor sits right above the hotend, so the pressure lag is small — hence the low K and PA values. In a Bowden setup the filament travels tens of centimeters through a PTFE tube before it reaches the nozzle, and the tube itself flexes a bit under pressure — which is why values there can be several times higher.

How Linear Advance (Marlin) differs from Pressure Advance (Klipper)

Both features do roughly the same thing, but they calculate it differently and you set them with different commands.

Marlin — K-factor and the M900 command

In Marlin the value is called the K-factor and you enter it with the M900 K command, for example M900 K0.35, usually in the slicer's start G-code or directly in the firmware configuration. You need Linear Advance enabled when compiling the firmware — without it, the M900 command simply does nothing. The typical range for version 1.5 is 0.1–2.0, with Bowden needing a noticeably higher value than Direct Drive.

Klipper — SET_PRESSURE_ADVANCE and smooth_time

In Klipper you enter the value with the SET_PRESSURE_ADVANCE ADVANCE=0.4 command, or as pressure_advance in the extruder section of printer.cfg. Klipper also has a smooth_time parameter, which smooths the value over time — the default is 0.040 seconds. Changing smooth_time only makes sense if you see vibration artifacts on the print after setting the correct PA; in most cases leave it at the default and focus solely on PA itself.

How to calibrate Linear Advance in Marlin step by step

Test tower and the K-factor formula

The simplest method is to generate a test G-code from Marlin's tool, which creates a pattern with alternating fast and slow print segments — the speed contrast needs to be clear, otherwise the K-factor effect is barely visible. Print the pattern on a single test wall, at speeds of around 20–25 mm/s (slow) and 80–100 mm/s (fast), then look at which K value gives you the most even corners, without bulges or thin spots.

Reading the result and entering the value

Once you've found the best segment on the print, enter the K value you read off with the M900 K command in the slicer's start G-code for that material. Save a separate value for PLA, a separate one for PETG, and a separate one for ABS/ASA — K-factor depends on the viscosity of the molten material, so you can't use one universal number for everything.

How to calibrate Pressure Advance in Klipper

TUNING_TOWER — the automatic test

Klipper has a built-in TUNING_TOWER macro that lets you test a range of PA values on a single print, changing the value automatically layer by layer. For Direct Drive start with a step of 0.005, for Bowden a step of 0.020 — these are the values recommended in Klipper's documentation. The command looks something like this: TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=0.020.

The square tower test and the final formula

For the test use a model shaped like a hollow square, printed with zero infill and a high speed (around 100 mm/s), with dynamic acceleration control disabled. After printing, measure the height at which the corners look best, and calculate: PA value = START + measured height × FACTOR. An example from Klipper's documentation: with FACTOR=0.020 and a measured height of 12.90 mm, the result is 0 + 12.90 × 0.020 = 0.258.

Bowden vs Direct Drive — why the values differ so much

In Direct Drive the extruder motor is mounted right above the hotend, so the filament's path to melting is only a few centimeters — the pressure lag is small, hence K and PA are low. In Bowden the motor sits on the printer's frame, and filament travels through a PTFE tube as much as 30–50 cm before reaching the hotend; the tube flexes slightly and the filament has more room to compress, so the lag is bigger and requires a several-times-higher compensation value.

The same applies to AMS and CFS systems, i.e. multi-material setups — the filament travels an even longer and more winding path through the feed system, so start calibration from Bowden-range values and tune upward if you still see bulging corners.

How Linear Advance/Pressure Advance works together with retraction and speed

Calibration order matters: set temperature and flow first, then retraction, and only at the end K-factor or PA. If you change retraction after calibrating Linear Advance, the K value will likely stop being optimal and you'll need to redo the test — both features affect the same phenomenon from two different angles.

Higher accelerations and higher print speeds increase the pressure difference between fast and slow segments, so with very fast profiles — for example CoreXY at high mm/s — the effect of a bad K-factor is more visible than on a slow Cartesian printer. If you're only now raising your speeds, it's worth redoing the Linear Advance/Pressure Advance calibration after every major change to your speed or acceleration profile.

Settings for popular configurations

ConfigurationMarlin KKlipper PANote
Bowden0.6–1.20.400–0.900Start at the upper half of the range
Direct Drive0.1–0.40.020–0.060A low value is usually enough
Enclosed CoreXY0.2–0.60.030–0.080Higher ambient temperature changes material viscosity
AMS / CFS (multi-material)0.7–1.30.450–0.950Treat it like a long Bowden, calibrate separately for each material

Most common mistakes

Calibrating on one material and carrying the result over to all others. K-factor and PA depend on melt viscosity, so PLA, PETG, and ABS each need their own values.

Too little speed contrast in the test. If the fast and slow segments differ by only 10–15 mm/s, the differences on the print are barely visible and it's hard to pick a good value.

Calibrating before setting up retraction. Changing retraction after calibrating K-factor almost always means redoing the test.

Ignoring the Bowden/Direct Drive difference. Entering a value found online without checking whether it came from a similar setup usually gives a worse result than no compensation at all.

Forgetting M900/PA in every material profile in the slicer. If the value is only entered in one profile, switching materials will make the firmware revert to the previous number.

Changing smooth_time in Klipper too often. That's a parameter for mechanical vibration, not for fixing bad PA results — changing it instead of properly calibrating PA masks the problem instead of solving it.

Testing on a model without sharp corners. Without clear corners it's hard to judge whether K-factor actually improved anything — always use a dedicated test pattern.

Frequently asked questions

Are Linear Advance and Pressure Advance the same thing?

Functionally, yes — both compensate for pressure lag in the filament feed path. They differ in name, in how you enter the value, and in firmware: Linear Advance runs in Marlin (the M900 K command), Pressure Advance in Klipper (SET_PRESSURE_ADVANCE or an entry in printer.cfg).

What K value is safe to start with?

For Direct Drive start around 0.2, for Bowden around 0.6, then refine with a tower test — these are safe starting points that rarely ruin a print, even if they're not yet optimal.

Do I need to calibrate separately for every nozzle?

Yes — if you change nozzle diameter, for example from 0.4 to 0.6 mm, material flow changes and your previously chosen K or PA value stops fitting, so it's worth repeating a short test.

What if corners still bulge after calibration?

Check retraction and temperature first — if the material is too hot or retraction is too weak, K-factor alone won't fix it, because that's a different layer of correction addressing a different phenomenon.

Does Pressure Advance work together with Input Shaping?

Yes, they're two independent features in Klipper — Input Shaping dampens mechanical vibration, i.e. ringing, while Pressure Advance corrects pressure in the nozzle. It's worth calibrating both, but separately and in any order.

Summary

Linear Advance in Marlin and Pressure Advance in Klipper solve the same problem — pressure lag in the filament feed path, visible as bulging corners and unstable lines at speed changes. The starting value depends mainly on the length of the feed path: Direct Drive needs a low K (0.1–0.4) or PA (0.020–0.060), Bowden needs a noticeably higher one, and a test tower with clear speed contrast lets you dial in the exact number for your material and setup.

If you're still fine-tuning your print profile, it's a good idea to go through calibration in this order: temperature, flow, retraction, and finally Linear Advance/Pressure Advance — each step builds on the previous one. You'll find test materials in our technical filament collection — a stable, well-dried filament, such as Porima PLA, makes it easier to read a clean calibration result without interference from moisture or an unstable diameter.