3mm Layer Shift After Resuming Paused Print

What is the problem?

After pausing a print to insert some nuts, the print resumes fine except that it has shifted 3mm to the right along the X axis.

What did you already try to solve it?

I tried using the pause function in Prusa Slicer, but it didn't seem to work at all. Don't know what else to try. I checked the pause/resume scripts in Octoprint and they look like the recommended settings.

Have you tried running in safe mode?

Safe mode?

Did running in safe mode solve the problem?

I had no idea there was a safe mode in Octoprint.

Systeminfo Bundle

octoprint-systeminfo-20230519130204.zip (102.6 KB)


CR10S Pro w/BL Touch running TinyMachines firmware. PrusaSlicer.

Hi SamDu,

  • is this a repeatbale error?
  • do you perhaps have any gcode in octoprint under printer>>GCODE Scrips>>After print job is paused and in printer>>GCODE Scrips>>After print job is resumed?

Repeatable 100% of the time. Here's what I have in "After print job is paused:"


{% if pause_position.x is not none %}
; relative XYZE

; retract filament of 0.8 mm up, move Z slightly upwards and
G1 Z+5 E-0.8 F4500

; absolute XYZE

; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}


And here is what is in "After print job is resumed:


{% if pause_position.x is not none %}
; relative extruder

; prime nozzle
G1 E-0.8 F4500
G1 E0.8 F4500
G1 E0.8 F4500

; absolute E

; absolute XYZ

; reset E
G92 E{{ pause_position.e }}

M83 ; extruder relative mode

; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500

; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}



Please please please use


for uploading code.

Things get messed up and spaces lost.

1 Like

Hi Sam,

I think your issue is a combination of things between firmware behavior and the gcode snippets you posted.

The ideal way to troubleshoot this would be to log these positions stored and returned to, but I am not aware of a simple standard feature to do this. You might get some success from Marlin SD Logging

Try to add the command to you gcode before the print and see if you get position logs collected.

Also maybe the G90 in after pause makes the G1 X0Y0 ignore offsets you have configured, this offset then causes the printer to go back to the wrong position.

Try commenting out G90 for example.

Also try out M117, it will add messages to the octoprint terminal, try to print out pause_position.x etc.

Thanks, I'll give those suggestions a shot.

PS: I found this detailed discussion on the topic that explains a lot and will probably solve your issues.

Troubleshooting Pause and Resume scripts - Get Help - OctoPrint Community Forum