M413 - Power-loss Recovery

2.0.0 control Enable / disable power-loss recovery POWER_LOSS_RECOVERY


M413 is used to turn the Power-loss Recovery feature on and off. When Power-loss Recovery is enabled and Marlin is running a print job from the SD Card or Flash Drive, it periodically saves the print job state to the SD Card / Flash Drive. If the machine crashes or a power outage occurs, Marlin presents the option to resume the interrupted print job.

This feature is able to operate without a power-loss detection circuit by writing the recovery file periodically (e.g., once per layer). However, with a POWER_LOSS_PIN Marlin only writes the recovery info when a power-loss is actually detected. This method is preferred because the print will be resumed exactly where it was interrupted (rather than repeating the last layer), and the SD card or Flash Drive will incur much less wear.


Requires POWER_LOSS_RECOVERY and an LCD controller.

Requires printing from the SD Card or Flash Drive.

A future implementation may use the EEPROM instead of the attached media.


M413 [S<bool>]



Flag to enable or disable Power-loss Recovery. If omitted, the current enabled state will be reported.


    Enable power-loss recovery

    M413 S1

    Disable power-loss recovery

    M413 S0

    Report power-loss recovery state

    Power-loss recovery ON