Filament not printing after filament change mid-print

What is the problem?

I'm trying to do a filament change in the middle of the print.
I tried with the M600 code added by my slicer (prusa-slicer) but I can not resume the print on my printer after changing the filament.
So I installed the Change_Filament plugin for Octoprint and used a @pause command in my GCode.

The print pause at the right time, I unload the current filament and load the new one without problem.

But when I resume the print, it resumes correctly but the new filament is not coming out of the nozzle.

What am I missing ?

What did you already try to solve it?

  • I tried with the M600 code
  • I tried with the @pause command and the Change_Filament plugin
  • I tried to let the print continue to see if filament comes out eventually (it does not)

Have you tried running in safe mode?

No.

Systeminfo Bundle

octoprint-systeminfo-20250929154301.zip (69.1 KB)

Additional information about your setup

  • OctoPrint 1.11.3 installed on a Raspberry PI with a Creality Ender-3 V3 SE printer.
  • After print job is paused script :
; (optional) disable stepper inactivity timeout - uncomment if you printer disables steppers during pause and supports this command
;M18 S0

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

; retract filament, move Z slightly upwards
G1 Z+5 E-5 F4500

; absolute XYZE
M82
G90

; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}
  • Before print job is resumed
{% if pause_position.x is not none %}
; relative extruder
M83

; prime nozzle
G1 E-5 F4500
G1 E5 F4500
G1 E5 F4500

; absolute E
M82

; absolute XYZ
G90

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

; 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 %}

The scripts are the one from the documentation.

The scripts need to preserve the slicer settings for absolute or relative extruder and my guess that your scripts do not do that (I believe Prusa Slicer defaults to relative extruder).

See these topics:

Thank you for your answer, that was it.

If anyone else is interested, here is what I did to solve this :

  • To confirm that Prusa Slicer defaults to relative extruder, I generated a GCODE file with a small cube
  • I opened it to look at the commands and there was the following code before the start of the print :
    M83 ; use relative distances for extrusion
  • I modified my "resume" script to add an M83 code at the end

After that, it worked as expected.

1 Like