Nozzle School

Nozzle School · Guides

Pressure Advance and Linear Advance: How to Calibrate It

How to calibrate pressure advance (Klipper) or linear advance (Marlin): the tower, line and pattern tests, Orca and Bambu tools, M900 K and typical values.

Next level21 min readby Sam

Pressure advance (Klipper’s name) and linear advance (Marlin’s name) make the extruder push a little extra filament when the print head speeds up and ease off early when it slows down, so the pressure in the nozzle keeps up with the motion. Without it, lines come out thin at the start, bulge at corners and leave blobs at the end. You calibrate it by printing a test where the value changes as it goes (a tower, a set of lines or a pattern of corners) and picking the value with sharp corners and even lines. Direct drive printers usually land somewhere around 0.02–0.1, Bowden printers several times higher.

This guide explains what’s going on inside the nozzle, the names each firmware and slicer uses, how to run the test in OrcaSlicer, Bambu Studio, Klipper, Marlin, PrusaSlicer and Cura, how to read each kind of test, where to save the value, and what to do when it won’t come out clean.

Pressure advance at a glance

Question Short answer
What does it fix? Bulging corners, thin line starts, blobs at line ends and seams, uneven walls at speed
Names Pressure advance (Klipper, Prusa, OrcaSlicer), linear advance (Marlin), flow dynamics (Bambu Lab)
Klipper command SET_PRESSURE_ADVANCE ADVANCE=0.04, or pressure_advance: in [extruder]
Marlin command M900 K0.04 (needs LIN_ADVANCE in the firmware)
Prusa MK4 / XL / MINI (firmware 5+) M572 S…, already set in Prusa’s profiles
Typical direct drive value Around 0.02–0.1
Typical Bowden value Around 0.3–1.0, sometimes more
Calibrate before it E-steps, temperature, and usually flow rate
Where to save it The filament profile, or the printer config

Why the pressure lags behind

When the extruder pushes filament, the plastic doesn’t come out of the nozzle instantly. The molten plastic in the hotend is thick and slightly springy, and the solid filament between the extruder gears and the melt compresses a little. On a Bowden printer, the filament can also squash and slide inside the long PTFE tube. So the extruder first has to build up pressure, and only then does plastic flow at the rate it asked for.

The same happens in reverse. When the extruder slows or stops, the pressure that’s built up keeps pushing plastic out for a moment.

At slow, steady speeds you don’t notice. But printers don’t move at steady speeds: they accelerate out of every corner and slow down into the next. Each time:

  • Speeding up, the pressure is still catching up, so the line comes out thin for the first few millimetres.
  • Slowing into a corner, the pressure is still high, so too much plastic comes out and the corner bulges.
  • Stopping at the end of a line, the leftover pressure leaves a blob, and at the seam a zit.

Pressure advance fixes this by moving the extruder a little ahead of where it would be: extra filament while the head speeds up, a little less (or a small pull back) while it slows down. The amount is proportional to how fast the extruder is moving. The pressure advance value is that proportion: roughly, how many millimetres of extra filament to push for every 1 mm/s of extrusion speed.11Marlin’s documentation describes its K factor in exactly those units: “mm of filament compression needed per 1 mm/s extrusion speed”. Klipper’s pressure advance is built on the same idea, and Prusa’s firmware converts an M900 K value one to one into its own pressure advance value.

PA 0.000 · direct drive needs about 0.040 · straight 0.42 mm · corner 0.66 mm · bulges at the corner, blob at the end

  • ↑ ↓ pressure advance ±0.005 (Shift ±0.05); or drag ↔
  • ← → print speed ±10 mm/s (40–250)
  • C set the calibrated value
  • B direct drive or Bowden
  • Space lay the line again
  • Home reset
The melt's pressure takes time to build and to fall, so the flow out of the nozzle lags the flow the extruder pushes in. Without pressure advance the line comes out thin after the head speeds up, bulges where it slows for the corner and leaves a blob at the end. Pressure advance makes the extruder push ahead as the head speeds up and back off early before it slows; set right, the line stays 0.45 mm wide all the way, and set too high the corner comes out thin. Typical calibrated values in Klipper are about 0.02–0.1 on direct drive and 0.3–1.0 on Bowden (here 0.04 and 0.55). Simple lag model at 3000 mm/s² and 5 mm/s through the corner; the line is drawn 6× larger and the motion is slowed 6×.

What it looks like on a print

Symptom Pressure advance too low (or off) Pressure advance too high
Corners Bulge outward, rounded and fat Pulled in, thin or with a small gap just before or after
Start of a line Thin or missing for the first few mm Fat blob
End of a line Blob or bulge Thin or gap
Seam Zits and bumps Gap or a dip
Top surface outline Edges bulge Edges have gaps
Extruder Quiet May click or skip during fast changes

Some of these overlap with other faults. Blobs at seams also come from retraction and seam settings (blobs and zits); thin lines everywhere are under-extrusion; fat lines everywhere are over-extrusion. Pressure advance is about lines that change width when the speed changes.

The names, by firmware and slicer

System What it’s called How it’s set
Klipper Pressure advance pressure_advance in [extruder] (default 0, off), or SET_PRESSURE_ADVANCE ADVANCE=…
Marlin 2.x Linear advance (version 1.5) M900 K…; the firmware must be built with LIN_ADVANCE
Prusa MK4/S, MK3.9/S, XL, MINI/+ (firmware 5.0+) Pressure advance M572 S…; Prusa’s profiles set it per nozzle
RepRapFirmware (Duet) Pressure advance M572 D0 S…
Bambu Lab Flow dynamics (a K value) Calibrated in Bambu Studio or on the printer
OrcaSlicer Pressure advance Filament profile; Orca writes the right command for your firmware

OrcaSlicer, for example, writes M900 K… for Marlin printers, SET_PRESSURE_ADVANCE ADVANCE=… for Klipper and M572 for RepRapFirmware, from the same value in the filament profile.

Before you calibrate

Pressure advance works on the amount of plastic the extruder pushes, so set these first:

  1. E-steps or rotation_distance on older printers. Klipper’s documentation and Marlin’s both say to calibrate the extruder first. See E-steps calibration.
  2. Temperature. Hotter plastic is runnier and needs a different value. See temperature tower.
  3. Flow rate. Most guides, including our calibration guide, set flow first; OrcaSlicer’s own guide runs pressure advance before flow ratio. Either order works if you recheck the first one after the second. See flow rate calibration.
  4. Dry filament and a clean nozzle, as for any test.
  5. Know your extruder type. Direct drive and Bowden test very different ranges. See Bowden vs direct drive.

The value depends on the extruder, the nozzle (size and type), the filament and the temperature. Calibrate per filament, and again after changing nozzle: bigger nozzles usually need less. See nozzle sizes explained.

Method 1: OrcaSlicer’s pressure advance test

OrcaSlicer has three pressure advance tests built in.

  1. Select your printer, filament and process as normal.
  2. Open the Calibration menu and choose Pressure advance.
  3. Choose the extruder type (DDE for direct drive, or Bowden) and the method: tower, line or pattern.
  4. Check the range. OrcaSlicer fills in defaults depending on what you chose:
Method Direct drive default Bowden default
Tower 0 to 0.1, step 0.002 0 to 1.0, step 0.02
Line 0 to 0.1, step 0.002 0 to 1.0, step 0.02
Pattern 0 to 0.08, step 0.005 0 to 1.0, step 0.05
  1. Print the test, read it as described below, and work out your value.

The three methods

  • Tower: a hollow tower whose value rises with height. You look at the corners and the seam and find the height where they look best. OrcaSlicer’s documentation gives the value as start + step × measured height in mm. Its example: start 0, step 0.002, best height 8 mm, so 0 + 0.002 × 8 = 0.016. The tower doesn’t depend on the first layer, which makes it the most forgiving.
  • Line: a set of lines printed side by side on the first layers, each with a different value and a printed number. Each line goes slow, fast, slow. You pick the most even line. It’s the quickest, but OrcaSlicer warns it depends heavily on a good first layer, so turn on bed mesh levelling.
  • Pattern: rows of nested “V” shapes (chevrons), each at a different value, based on Andrew Ellis’s pattern generator. You pick the row with the sharpest corner tips and no bulges or gaps. It shows corner behaviour clearly, which is what most people care about.

Saving it in OrcaSlicer

The value goes in the filament profile: Filament settings → Filament → Flow ratio and Pressure Advance, tick Enable pressure advance and enter the value. If you can’t see it, switch the settings to Advanced mode. Save the filament profile, then start a new project to leave calibration mode.

On Marlin printers, the firmware must have linear advance built in for OrcaSlicer’s M900 command to do anything. Send M900 from a terminal: if it reports a K value, it’s there; if it says the command is unknown, it isn’t.

OrcaSlicer also offers adaptive pressure advance, which uses different values at different speeds and accelerations. It’s marked beta, needs its own calibration, and is worth looking at only once a single value is working well.

Method 2: Bambu Studio and Bambu Lab printers

Bambu calls pressure advance flow dynamics, and its K value does the same job.

  • Automatic: many Bambu printers can calibrate flow dynamics themselves, either from the Calibration tab in Bambu Studio or by ticking the flow dynamics calibration option when you send a print. Support depends on the model; Bambu’s documentation says the P1 series supports manual calibration only.
  • Manual: in Bambu Studio, open the Calibration tab, choose Flow Dynamics, select manual mode and pick PA Line or PA Pattern. Print it, choose the most even line or the sharpest pattern, and save the value against the filament.

Bambu advises running flow dynamics before flow rate calibration. Its documentation also notes the results can vary by about 10% between runs, so don’t chase small differences. For Bambu’s own filaments, the stock values are usually fine; manual calibration is mainly worth it for third-party filament.

Method 3: Klipper’s tuning tower

Klipper’s documentation describes a tower method that works with any slicer.

1. Slice the test

Print the hollow square tower from Klipper’s docs/prints/square_tower.stl (any tall hollow square works). Klipper suggests:

  • A high speed, for example 100 mm/s.
  • Zero infill.
  • A coarse layer height, around 75% of the nozzle diameter.
  • Dynamic acceleration control and scarf joint seams turned off in the slicer, if it has them.

2. Prepare the printer

Send this before the print starts. It slows down cornering and lowers acceleration, so the pressure effect is easy to see:

SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500

3. Start the tuning tower

For a direct drive extruder:

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

For a long Bowden tube:

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

With FACTOR, Klipper sets the value to start + factor × height at every layer, so each millimetre of height adds 0.005 (direct drive) or 0.020 (Bowden). Send the command at the start of each test print.

4. Read and calculate

Find the height where the corners look best, and measure it with calipers. If you can’t decide, Klipper’s guide says to choose the lower height. Then:

pressure_advance = start + measured height × factor

Klipper’s own example: a Bowden printer with the best corners at 12.90 mm gives 0 + 12.90 × 0.020 = 0.258.

A direct drive example: best corners at 8.0 mm gives 0 + 8.0 × 0.005 = 0.040.

5. Save

Put the value in the [extruder] section of printer.cfg:

[extruder]
pressure_advance: 0.040

Then send RESTART. Restarting also clears the test’s speed and acceleration limits. To keep a different value per filament, leave the config value as your default and set it from the slicer’s filament start G-code instead, for example SET_PRESSURE_ADVANCE ADVANCE=0.035.

SET_PRESSURE_ADVANCE also takes SMOOTH_TIME, which sets pressure_advance_smooth_time (default 0.040 seconds, 40 ms). Leave it at the default unless you have a reason.

Method 4: Marlin linear advance

Check it’s enabled

Send M900. If the printer replies with a K value, linear advance is built in. If it says the command is unknown, your firmware was built without LIN_ADVANCE, and you’d need to rebuild it to use this feature. Many stock firmwares on budget printers ship with it off.

Marlin’s documentation points to its K-factor calibration pattern generator on the Marlin website. You enter your printer and filament details and a start value, end value and step for K, and it produces a G-code file. The pattern prints a row of lines, left to right, each with a higher K. Every line has 20 mm at slow speed, 40 mm at fast speed and 20 mm at slow speed again.

  • For Bowden printers, Marlin suggests a range from about 0.1 to about 2.0.
  • For direct drive, use a much smaller range, such as 0 to 0.1 or 0.2 in small steps, since Marlin says direct extruders need a lower K than Bowden.

Read it

Look at the points where each line changes from slow to fast and back. Marlin’s documentation describes the best K as the line where that transition is “fluid and barely visible or even invisible”. With too low a K, the line thins at the start of the fast section and gets fat where it slows. Too high a K reverses that.

Set and save it

M900 K0.05

M900 K0 turns linear advance off. The most dependable way to keep a value per filament is to put the M900 K… line in the slicer’s filament start G-code (Marlin’s documentation recommends adding it at the end of your start G-code), so every print sets its own value. On builds with settings memory, M500 usually saves it as well.

Marlin’s documentation also suggests turning off slicer features that try to manage nozzle pressure themselves, such as coasting and wipe while retracting, and then rechecking retraction.

PrusaSlicer and Cura

Neither has a built-in pressure advance test, but you can set the value in both.

PrusaSlicer. Prusa’s own printers already include M572 in their profiles, and Prusa recommends keeping its default. For other printers, add the command to the filament’s start G-code: Filament Settings → Custom G-code → Start G-code, with M900 K… for Marlin or SET_PRESSURE_ADVANCE ADVANCE=… for Klipper. Each filament profile then carries its own value. For the test itself, use Klipper’s tuning tower, Marlin’s pattern generator, or an online pattern generator such as Ellis’s.

Cura. Cura has no pressure advance setting of its own. The free Linear Advance Settings plugin from the Marketplace adds a Linear Advance Factor setting to the Material category (make it visible in the settings visibility list) and writes M900 commands for Marlin printers. For Klipper there are community plugins that do the same with SET_PRESSURE_ADVANCE. Without a plugin, put the command in Preferences → Configure Cura → Printers → Machine Settings → Start G-code, which applies to every print on that printer.

Where to put the value OrcaSlicer Bambu Studio PrusaSlicer Cura
Per filament Filament settings → Filament → Flow ratio and Pressure Advance → Enable pressure advance Flow dynamics result saved with the filament (Calibration tab) Filament Settings → Custom G-code → Start G-code Linear Advance Settings plugin → Material → Linear Advance Factor
Per printer Printer settings → Machine G-code → Machine start G-code Printer settings → Machine G-code (third-party printers) Printer Settings → Custom G-code → Start G-code Preferences → Configure Cura → Printers → Machine Settings → Start G-code

Menu names move between slicer versions. If you can’t find a setting, type its name into the slicer’s settings search box.

How to read any pressure advance test

Whichever method you use, the judgement is the same:

  1. Let it cool, then look under a low, sideways light. Bulges and gaps at corners show up much better.
  2. Look at the corners first. You want a sharp corner with no bulge outward and no gap or thin spot just before or after it.
  3. Then look along the straight sections for an even width from start to end.
  4. Ignore odd corners. Klipper’s guide notes that one corner can look different from the others because of the layer change happening there. Judge the corners that aren’t on the seam.
  5. If two values look equally good, pick the lower one. Too high is usually worse than slightly low: it can cause gaps and extruder skipping.
  6. Then confirm on a real print with sharp corners, such as a calibration cube or a box, at your normal speed.
What you see on the test What to do
A clear best section in the middle of the range Use it
Best at the very top of the range Extend the range and test again
Best at the very bottom Your value is very small: retest with a finer step near 0
No clear difference anywhere Make the effect easier to see: higher speed, lower cornering speed; or check the hardware
Every value looks lumpy Fix flow, temperature or first layer first

Pressure advance and other settings

Pressure advance interacts with a few other settings:

  • Retraction. Both deal with pressure in the nozzle. With pressure advance working, there’s less pressure left at the end of each line, so you can often use a little less retraction. Recheck with a retraction test afterwards.
  • Coasting and wipe. Coasting (in Cura) stops extruding just before the end of a line to use up leftover pressure; pressure advance already handles that, so coasting tends to cause gaps on top of it. Turn coasting off.
  • Seams. With pressure advance tuned, seams get smaller. Scarf seams, where the slicer ramps the seam over a distance, can confuse the tower test, which is why Klipper suggests turning them off for it.
  • Acceleration. Higher acceleration makes pressure lag worse, so run the test at your normal acceleration (except for Klipper’s tower, which deliberately lowers it to make the effect visible).
  • Input shaping and ringing. Pressure advance doesn’t fix ringing; that’s vibration of the frame and belts. See ringing and ghosting.
  • Flexible filament. TPU compresses a lot, so it often needs a different value from rigid filament on the same printer, and on Bowden printers it can be hard to tune at all. See TPU and flexible filament.

Typical values

These are what most people end up near. Use them to choose a test range, not instead of the test.

Setup Typical pressure advance Test range to start with
Direct drive, PLA About 0.02–0.08 0–0.1
Direct drive, PETG Similar to PLA, sometimes a little higher 0–0.1
Direct drive, TPU Varies widely between filaments 0–0.2
Bowden, PLA About 0.3–1.0 0–1.0
Long Bowden tube, any filament Up to about 1.0, sometimes more 0–1.5

The ranges match the defaults built into OrcaSlicer’s tests (0–0.1 direct drive, 0–1.0 Bowden), Ellis’s pattern guide (0–0.1 direct drive, 0–1.5 Bowden) and Klipper’s typical range of 0.05–1.0. Your printer can land outside them and still be right if the test prints say so.

When it won’t come out clean

If the test never gives a clean result, or a value that looks right on the test doesn’t help real prints:

  1. Check the extruder. A slipping or worn drive gear, or tension that’s too loose, means the extra filament pressure advance asks for doesn’t actually go in. See extruder clicking.
  2. Check the Bowden tube. A tube that moves in its coupler, or a long, loose tube, makes the lag inconsistent. Make sure the couplers grip the tube and there’s no gap above the nozzle.
  3. Lower the acceleration if the extruder skips at higher values. Marlin’s documentation notes linear advance may also reduce acceleration on its own when the extruder can’t keep up, especially on Bowden printers.
  4. Check the hotend’s flow limit. If the fast sections are under-extruded whatever the value, you’re asking for more plastic than the hotend can melt; pressure advance can’t fix that. Slow down or set a max volumetric speed.
  5. Dry the filament. Steam bubbles make line width random, which hides the effect.
  6. Rule out the first layer for the line test: use the tower method instead.
  7. Check heat creep on a direct drive printer: filament that softens too high up makes the pressure response mushy.

Your action plan

  1. Set E-steps, temperature and flow first.
  2. Find out what your printer calls it: pressure advance, linear advance or flow dynamics, and make sure the firmware supports it.
  3. Run a test: OrcaSlicer’s tower or pattern, Bambu’s flow dynamics, Klipper’s tuning tower, or Marlin’s K-factor pattern.
  4. Use the right range: about 0–0.1 for direct drive, 0–1.0 for Bowden.
  5. Pick the sharpest corners and most even lines, the lower value if in doubt.
  6. Save it in the filament profile, or in the printer config with per-filament overrides in the start G-code.
  7. Recheck retraction and turn coasting off.
  8. Recalibrate for each new filament and after changing nozzle.
Cut-away of the hotend showing solid filament above the heat break and molten filament in the heater block
Solid filament above the heat break, molten filament in the heater block. Pressure advance is all about timing the pressure in that melt to match the print head.

FAQ

What is pressure advance in 3D printing?

A firmware feature that pushes a little extra filament when the print head speeds up and eases off before it slows down, so the pressure in the nozzle keeps up with the motion. It keeps lines the same width at corners and line ends.

Is linear advance the same as pressure advance?

Yes, the same idea. Klipper and Prusa call it pressure advance, Marlin calls it linear advance, and Bambu Lab calls it flow dynamics.

What is a good pressure advance value?

Around 0.02–0.1 for most direct drive printers and around 0.3–1.0 for Bowden printers. Your value depends on the extruder, nozzle, filament and temperature, so calibrate it.

How do I set pressure advance in Klipper?

Add pressure_advance: 0.04 (with your value) to the [extruder] section of printer.cfg and restart, or send SET_PRESSURE_ADVANCE ADVANCE=0.04 from the console or the slicer’s start G-code.

How do I set linear advance in Marlin?

Send M900 K followed by your value, for example M900 K0.05, or add it to your slicer’s start G-code. The firmware must be built with LIN_ADVANCE; if M900 is an unknown command, it isn’t.

Should I calibrate pressure advance for each filament?

Yes. Different materials, brands and temperatures need different values. Save each one in its filament profile.

Can pressure advance cause problems?

A value that’s too high can leave gaps at corners and line ends, and make the extruder skip during fast changes in speed. If that happens, lower the value or the acceleration.

Do I need pressure advance on a slow printer?

It helps less, because the speed changes are gentler, but it still sharpens corners and reduces blobs. On fast printers it makes a big difference.