# \[Feature Request\] - Simple Power Loss Recovery Setting

**URL:** <https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815>\
**Category:** Features\
**Created:** [February 22, 2023, 2:36am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815 "2023-02-22T02:36:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurofox](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@Kurofox](https://klipper.discourse.group/u/Kurofox)\
**Post date:** [February 22, 2023, 2:36am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/1 "2023-02-22T02:36:31Z")

</div>

There should a power loss recovery for klipper. Some sort of recording of what layer it was last on before sudden interruption would be a good starting point to resume prints.

It doesn’t even have to direct resume , it could just specify the layer it was last printed without having to dig through the logs and make cutting the rest of the model to print easier.

I was thinking a checkpoint system would work , as in specifying if a layer is finished before moving on to the next.

Then , if a layer gets cut off, the log would show what layer was last finished and the rest of the print could be manually printed. It would be less buggy or affect print quality such as Power loss recovery on marlin does because of the external memory.

Since it runs on an external computer and does not require the main board to stutter, I think it would be a viable and straightforward way to resume a print.

---

<div class="post-metadata">

**Author:** ![jakep\_82](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jakep\_82](https://klipper.discourse.group/u/jakep_82)\
**Post date:** [February 22, 2023, 2:54am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/2 "2023-02-22T02:54:24Z")

</div>

This has been discussed many many times on GitHub, Discord, and probably here too. To my knowledge nobody is working on this, and there doesn’t seem to be much interest in adding this feature. See some discussion here about why your proposed solution is not likely to be added.

> <https://github.com/Klipper3d/klipper/issues/2904#issuecomment-633147965>
>
> I've just suffered a power loss most of the way through an eight hour print. I'm… sure we have all had similar experiences. 
> Sometimes you can start it back up from where it stopped, but only if you can find out exactly where it stopped... well, maybe not exactly, but you need to be fairly close.
> In many instances, you can just look at the log, find the last instruction and run the code from there, but here the log was lost in the power failure (I presume overwritten when the Pi restarted).
> 
> Assuming that nothing has moved, it ought to be possible to find the precise position of the tool by counting the steps back to home: is there any way to do that?
> If not, could the feature be added?
> Or is there a better way to recover that I am not aware of?
> 
> \[klippy.log\](https://github.com/KevinOConnor/klipper/files/4664890/klippy.log)
> \<!-- Klipper do something undesirable? YOU MUST ATTACH THE KLIPPER LOG FILE.
> See: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md --\>

---

<div class="post-metadata">

**Author:** ![Kurofox](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@Kurofox](https://klipper.discourse.group/u/Kurofox)\
**Post date:** [February 22, 2023, 3:16am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/3 "2023-02-22T03:16:18Z")

</div>

Right, I’ve visited that post before. Wouldn’t hurt to ask again I suppose I thought, ah well.

---

<div class="post-metadata">

**Author:** ![theophile](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/theophile/32/31_2.png) [@theophile](https://klipper.discourse.group/u/theophile)\
**Post date:** [February 23, 2023, 2:38pm UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/4 "2023-02-23T14:38:52Z")

</div>

You can already do this easily with SAVE\_VARIABLE. Just have your layer change gcode save the current layer height or number to the SD card at each layer change. You could even add a custom gcode macro to tell you the last-printed layer number on the console when asked. If you want to get fancy, you could also add variables for the gcode filename and whether the last print finished successfully so as to have some rudimentary detection for whether recovery is needed.

---

<div class="post-metadata">

**Author:** ![tymau5](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@tymau5](https://klipper.discourse.group/u/tymau5)\
**Post date:** [April 24, 2023, 2:26am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/5 "2023-04-24T02:26:19Z")

</div>

I see a lot of interest in adding this feature on the facebook page. Only problem is that a lot of those people don’t post on the other platforms.

---

<div class="post-metadata">

**Author:** ![jakep\_82](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jakep\_82](https://klipper.discourse.group/u/jakep_82)\
**Post date:** [April 24, 2023, 2:28am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/6 "2023-04-24T02:28:36Z")

</div>

When I say not much interest in adding this feature, I mean from a developer standpoint. It’s not as simple as many people seem to think, and to do it right requires additional hardware in combination with software.

---

<div class="post-metadata">

**Author:** ![tymau5](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@tymau5](https://klipper.discourse.group/u/tymau5)\
**Post date:** [April 24, 2023, 2:35am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/7 "2023-04-24T02:35:55Z")

</div>

Oh okay, that makes sense. An alternative solution to those interested and reading would be to buy a UPS (uninterruptable power supply). Unless the power outages are long and frequent, it should suffice.

---

<div class="post-metadata">

**Author:** ![jakep\_82](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jakep\_82](https://klipper.discourse.group/u/jakep_82)\
**Post date:** [April 24, 2023, 2:39am UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/8 "2023-04-24T02:39:54Z")

</div>

Yes, the easy solution that requires no code at all is a UPS. If I had problems with brief power outages, that is what I would use.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [September 10, 2024, 1:39pm UTC](https://klipper.discourse.group/t/feature-request-simple-power-loss-recovery-setting/6815/9 "2024-09-10T13:39:12Z")

</div>


