# Issue with Z homing on Ender 3 Pro with Marlin

I've just changed the motherboard on my Ender 3 Pro with a MKS GEN_L v1.0 and flashed the latest Marlin version on it.

I've calibrated my bed manually using the default XY and Z auto home commands on OctoPrint and a piece of paper.

I'm happy with the calibration, however whenever I launch a print the Z axis moves up from the calibrated position by about 4 mm and starts extruding.

I've checked my Z endstop status with M119 and it's triggered at the right calibrated position.

How can I correct this?

• Looks like it is accounting for an imaginary glass bed. So it homes next to the build plate, but afterwards moves up to 4 mm? Could be an offset at play. You have the config files, so you need to figure that out, or did you flash a ready made binary file?
– 0scar
Jan 30 at 17:39
• 4 mm is a typical glass sheet Jan 30 at 18:02
• This is most probably caused by uploading a preconfigured binary firmware, changing the Z offset has been discussed before, e.g. here and here.
– 0scar
Jan 30 at 22:22

I've actually found what the issue was. It turns out that my Z steps were way out of whack (i.e. 4000 steps/mm instead of 400). Apparently, that's the default value in GitHub for version 2.0 of Marlin. Not sure if that's a typo or a valid value, anyhow setting it to 400 fixed it.

• Thanks for feedback. I will add this also to my answer (the checklist, let's say). Jan 31 at 18:39
• Pierre, accept the answer - one or either. The question is resolved. Feb 2 at 3:51

If you are already sure that homing is performed correctly and in valid position, then there are few reasons why printer may start printing in unexpected position.

Do the following checks to narrow down the actual one:

• steps/mm: use M503 (or M92 without parameters) to check if currently configured steps/mm match your hardware setup for each axis

• offsets: use M503 (or M206 without parameters) to check that there are no offsets configured

• backoff: look in Configuration_adv.h for following line:

//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 }  // (mm) Backoff from endstops after homing


(Having the backoff set is nothing wrong, actually. But be sure to also check final positioning in the generated file.)

• slicer's Start G-code: review slicer configuration, if there is nothing suspicious injected to the print file, which could temporarily overrid printer setup - esepecially M428, M206, G92 (set position is normal for E in relative extrusion mode, but suspicious for X,Y,Z)

• generated file: review initial part of generated G-Code file, if there are any similar surprises, and if on initial layer section there is expected move to valid Z position before extrusion is made