⬢ prusa-profile-tuning

Phase 2 · The filament · L12

Pressure / Linear Advance

The single biggest quality win in the course — and the one place where a number copied between two of your machines does real damage.

⏱ ~60 minutes• ⚠ Two firmware families, two commands• Phase 2
◎ Why this lesson

The extruder pushes filament at a commanded rate. The melt zone is a compressible spring. So when the toolhead slows into a corner, the pressure already stored in the nozzle keeps pushing — you get a blob. When it accelerates out of a corner or restarts after a travel, pressure has to rebuild before plastic actually appears — you get a gap. Advance compensates for that lag by running the extruder ahead of the motion. Get it right and bulging corners, seam blobs and post-travel thin patches all vanish at once. This is the lesson with the largest visible payoff per hour spent.

▲ The rule that outranks everything in this lesson

Your MK3S runs Marlin and takes M900 K (Linear Advance).2 Your MK4S and Core One run Buddy and take M572 S (Pressure Advance).1 Never copy a value between them. Section 2 explains exactly why the reason is subtler — and more dangerous — than most people assume.

1What too little and too much look like

Prusa give the diagnostic in one sentence: "If sharp corners have blobs, increase the K value. If you see missing filament, decrease the K value."2 That is the whole judging rule, and it works identically on both firmware families.

Too low — under-compensated
# at every corner
outside edge bulges
corner looks rounded
dark glossy blob where
the toolhead slowed

# after every travel
first few mm are fat
seam is a lump
Too high — over-compensated
# at every corner
corner looks pinched
gap just after the turn
wall thins then recovers

# after every travel
extrusion starts late
visible dashed restart

The two failure modes are geometrically opposite and both appear at the same features, which is what makes a stepped tower so much better than trial and error: you see the whole curve at once and the correct value is the band where the corner stops being either.

The pattern to look for is not "the nicest corner". It is the band where extrusion width stays constant through the corner and immediately after a travel restart. Width consistency is the signal; gloss and sharpness are side effects.

2Why the number doesn't travel between machines

Here is the trap, and it is worse than the usual telling of it. Prusa document that legacy M900 commands are automatically converted 1:1 to a Pressure Advance value on Buddy firmware, and that the printer applies whichever command was issued most recently.1

⚠ 1:1 conversion is exactly what makes copying feel safe

Send M900 K0.08 to an MK4S and it will not error, will not warn, and will not ignore you. It will quietly become a Pressure Advance of 0.08 and print. The command converts; the correctness does not.

The value describes that machine's extruder and melt zone — not the material alone. Compare Prusa's own numbers for a 0.4 mm nozzle: the MK3S Linear Advance defaults are PLA 0.05, PETG 0.08, ASA/ABS 0.04,2 while the MK4S family's stock start G-code carries a much smaller Pressure Advance, in the region of 0.03–0.04 for PLA at the same nozzle size.4 Roughly a factor of two apart, for the same plastic — because a Bondtech-driven MK3S hotend and a Nextruder are different mechanical systems.

So the failure mode isn't a rejected command or a nonsense value. It's a print that comes out plausibly, with over-compensated corners you'll blame on cooling.

The corollary, which is genuinely useful: your MK4S and Core One values will end up close to each other — same firmware, same Nextruder class, same hotend class. Close, not identical. Measure both, and if they land within a step of each other, that agreement is itself evidence you measured correctly.

3Run the tower

A tall object with sharp 90° corners — a thin-walled square tube is ideal — with the advance value stepped per band via Printer Settings → Custom G-code → After layer change G-code. Same mechanism as Lesson 10, different command.

⬇ Download · the tower

pa-corner-tower.stl — a 30 × 30 mm square tube with genuine sharp corners, 32 mm tall, plus a pillar 40 mm away that forces a travel move every layer so you can judge extrusion restart at the same time. At 0.2 mm layers the sample block's 20-layer bands are 4 mm each — eight bands fit, so a 6-line bracket leaves the top in your final value.

⚠ Tune at production speeds and accelerations, or don't bother

Advance compensates for a pressure lag whose size depends on how hard the machine accelerates. Calibrate it on a slow test print and the value will be too small for the pressures a fast print generates — corners bulge anyway — or, if you compensated for the slow case's smaller lag with a large value, it will starve your corners at speed.

Print the tower with the print profile you actually intend to use. This is the one place in the calibration order where a later step (Lesson 16, speeds and accelerations) legitimately loops back to an earlier one. If you significantly change acceleration in L16, come back here.

✓ Preflight — tick all of these before the tower goes on the bed
Tick as you go

Open your machine. The command, the sensible band range and the stock starting point all differ.

MK3S · M900 K, Linear Advance

Linear Advance applies to the MK3-family and MK2-family printers; it was replaced by Pressure Advance on the MK4 family, XL and MINI/+ from firmware 5.0.0.12 Syntax is M900 Kxx.2

Prusa's default K values for a 0.4 mm nozzle2 — start your bracket around these, don't ignore them:

  • PLA 0.05 · PETG 0.08 · ASA/ABS 0.04 · Nylon (Taulman) 0.08 · Nylon (FX256) 0.1

Tower block — bracket generously either side of the default:

{if layer_num == 20}M900 K0.02{endif}
{if layer_num == 40}M900 K0.04{endif}
{if layer_num == 60}M900 K0.06{endif}
{if layer_num == 80}M900 K0.08{endif}
{if layer_num == 100}M900 K0.10{endif}
{if layer_num == 120}M900 K0.12{endif}

Prusa also publish a ready-made Linear Advance test pattern in their calibration G-code repository.2 If you use it, use it as published — but note it will run at its speeds and accelerations, not yours, which is precisely the caveat above. The tower with your own print profile is the more honest test.

Print at MK3S speeds, ~45–60 mm/s perimeters. A value tuned at 120 mm/s on this machine describes a print you will never make.

MK4S · M572 S, Pressure Advance

Pressure Advance is available on the MK4 family from firmware 5.0.0 and above.1 The command takes three parameters:13

  • D — set the extruder number.
  • S<value> — set the pressure advance value. Zero disables pressure advance.
  • W — the time range in seconds used to average extruder velocity. Default 0.04. Leave it alone; it is not the knob you are looking for.

The stock start G-code already contains an M572 whose S parameter varies by nozzle diameter, and Prusa explicitly recommend keeping that default, describing it as optimised for most applications on their printers.1

⌁ So should you tune it at all?

Yes — but start from the stock value and treat it as the centre of your bracket, not as something to replace. Prusa's default is a good value for Prusament on a stock machine. You are printing eSun PETG that has spent a week absorbing Indian Ocean humidity. Measure, and if your answer lands on the stock number, that is a real result worth logging — it means the default is right for your case and you now know it rather than assuming it.

Find your stock value first: slice anything and read the M572 line out of the G-code. Then bracket it:

{if layer_num == 20}M572 S0.01{endif}
{if layer_num == 40}M572 S0.02{endif}
{if layer_num == 60}M572 S0.03{endif}
{if layer_num == 80}M572 S0.04{endif}
{if layer_num == 100}M572 S0.05{endif}
{if layer_num == 120}M572 S0.06{endif}
{if layer_num == 140}M572 S0.07{endif}

Because the last command wins,1 each band cleanly overrides the one in start G-code. Nothing needs deleting from the filament profile to run the tower — but the tower block itself still has to come out of the printer profile afterwards.

Core One · M572 S, and a documentation gap worth knowing

Same command, same parameters, same method as the MK4S. Use the same bracket.

⚠ The KB article doesn't name the Core One

Prusa's Pressure Advance article lists the MK4 family, XL family, MINI family and MK3.9 family from firmware 5.0.0 — the Core One isn't in that list.1 That is almost certainly the article not having been updated rather than the feature being absent: the Core One runs Buddy firmware and M572 is documented in the Buddy G-code reference.3

Verify it rather than assuming it. Slice something for the Core One and look for M572 in the start G-code. If it's there, you have your stock value and your answer. If it isn't, tell me before you run the tower — a tower whose command does nothing produces seven identical bands and an hour of confusion.

And fix the chamber state, as in Lesson 10. Advance is a pressure phenomenon and pressure depends on viscosity, which depends on how hot the ambient air is. Door and vent state decided, recorded, unchanged.

⌁ Advance tower generator — your bracket, in your machine's command

Pick the machine and the block writes itself in the right command. Defaults are the MK3S bracket above; for the MK4S or Core One, set first value 0.01, step 0.01, 7 steps to get the Buddy bracket. The bottom band is absent on purpose — it prints at whatever the start G-code already set, so your bracket sits on top of the stock value.

Command
Top band value
Height used
M900 K — Linear Advance, Marlin. Bracket around Prusa's default for your material (PETG 0.08).
M572 S — Pressure Advance, Buddy. Bracket around the stock value you read out of a sliced file's start G-code.
Past the top of the tower. pa-corner-tower.stl is 32 mm — the last bands won't print. Fewer steps or shorter bands.
Paste below the existing after-layer-change G-code. Production print profile, production accelerations — and the block comes out again after the print.

4Where the winning value lives

Prusa are explicit, and it is the opposite of what most people guess: the value is set in the custom G-code section of the Filament Settings tab, not under the printer-specific custom G-code.2 PrusaSlicer is unusual in offering per-filament custom G-code, and that is exactly what makes the value follow the material when you switch presets.4

Put it in the printer profile instead and every filament on that machine inherits one material's value — so your TPU prints with PETG's advance, which is roughly double what it wants.

Filament Settings → Custom G-code → Start G-code
; keep it nozzle-aware, the way the stock profile does
M572 S{if nozzle_diameter[0]==0.4}0.045{elsif nozzle_diameter[0]==0.6}0.03{else}0.02{endif}
; eSun PETG — measured on MK4S, 2026-08-05, production accel

Two habits in that snippet worth keeping. The conditional means swapping to a 0.6 mm nozzle doesn't silently apply a 0.4 mm value. The comment records which machine and which date — because in four months the only thing standing between you and a guess is that line of text. That's Lesson 19, arriving early.

⌁ Start G-code builder — the winning value, nozzle-aware

Type what you measured and copy the finished lines into Filament Settings → Custom G-code → Start G-code. Defaults reproduce the snippet above. If you haven't measured 0.6 yet, the bundle's 0.6 starting value is the honest placeholder — mark it inherited in the log. The fallback covers any other nozzle at a deliberately low value.

Marlin machine — the builder has switched to M900 K. A M572 line here would be silently ignored by the MK3S.
Filament settings, never printer settings — the value must follow the material.

Then delete the tower block from Printer Settings → Custom G-code → After layer change. Left in place, it overrides your carefully measured filament value on every subsequent print of every material — and because the last command wins, it wins.1

5Check yourself

From memory. Question 1 is the one that costs money.

Question 1 of 3
You send M900 K0.08 to your MK4S out of habit. What happens?
Question 2 of 3
A band shows a visible gap in the wall just after every 90° corner. What now?
Question 3 of 3
Why is this the one step allowed to loop back after Lesson 16?
✎ Your task · do this with your tutor

Measure advance on one machine, at production speed

  1. Report the stock advance line from your machine's sliced G-code — the literal M900 or M572 text. If you can't find one, say so.
  2. Paste me your tower block and the print profile you'll run it with, before printing. I will check that the accelerations are production values.
  3. Print it. Photograph one corner per band in raking light.
  4. Report the winning value and which symptom you saw in the band on each side of it — blob below, gap above. If you can't describe both neighbours, you haven't bracketed the answer.
  5. Write it into the filament profile's start G-code with a nozzle conditional and a dated comment. Paste me the finished line.
  6. Confirm the tower block is deleted from the printer profile.

→ Point 4 is the assessment. A value with a blob on one side and a gap on the other is measured. A value with nothing obviously wrong on either side means your bracket was too narrow and you picked the middle of a plateau.

What you can now say

  1. Advance compensates for melt-zone pressure lag — blobs into corners, gaps out of them.
  2. Blobs mean increase, missing filament means decrease. Prusa's own rule, and it holds on both firmware families.
  3. M900 is converted 1:1 on Buddy, which is exactly why copying a value between your machines fails silently rather than loudly.
  4. Tune at production speeds and accelerations, or the value describes a print you will never make.
  5. The value belongs in the filament profile's start G-code, nozzle-aware and commented with machine and date.
📖
Primary source · read this next
Short, and it contains the two facts this lesson is built on: the full M572 parameter list including the W averaging window, and the 1:1 M900 conversion with last-command-wins. MK3S owners should read the Linear Advance article instead — it has the default K values per material.
💬 I'm your tutor — ask me anything. Send me the stock advance line from each of your three machines and I'll tell you what a sensible bracket looks like for each. And if a tower comes out with seven identical-looking bands, paste me the G-code — nine times in ten the conditional never fired. Confused beats stuck.

§References

  1. Prusa Research. Pressure Advance. Availability on the MK4 family, XL family, MINI family and MK3.9 family from firmware 5.0.0; the M572 parameters D, S<value> (zero disables) and W (averaging window, default 0.04); that legacy M900 is "automatically converted 1:1 to Pressure Advance value" with the most recently issued command applying; that the default start G-code contains an M572 whose S varies by nozzle diameter; and the recommendation to keep that default. Link.
  2. Prusa Research. Linear Advance. MK3-family and MK2-family applicability; replacement by Pressure Advance from firmware 5.0.0; the M900 Kxx syntax; the default K values for a 0.4 mm nozzle (PLA 0.05, PETG 0.08, ASA/ABS 0.04, Nylon Taulman 0.08, Nylon FX256 0.1); the test pattern in Prusa's calibration G-code repository; the judging rule "If sharp corners have blobs, increase the K value. If you see missing filament, decrease the K value."; and that the K value is set in the custom G-code section of the Filament Settings tab, not under printer-specific custom G-code. Link.
  3. Prusa Research. Buddy firmware specific G-code commands. M572 — "Set or report extruder pressure advance", with the D, S and W parameters. Link.
  4. This course. Master tuning guide, §2.3 — the stepped-tower method, the production-accelerations caveat, the nozzle-aware conditional, the reference point that MK4S PLA profiles ship near 0.036 for a 0.4 nozzle, and that PrusaSlicer's per-filament custom G-code is what makes the value follow the material. Link.

Lesson L12 of the prusa-profile-tuning course · all lessons · The Calibration Card · glossary