3D printing technician providing live chat help

Joe B.

Reviewed for technical accuracy

Specialities: Marlin & Klipper tuning, bed mesh leveling (ABL/UBL), Linear/Pressure Advance, Z offset & first layer, start G-code optimization

Bed mesh leveling ignored — Marlin M420/G29, Klipper Bed_Mesh, K-factor (M900) vs Pressure Advance, Z offset & first layer adhesion

Technician avatar Technician
Hey! We’ll make sure your bed mesh leveling actually applies during the print. Quick scan:
• Firmware: Marlin or Klipper? (printer model/board helps)
• Do you run Linear Advance (M900 K) or Klipper Pressure Advance? Current K-value?
• What’s in your start G-code? (G28, G29, M420 S1, BED_MESH_PROFILE LOAD, etc.)
• Symptoms: first layer fine at center but bad at corners, mesh works on test move but not while printing, Z offset changes when K is on, or ABL is disabled after homing?
Customer
Ender 3 with Marlin 2.1.x, CR Touch. I probe with G29 in start G-code. When I enable M900 K0.14, the first layer ignores the mesh—front-left squished, back-right too high. With K=0 it’s ok. I thought Linear Advance shouldn’t touch Z?
Technician avatar Technician
You’re right: Linear Advance is an extrusion timing model (E vs F) and doesn’t directly move Z. But a few things make it look like the mesh is ignored:
1) M420 state resets after homing or some macros — if your slicer or firmware re-homes (G28) later, the mesh turns off unless you send M420 S1 (or RESTORE_LEVELING_AFTER_G28 is compiled).
2) Start G-code order: G29 after heating, then M420, then Z offset; wrong order can wipe the mesh or override ZBabystep.
3) Junction deviation/acceleration + M900 change extrusion pressure so first-layer line width shifts, masking compensation. Looks like Z error but it’s actually flow/line width.
4) Relative E + linear advance on some Marlin builds can cause early/late pressure ramps during the skirt/prime line; adhesion fails before mesh helps.
Customer
My start G-code is: G28 ; home
G29 ; probe
M900 K0.14
M420 S1
M109 S200
Heat after probing. Is that wrong?
Technician avatar Technician
Let’s tighten the sequence. Recommended for Marlin + ABL/UBL:
G90 ; absolute XYZ
M82 ; absolute E (or M83 if you prefer relative)
M104 S{first_layer_temperature} ; preheat hotend
M140 S{bed_temp} ; preheat bed
G28 ; home all axes
M190 S{bed_temp} ; stabilize bed before probing
G29 ; build mesh (or M420 S1 if you store mesh)
M420 S1 ; ensure bed leveling ON
M900 K0.14 ; linear advance K
M109 S{first_layer_temperature}
G92 E0 ; reset extruder
G1 Z2 F6000 ; safe lift
G1 X2 Y10 F6000 ; move to prime
G1 E6 F300 ; prime
G1 X120 E15 F1200 ; prime line

Key ideas: heat the bed before G29 (thermal expansion), explicitly re-enable leveling with M420 S1, then apply M900. If you store a mesh in EEPROM, you can skip G29 and just call M420 S1.
Customer
I tried that but corners still off when K is on. Could my Z offset be clashing with leveling?
Technician avatar Technician
Good call. Do this quick triage:
• Disable M900 for a single first-layer test and tune Z offset (paper test + live babystep). Store with M851 Z-0.xx then M500.
• Print a bed mesh validation (5×5 squares) with constant speed/flow. If all squares are even without M900 but vary with M900, it’s a flow/line width artifact, not Z motion.
• In slicer, set First Layer Flow = 100–105%, line width = nozzle × 120%, speed 20–30 mm/s. Too narrow lines exaggerate “ignored mesh”.
• If you use Relative E (M83), keep it consistent in start G-code to avoid pressure ramps mid-layer.
Customer
What about Klipper? On my Voron I use SET_PRESSURE_ADVANCE ADVANCE=0.045 and sometimes the BED_MESH_PROFILE doesn’t seem to apply until layer 2.
Technician avatar Technician
For Klipper:
• Ensure your start macro calls BED_MESH_CLEAR then BED_MESH_PROFILE LOAD=default (or BED_MESH_CALIBRATE).
• If you home after loading the mesh, Klipper still keeps it, but some macros (like adaptive bed mesh) may reload; check the order.
• Add QUAD_GANTRY_LEVEL / Z_TILT_ADJUST before loading the mesh.
• Pressure Advance in Klipper is orthogonal to Z; if your first layer only stabilizes on layer 2, increase first-layer extrusion multiplier or reduce PA on first layer: SET_PRESSURE_ADVANCE ADVANCE=0.03 at layer 0 via a slicer conditional, then restore at layer 2.
Customer
Sometimes after a cancel, the next print ignores the mesh entirely. I do G28 and hit print again.
Technician avatar Technician
After a cancel, many printers reset leveling state. Add this to your start G-code so it’s bulletproof:
• Marlin: M420 S1 (or G29 A for UBL) after the last G28 and before the prime line. Compile with RESTORE_LEVELING_AFTER_G28 if available. Store mesh with M500.
• Klipper: explicit BED_MESH_PROFILE LOAD=default inside your PRINT_START macro and avoid re-homing afterward. Check that your cancel macro doesn’t clear mesh.
• Always heat bed to target before probing or loading the mesh (thermal consistency).
Customer
If I reduce K to 0.10 it’s better. Is there a way to keep K0.14 but not mess up the first layer?
Technician avatar Technician
Yes—use per-layer advance:
• Marlin: in “before layer change” G-code, set M900 K0.10 for layer 0–1 and M900 K0.14 from layer 2 onward.
• Klipper: use slicer triggers to send SET_PRESSURE_ADVANCE ADVANCE=0.03 for layer 0, then restore 0.045 from layer 2.
• Keep first-layer speed ≤ 30 mm/s, line width ≈ 120%, and slightly higher flow (102–105%). This preserves bed mesh effect while still benefiting from advance on upper layers.
Customer
Do I need to run G29 every print? Or can I just enable the stored mesh?
Technician avatar Technician
If your bed is stable: store and reuse.
• Marlin: run G29 once, then M500. In start G-code use M420 S1 (UBL users: G29 L# + G29 A).
• Klipper: calibrate with BED_MESH_CALIBRATE, then BED_MESH_PROFILE SAVE=default. Start macro: BED_MESH_PROFILE LOAD=default.
Probe again when you change surfaces, nozzles, gantry, or after major maintenance.
Customer
Followed your order and per-layer K trick. Now the first layer is consistent on all corners and the mesh clearly compensates. Thanks!
Technician avatar Technician
Summary: When a bed mesh seems ignored with Linear/Pressure Advance, fix the start G-code order (heat bed → G28 → G29 or M420 S1 → enable advance → prime), ensure leveling state persists (M420 S1 or BED_MESH_PROFILE LOAD), and tame first-layer flow/line width/speed. Use per-layer K/PA so the first layer sticks while upper layers stay crisp. Need help editing your slicer template? Open the chat.

Quick answer: the accepted fix

Accepted fix when bed mesh leveling is ignored: heat bed, G28, then G29 (or load stored mesh) and explicitly enable with M420 S1 (Marlin) or BED_MESH_PROFILE LOAD (Klipper). Apply M900 K / SET_PRESSURE_ADVANCE after leveling is active. Use slower, wider first-layer lines and (optionally) lower K/PA on layer 0–1.


Why bed mesh seems ignored (ABL/UBL, M420, K-factor & flow dynamics)

Bed mesh leveling adjusts Z in real-time from a bilinear/UBL height map. Linear Advance (Marlin M900) and Pressure Advance (Klipper) change extrusion pressure during accelerations. If start G-code disables leveling after G28, or if line width/flow shrink from advance, the result mimics a Z error. Ensuring leveling state (M420 S1) and sane first-layer flow/speed restores visible mesh compensation.

How to verify mesh is active

Run a 5×5 first-layer squares test with a saved mesh. During the print, send M420 V (Marlin) to echo leveling status or use Klipper’s console to confirm bed_mesh: enabled. Jog X across the bed at Z=0.2 and check that Z micro-moves are reported. If mesh is off, add M420 S1 (or BED_MESH_PROFILE LOAD) immediately after the last G28 in your start G-code and store your mesh (M500 or BED_MESH_PROFILE SAVE).

Bed mesh ignored — quick troubleshooting tips

Most cases are start G-code order, leveling state after homing, or aggressive K/PA masking first-layer flow.

Quick path: heat bed → G28 → G29 / M420 S1 → M900/SET_PRESSURE_ADVANCE → prime. Keep first-layer speed ≤30 mm/s, line width ~120%, flow 102–105%. Reuse stored mesh (M500 + M420 S1 or BED_MESH_PROFILE LOAD). Probe again after hardware changes.

Disclaimer: This information is AI-generated and intended for general guidance only. For advice specific to your environment, please consult a verified expert on Whizz-Tech before making decisions.


Getting Started Is Easy

Ask for help, 24/7

Members enjoy round-the-clock access to 12,000+ verified Experts, including tech support, mechanics, vets, and more.

Expert will respond in minutes

We match you with an Expert who specializes in your situation. Talk, text, or chat — whichever you prefer.

Save time & money

No scheduling hassles or expensive consults. Membership can save you significant time and money each month.

FAQ

Does Linear Advance (M900) disable bed leveling?

No. Linear Advance adjusts extrusion pressure, not Z. But if M420 S1 isn’t sent after G28, leveling may be off, and K can make lines thinner so it appears like mesh is ignored.

Should I probe (G29) every print?

Not required on a stable bed. Probe once, M500 to save, then enable with M420 S1 each print (Marlin) or BED_MESH_PROFILE LOAD (Klipper). Re-probe after hardware changes.

How do I use different K on the first layer?

Insert M900 K0.xx (Marlin) or SET_PRESSURE_ADVANCE ADVANCE=… (Klipper) in slicer “before layer change” G-code: lower value for layer 0–1, restore on layer ≥2.

Is UBL better than bilinear for warped beds?

UBL supports larger meshes and manual point edits. For heavily warped plates, UBL can produce smoother compensation versus standard bilinear ABL.

Sources

Matt Verified Icon
Matt ● replies in < 1 min
Technician Expert
⭐⭐⭐⭐⭐ Trusted by 27,000+ customers
Avatar
Alex · Expert's Assistant