Pressure Advance, Finally Explained: Tune It Right on Klipper, Marlin, or Duet
Share
Pressure Advance, Finally Explained: Tune It Right on Klipper, Marlin, or Duet
Last updated: September 2026 · By Advanced 3D Printing
You printed a Benchy and the corners look like they were drawn by a nervous accountant. Your slicer has a setting called “Pressure Advance” (Klipper and Duet) or “Linear Advance” (Marlin) — the exact same idea under two names — and the internet is full of confident but contradictory advice about it.
This guide is the one page we wished existed when we started: what pressure advance actually does, why the number means different things on different firmwares, and a calibration procedure you can actually follow — with a free G-code generator at the bottom that supports Klipper, Marlin, and RepRapFirmware.
TL;DR: → Generate your test file here (pick your firmware + drive type, print it, read the corners, save the value). The rest of this page explains how to read the print and what to fix first.
Table of contents
- What pressure advance actually does
- Why the same “K” means different numbers on every firmware
- Fix these first — or your PA number will be garbage
- The calibration method (works on all three firmwares)
- How to read the test print
- Saving your value: Klipper · Marlin · Duet
- Troubleshooting
- Tools we use (affiliate disclosure inside)
- Generator: build your test file
What pressure advance actually does
Filament isn't rigid. Squeeze it and it compresses slightly; wind it through a long Bowden tube and the whole path behaves like a spring. A stepper motor itself is a little springy too — the rotor has to lag behind the commanded current to produce torque.
Here's the consequence: when your toolhead accelerates at the start of a line, some of the filament the extruder pushes is spent building up pressure instead of coming out of the nozzle. Result: under-extrusion at line starts. When the toolhead decelerates at the end of a line, that stored pressure keeps pushing plastic out after the extruder has slowed. Result: over-extrusion — blobs at corners and overshoot at seams.
Pressure advance fixes it by doing the math ahead of time:
actual_extrusion = requested_extrusion + (K × current_acceleration)
Accelerating? Feed extra now. Decelerating? Pull back early. The “K” is your calibration constant — the only job of the test print below is to find the right number for your hotend, your filament, at your temperature.
This is why pressure advance matters even if you don't care about corners: a correct PA value also reduces ooze through the entire print, because the extruder stops over-pressurizing during travel moves.
Why the same “K” means different numbers on every firmware
This trips up almost everyone, and it's the single biggest cause of ruined test prints. Never copy a value from one firmware family to another.
| Firmware | Setting | Units | Typical direct drive | Typical long Bowden |
|---|---|---|---|---|
| Klipper | pressure_advance |
seconds | 0.02 – 0.15 | 0.2 – 1.0 |
| Marlin (LA 1.5) | M900 K |
mm of filament per (mm/s of rate change) | 0.05 – 0.6 | 0.8 – 2.0 |
| RepRapFirmware / Duet | M572 S |
seconds | 0.02 – 0.1 | 0.3 – 1.0+ |
-
Klipper and Duet agree — both are in seconds. A Klipper
pressure_advance = 0.05is the same physics as DuetM572 S0.05. - Marlin K is on a different scale entirely. The same machine that needs 0.05 seconds on Klipper needs a noticeably larger Marlin K number — and there is no reliable conversion formula between the two. Use the ranges in the table above as starting points and tune each firmware family from zero.
- Marlin LA 1.0 vs 1.5 is also incompatible. Linear Advance 1.0 only applies to Marlin 1.1.8 and earlier; its K values do not translate to 1.5. If you're on modern Marlin (1.1.9+ / 2.x), you're on 1.5 and should tune with 1.5 patterns.
- Klipper has a related but separate knob:
pressure_advance_smooth_time(default 0.040 s). It smooths how PA transitions apply — it is not part of the calibration. If you've changed it, set it back to a stock-ish value before testing so your test conditions match real printing.
How long is your filament path? (quick sanity check before you pick a range)
Pressure advance is dominated by the elasticity of the path between the drive gear and the nozzle. As a starting range:
- Direct drive (motor on the toolhead): 0.02–0.15 (Klipper/Duet) or 0–0.6 (Marlin K)
- Short Bowden, ~200 mm: 0.1 and up (Duet's own recommended floor)
- Medium Bowden, ~400 mm: 0.3 and up
- Long Bowden, 600–800 mm+: 0.5–0.7 and up; very long runs can even pass 1.0
These are starting points. The test print is the only thing that decides the final number.
Fix these first — or your PA number will be garbage
Pressure advance compensates for one specific problem: stored pressure in the filament path. If something else is loose, worn, or slipping, no PA value can hide it — and a PA test print on a broken extruder will give you a confident, completely wrong number.
Work in this order. Every step is its own rabbit hole, but each is faster than a bad PA test:
- Extruder rotation distance / steps-per-mm. Calibrate E first (Klipper: rotation_distance).
- Hotend temperature. Temperature changes viscosity, which changes back-pressure. Dial in nozzle temp before PA, then tune PA at that temperature.
- Extrusion multiplier / flow ratio comes after PA. PA only redistributes material in time; EM changes how much there is. Tune PA first — if you fix flow-ratio errors first you'll bias the PA number, and residual corner gapping after both are tuned is usually a speed-dependent flow dropoff, not PA.
- Input shaping / resonance compensation. Do it before PA. Enabling or disabling input shaping changes the accelerations your printer actually executes, which means it changes your ideal PA. Retune PA after any shaper change.
- Extruder mechanics. Check backlash by hand: hold the filament and rock the drive gear back and forth. A dead zone before the direction reverses = extruder backlash. On Bowden setups, check the tube fittings for play. If you see both gaps and bulges at every K value, this is almost always the cause — rebuild the extruder instead of spending a day tuning.
- Retraction — leave it for last. PA and retraction overlap: PA already pulls filament back at the end of moves. After you set your PA value, reduce retraction if you start seeing gaps at seams.
The calibration method (works on all three firmwares)
There are two good test patterns. We recommend starting with line pairs, then refining with the band tower.
The best guides genuinely disagree on the test pattern, and it's worth understanding why before you pick one:
-
Klipper's own docs use a band tower run at deliberately crippled settings —
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500— to exaggerate corner bulging so it's easy to see. - One widely-read tuning guide argues that exaggerated setting causes unrealistic bulging that pushes you to a PA value that's too high, and instead recommends a corner-pattern test run at your normal accelerations — its author has outright deprecated the old line-pair method in favor of that tool. (Full source list at the bottom links everything.)
- Marlin's K-factor tool still standardizes on a line-pair test (thin-vs-thick segments), which is the most precise way to read a number off a flat print.
Our position after printing all of them: run the test at the accelerations you actually print at (crippled-accel towers over-count bulge), start with line pairs to pin a precise number, then confirm with the band tower's corners because corner quality is what you'll actually notice on real prints. The generator does both patterns; if they disagree, your prerequisites (below) aren't dialed in yet — fix those first.
Pattern A — Line pairs (best first pass)
Each test line is printed with one PA/K value: a short slow segment, immediately followed by a long fast segment. Under-extrusion and over-extrusion show up as a difference in thickness between the slow and fast parts of the same line.
- The lines at the bottom of your range have thin fast segments (not enough pressure compensation).
- The lines at the top have thin slow segments / fat starts (too much compensation).
- Somewhere in the middle, slow and fast segments look identically thick. That's your value.
Pattern B — Band tower (best for reading on the corners)
A single-wall hollow square tower where the PA value changes every few layers, so the number increases as the tower rises. Corners are where PA problems are most visible: under-extruded corners on low bands, blobs on low bands and gaps on high bands. Pick the height with the cleanest corner, then measure that height with a caliper:
value = start + (measured_height_mm × factor)
That's Klipper's official TUNING_TOWER arithmetic and it works identically for Duet's M572 bands. Our generator writes the number next to every section so you don't even need the arithmetic — you can read the winning value straight off the print.
If you run the tower interactively with TUNING_TOWER, note that the guides don't even agree on the factor: Klipper's docs say FACTOR=.005 (direct drive) / .020 (Bowden) at crippled settings, while the corner-pattern camp runs normal settings with FACTOR=.0025 / .025. Either works as long as you know which one you ran — that's another reason our generator bakes the numbers into the G-code instead of leaving them as mental math.
Test conditions that actually matter
-
The fast and slow speeds must clearly differ. If they're close, the PA effect is nearly invisible and you'll pick a random number. Best practice: set the slow speed to your
square_corner_velocity(Klipper) or jerk (Marlin) — the speed corners actually print at — and the fast speed to your normal external-perimeter speed. Our defaults use 20 vs 80 mm/s, which approximates that for common setups. - Test your fast speed against your hotend's max volumetric flow. If the fast segment demands more mm³/s than your hotend can melt, the thin-fast-segment symptom is a flow problem, not PA (see the flow-ceiling box below).
- Use your normal print acceleration. Not a toy value — PA is acceleration-dependent, so tune under the accelerations you actually print at (Klipper default 3000; Marlin machines often sit at 500).
- Zero infill, 1–2 perimeters, single-wall. You want the walls to express pressure changes without infill holding them up.
- Tune at your normal printing temperature, and note that a different spool — even the same material in a different colour — can need a different value. Pigments matter.
- On Klipper, if your slicer applies per-feature acceleration control, keep it consistent with how you normally print external perimeters; otherwise the test runs at max accel and rings.
Slicer settings to change before the test (per firmware)
The test print measures pressure behavior — so disable every slicer feature that also moves filament at the end of a move, or you'll be calibrating against a moving target:
- All firmwares: disable coasting / “end extrusion early”, wipe-while-retracting, and extra restart distance after retraction. Set the Z seam to a fixed position so seam artifacts don't masquerade as PA artifacts.
- Klipper: disable dynamic acceleration control and scarf seams for the test. Keep a small retract (~0.75 mm with wipe) and Z-lift off.
- Marlin: retraction may need to drop to 0 during the test — Linear Advance already pulls filament back at deceleration.
- Duet/RRF: wipe and coasting disabled; align the Z seam to a single mid-face point so the seam bands are readable.
- Marlin hardware traps: Linear Advance does not work with TMC2208 drivers in legacy mode (common on silent Creality boards), and it conflicts with S-curve acceleration. LA can also demand higher extruder motor current — if the extruder clicks only after enabling LA, raise E current before touching K.
How to read the test print
Print the file, then look at it before you look at the slicer.
Line-pair pattern
- Walk the lines from the top of the range to the bottom.
- Thin fast segment, fat start → PA too low. Increase.
- Thin slow segment / thin start, fat ends → PA too high. Decrease.
- Choose the line where both segments match. If two adjacent lines look equally good, take the lower one on a Bowden, and don't be afraid to lean slightly higher on direct drive.
Band tower
- Bulges / blobs at corners → PA too low.
- Rounded corners and gaps leading into the corner → PA too high.
- One corner usually looks different from the other three — that's the layer-change seam corner. Ignore it and judge the other three.
- There is no perfect value. You're looking for “sharpest corner with the fewest artifacts,” not perfection.
- Shine a flashlight between the tower walls — corner gaps and internal bulging show up much better with raking light than under room light.
- If the four corners disagree, average the heights they point to. A small bulge at the trailing edge of each band is normal even at the right value.
- When in doubt, go lower — an over-generous PA value makes corners worse, not better.
Duet's docs add a third read: judge the Z seam on any box print — a bulge at the seam means PA too low, a gap means too high — and automate the band changes from the slicer with layer-number conditional G-code ({if layer_num == ...} in PrusaSlicer/SuperSlicer, a {REPLACE} postprocessor in Simplify3D). Expect a brief motion pause when the M572 band change executes; that's normal.
Refining: once you have a range that looks right, run it again with a step size 2–4× finer over just that range. On direct drive we routinely re-test at 0.001–0.002 steps — it takes one print and the corner quality is genuinely visible on engraved logos, text, and slots.
Before you raise PA again: rule out your flow ceiling. Widely-documented field testing turned up a trap that burns hours — if your slicer's max volumetric flow / pressure-advance limits are too low, the extruder literally cannot push enough plastic on the fast segments. The result looks identical to “PA too low” (thin fast segment), even at an absurd PA value. If raising K stops changing anything, check your flow limits first: set a high limit, re-test, and only then trust the pattern. Our free flow-rate calculator turns a measured max flow rate into the per-feature limits your slicer actually needs; if your ceiling genuinely is the hotend, that's hardware — a higher-flow hotend like our Takoto line or a larger/chambered nozzle raises the ceiling in a way no PA value can.
Saving your value
🟢 Klipper
Tested interactively with SET_PRESSURE_ADVANCE, so now make it permanent. In printer.cfg, under [extruder]:
[extruder]
pressure_advance: 0.065
pressure_advance_smooth_time: 0.040 # leave at default unless you know why
Then FIRMWARE_RESTART (or RESTART) — this also clears the test state. Note PA is per-extruder, so on a multiple-hotend machine each [extruder] section needs its own value. If your config uses a SET_PRESSURE_ADVANCE macro or a [filament]-style per-material include, set it there instead so it survives filament changes.
🔵 Marlin
Check that Linear Advance is compiled in (it is not on most stock boards): M900 with no arguments should report a K value. If it errors, enable LIN_ADVANCE in Configuration_adv.h and rebuild.
M900 K0.18 ; set live
M500 ; save to EEPROM
M900 K0 disables Linear Advance. If you run multiple filaments, put M900 K<value> in each filament/material's start G-code in the slicer and leave the firmware's built-in LIN_ADVANCE_K at 0 — the start-script value then wins on every print and M500 stops mattering. (If your firmware has EXTRA_LIN_ADVANCE_K, a second K slot exists — but it only applies after the next M900 S<slot>, so verify with a bare M900. Note since Marlin 2.1.3 M900 is also reused by FT_MOTION for feedrate — don't be surprised by dual-purpose output on brand-new builds.)
🟣 RepRapFirmware / Duet
Per extruder drive, and it goes in config.g:
M572 D0 S0.1 ; drive 0
M572 D0:1 S0.1 ; same value for drives 0 and 1
M500 ; save to config-override.g (M502 would RESET to defaults — don't)
The Duet-specific gotcha: with PA enabled, RRF automatically limits extruder acceleration to M566 E (mm/s) ÷ S, whichever is lower against your M201 E. At a high S with low E jerk, the extruder gets crippled and skips. Reasonable ranges: M203 E 1800–3600 mm/min, M566 E 2000–6000 mm/min on a NEMA17 direct drive, M201 E 2000–4000 mm/s². Set them before you conclude your PA test failed.
Whatever the firmware: re-run a Benchy or a detailed part afterwards. PA tuned in isolation is a guess until real geometry confirms it.
Troubleshooting
| Symptom | Most likely cause |
|---|---|
| Every K value looks bad — gaps and bulges | Mechanical extruder problem (backlash, loose Bowden fitting, worn idler). No PA value fixes this. Sharper test: if the best value on the accelerating side of a line differs by more than a couple of steps from the best on the decelerating side, that dead-zone gap is extruder backlash eating PA's reverse move. |
| Extruder clicks/skips after enabling PA | PA demands fast filament motion. Fix depends on firmware — Klipper: lower printer acceleration or turn PA off (Klipper's own guidance for PA > ~0.2 skipping). Marlin 1.5: it silently reduces print acceleration when K exceeds the extruder-jerk budget — raise extruder jerk, lower layer height/line width, or shorten the Bowden. Duet: check the M566/M201 interplay above. |
| Gaps at seams appear only after enabling PA | PA adds effective retraction at move ends. Reduce slicer retraction. |
| Perimeter↔infill gap opened up after enabling PA (RRF) | Documented RRF side effect — increase infill overlap / reduce perimeter-to-infill gap in the slicer. |
| Test looks identical on all values | Slow and fast speeds too similar, acceleration too low to matter, flow ceiling clamped (above), or the firmware never accepted the command. Klipper's own escape hatch: if values up to 1.0 change nothing visible, leave PA off — some direct-drive setups genuinely don't need it. |
| Great on the test, bad on real prints | You tuned at a different temperature, filament, nozzle size, or accel than you print with. Retune at real settings. |
| Corners good but surfaces show vertical banding | Often input shaping or a flow problem, not PA. Don't chase it with PA. |
When to retune: new filament (brand or colour), nozzle diameter change, temperature change of more than ~10 °C, input shaping turned on/off or retuned, or any hotend/extruder/Bowden-length change. PA does not change print time or total extruded plastic — it only redistributes it in time — so a retune never “costs” you flow; it just keeps corners honest.
Tools we use
Affiliate disclosure: some links below are affiliate links. If you buy through them we earn a small commission at no extra cost to you — it's what keeps the free G-code generators free. We only list tools we actually use on our own machines.
- Digital calipers — for reading the winning height off a band tower. Any decent 150 mm caliper resolves 0.01 mm; don't buy the $6 ones, they drift. Browse calipers on Amazon
- Machinist's square — handy for sanity-checking corner quality visually. Browse squares on Amazon
- A budget filament for calibration spools — you'll burn a few rolls on test prints; keep a dedicated tuning spool so your “good” filament isn't wasted. Browse filament on Amazon
- PEI / textured build sheets — consistent first-layer adhesion means one less variable in every test. We stock a full range of magnetic PEI flex plates and textured build plates in the shop; if you'd rather grab one off Amazon, browse PEI sheets there too.
For the printer-side stuff — linear rails, CoreXY gantry upgrades, toolheads — we build our own parts and stock them in the A3DP store, because that's what we couldn't buy anywhere else.
Generator: build your test file
We rebuilt our calibration generator as one tool that covers all three firmwares — pick Klipper, Marlin, or RepRapFirmware, pick a preset for direct drive or Bowden, and it writes the correct commands (SET_PRESSURE_ADVANCE / M900 / M572) with per-section labels, correct units, and a bed-fit check so it can't print off your bed.
→ Open the Pressure Advance Calibrator v2
It also ships with a line-pair and a band-tower mode, presets per firmware, and prints the K value next to every section so reading the result takes seconds.
More from the tuning cluster
- Getting Started: the tuning order that works — where PA fits in the whole sequence, and why order matters more than values
- The Klipper, Marlin & Duet Tuning Cheat Sheet — every command here and more, side by side, printable for the side of your printer
- Print Troubleshooting: identify any defect by its signature — when the artifact isn't corner blobs
- Flow-rate calculator — turn one test print into per-feature slicer limits
Sources
-
Klipper official Pressure Advance documentation (tower method,
TUNING_TOWERfactors, smooth_time) - Marlin M900 — Linear Advance Factor and the Marlin K-factor calibration tool (line-pair pattern spec)
- Duet3D — Pressure advance (RepRapFirmware) (M572, M566 extruder-accel interplay)
- Ellis' Print Tuning Guide: introduction, corner-pattern method, tower method, saving your value, and PA/EM oddities (flow-ceiling trap) — plus Ellis' own calibration generator
