3D Printing (General)

Bed mesh in Klipper: how to set it up and the settings that work

A practical walkthrough of bed mesh in Klipper: the minimum printer.cfg block, how to run BED_MESH_CALIBRATE properly, when to use adaptive meshing, and how to tell a probe problem from a bed problem.

Published 2026-05-19

A bed mesh in Klipper measures how flat your bed actually is, then has the printer compensate for the wobble as it prints. Done right, it fixes most first-layer problems on a half-decent machine. Done wrong, it makes them worse. Here is how we set it up in the workshop.

What a bed mesh actually does

The printer probes a grid of points across the bed, builds a height map, then nudges Z up or down on the fly while the first few layers print. A warped bed becomes a printable bed.

You only need this if your bed is not perfectly flat. Spoiler: no bed is perfectly flat. Glass comes closest, but most PEI spring-steel sheets have a few tenths of a millimetre wobble across the surface, and aluminium beds without a heated insulator often dip in the middle once they warm up.

What needs to be right first

Before you mesh anything, three things have to be sorted:

  • A working Z probe (BLTouch, inductive, strain-gauge, Voron Tap, Beacon, whatever you have fitted)
  • A trammed bed, with the four screws or auto-screws levelled so the bed is roughly parallel to the gantry
  • A clean nozzle and a clean bed

If your probe is unreliable, your mesh will be unreliable. Garbage in, garbage out. Probe the same point ten times with PROBE_ACCURACY and look at the standard deviation. Anything over about 0.010 mm and you have a probe problem, not a bed problem. Fix that first.

The minimum printer.cfg

Here is the smallest [bed_mesh] block that does the job on a 235x235 mm bed:

``` [bed_mesh] speed: 120 horizontal_move_z: 5 mesh_min: 15, 15 mesh_max: 215, 215 probe_count: 7, 7 algorithm: bicubic fade_start: 1 fade_end: 10 fade_target: 0 ```

mesh_min and mesh_max are the corners of the probed area in nozzle coordinates, not probe coordinates. Klipper works out the offset from your probe's x_offset and y_offset. If you set mesh_max too close to the bed edge, the probe physically cannot reach it and you get a probe-out-of-range error.

A probe count of 7 by 7 (49 points) is the sweet spot for a 235 mm bed. Smaller beds can drop to 5 by 5. Large 350 mm beds are worth taking up to 9 by 9 or 11 by 11.

Running BED_MESH_CALIBRATE properly

The sequence I run on every machine that comes in:

1. Home the printer with G28. 2. Heat the bed to the temperature you actually print at (60 C for PLA, 70 C for PETG, 100-110 C for ABS) and let it soak for ten minutes. 3. Heat the nozzle to about 150 C. Warm enough to be thermally normal, not hot enough to ooze plastic on the bed. 4. Clean the nozzle with a brass brush or a wipe. 5. Run BED_MESH_CALIBRATE. 6. SAVE_CONFIG when the probe finishes.

The bed soak matters. Aluminium expands as it warms, sometimes by a quarter of a millimetre in the centre. A mesh taken on a cold bed is already wrong by the time the bed hits 100 C.

Pick the right algorithm

You get two choices: lagrange or bicubic. Use bicubic. Lagrange is the older interpolation and it tends to overshoot between probe points on curved beds. Bicubic gives smoother transitions and is what every sensible config has used for years.

Fade is your friend

fade_start: 1 and fade_end: 10 tells Klipper to apply the full mesh correction at Z = 1 mm, then gradually back it off until Z = 10 mm, where the gantry moves perfectly flat again. This is what you want. The mesh fixes the first layer and the bottom of the print, then disappears so the top of a tall part comes out square instead of subtly wavy.

fade_target: 0 removes the average mesh correction entirely once you are above fade_end. Leave it at 0 unless you have a specific reason to change it.

Saving and loading the mesh

Run BED_MESH_PROFILE SAVE=default, then SAVE_CONFIG. The mesh is written into your printer.cfg.

In your slicer's start G-code, add:

``` BED_MESH_PROFILE LOAD=default ```

Put it after homing and heating, but before the first move that lays plastic. If you forget to load it, the mesh exists in the config but is not active for the print. This catches people out all the time.

Adaptive bed mesh

Instead of probing the whole bed every print, you can have Klipper only probe the area you are about to print on. If you have a macro like KAMP (Klipper Adaptive Meshing and Purging), it pulls the print area from the slicer and meshes just inside it.

On a 235 mm bed printing a 60 mm part, you drop from 49 probe points to maybe 9. Faster start, same first-layer quality where it actually matters. This is probably the best default if you want a fresh mesh every print without the long wait.

Common things that go wrong

The probe trips early on one corner. Almost always a loose bed screw, a piece of debris under the spring steel, or the probe deploying late on the first point. Re-tram and re-test.

The mesh looks great but the first layer is still bad. The mesh is fine; your Z offset is off. Mesh corrects shape, Z offset corrects absolute height. Use a paper test or run PROBE_CALIBRATE.

The mesh changes every time you run it. Probe is loose, wires are pulled tight against the X carriage, or thermal drift is creeping in. Tighten the probe, check the loom, soak the bed longer.

Standard deviation in PROBE_ACCURACY is over 0.01 mm. Genuine probe problem. BLTouches wear out, inductive probes drift with bed temperature, and on strain-gauge probes like Voron Tap the wires can fatigue at the strain relief.

How often to remesh

If nothing on the printer has changed, every couple of months at most, just to confirm nothing has shifted. If you swapped the build plate, changed bed screws, dropped the printer, or rebuilt the toolhead, remesh straight away.

If you print with very different bed temperatures (60 C for PLA one day, 110 C for ABS the next), a single mesh is a compromise. Save separate profiles: BED_MESH_PROFILE SAVE=pla and BED_MESH_PROFILE SAVE=abs, then load the right one in your filament-specific start G-code.

When to mail it in

If you have followed the steps above and your mesh is still all over the place — probe readings that drift run to run, corners that are way out of plane, or a frame that feels twisted when you push on it — something physical is wrong. Worn linear rails, a bent gantry, a bed that has dished from heat cycling, or a flaky probe wire are all common culprits, and they are hard to spot from a config file.

We can put it on the bench and work through it methodically. Send a short note via /contact.html with what you have tried, photos of any error messages and your current printer.cfg if you have it. Bed and probe work is usually back with you within a few working days.