G29 - Unified Bed Leveling

calibration Probe the bed and enable leveling compensation. AUTO_BED_LEVELING_UBL

The Unified Bed Leveling System (UBL) provides a comprehensive set of resources to produce the best bed leveling results possible.

See the full Unified Bed Leveling documentation for more details. (Examples below.)


G29 [A<bool>] [B<bool>] [C<bool/float>] [D<bool>] [E<bool>] [F<linear>] [H<linear>] [I<int>] [J<int>] [K<index>] [L<index>] [P<0|1|2|3|4|5|6>] [Q<index>] [R<int>] [S<slot>] [T<0|1>] [U<bool>] [V<0|1|2|3|4>] [W<bool>] [X<linear>] [Y<linear>]

Argument Description

Activate Unified Bed Leveling (i.e., M420 S1)


Business Card mode (P2 only)


Continue (P1), Current (P2), Constant (P3,Q2)


Disable Unified Bed Leveling (i.e., M420 S0).


Stow probe after probing Each point (P1 only).


Fade height. (UBL only! For others use M420 Z)


Height for Manual Probe raise (P2 only).


Invalidate this number of mesh points. (No value = 1)

  • With a value (v), do Square Grid probing of v x v points.
  • With no value, do Three Point probing.

Kompare: Subtract the stored mesh with the given index from the current mesh.


Load a mesh. If no index is given, load the previously-activated mesh.



  • P0:

    Zero Mesh Data and turn off the Mesh Compensation System.

  • P1:

    Invalidate Mesh and do Automatic Z Probing.

  • P2:

    Probe Areas of the Mesh that can’t be automatically handled.

  • P3:

    Fill Unpopulated regions of the Mesh with a fixed value (C or ).

  • P4:

    Fine Tune the Mesh. Generally used in the form G29 P4 Rnn Xxxx Yyyy.

  • P5:

    Find Mean Mesh Height and Standard Deviation.

  • P6:

    Shift Mesh height by the C value.


Test Pattern


Repeat count. (Default GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y)


Store mesh to EEPROM in the given slot. If no slot given, use last-activated. Use S-1 for GCode output.


Topology: Include a Topology Map in the output. Can be used alone or with several other commands. A map type can also be specified:

  • T0:


  • T1:



Unlevel: Probe the outer perimeter to assist physical leveling. (Use with G29 P1 O)


Verbosity Level (0-4)


What?: Displays current Unified Bed Leveling info


X position (otherwise, current X position)


Y position (otherwise, current Y position)