Need help :printer.cfg is recover by auto and cant reboot

Basic Information:

Printer Model:voron 2.4
MCU / Printerboard:spyder 2.2
Host / SBC orangepi zero 2
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

as the title so i am so many time to edit the config but its use old date and recover i am chinese so please simple word and thank for your help

klippy.zip (36.6 KB)

Generally, please use any of the available translation tools to:

  1. Describe your problem
  2. Understand the answer

From the log, it looks like:

  • You have a corrupted printer.cfg file
  • The section starting with
    #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
    
    has been incorrectly modified.
  • You can do
    • Revert the modification
    • Delete the entire section and redo PID calibrations and other tuning
    • Post your printer.cfg for further guidance
1 Like

That’s my problem. It will overwrite the one I just modified with the old one.

Are trying to recover an older configuration from your Pi?

Then open Mainsail and go to the configurion tab and

  1. Rename printer.cfg → old_printer.cfg
  2. Select a backup with the time and date code (like printer-20250804_171329.cfg) and rename it printer.cfg
  3. Restart Klipper

Are you trying to upload a printer.cfg file that you’ve modified on your PC?

Then open Mainsail and go to the configuration tab and

  1. Rename printer.cfg → old_printer.cfg
  2. Click the upload button and upload your modified file (MUST be named printer.cfg)
  3. Restart Klipper

Both tasks can also be accomplished by using the editor built into Mainsail. Click on printer.cfg to load it in the editor, highlight EVERYTHING and delete, copy/paste the entire file from notepad on your PC, click “save and restart”.

Sorry, I wasn’t clear. The machine was working fine. Because the hot end failed, I replaced it with a new one. I also set the PID and then saved the configuration. After rebooting, I got a different error code (it’s different each time).

I also have a Z offset issue.

#position_endstop: -0.5 (the # is added by the machine itself)
#control: pid
#pid_kp: 58.437
#pid_ki: 2.347
#pid_kd: 363.769 (the four #'s are added by the machine, just like above)

Strangely enough,
## <---------------------- SAVE_CONFIG ---------------------->
#
# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
##
#
# [extruder]
## control = pid
#
# pid_kp = 24.176
## pid_ki = 1.389
#
# pid_kd = 105.165
##
#
# [heater_bed]
## control = pid
#
# pid_kp = 33.624
## pid_ki = 0.642
#
# pid_kd = 440.059
##
#
# [stepper_z]
#*# position_endstop = 0.470
If these records are already at the end of PRINTER.CFG, why are there still fault codes?

========================================================
I replaced the memory card last night and will try again tonight. My hunch is that the memory card is faulty. I hope to have good news tonight. Thank you for your patient answers

抱歉 我說的不清楚 機器原本是正常的 因為熱端故障 所以換了一個新的熱端 也做完PID 接著就是SAVE_CONFIG 重新開機後就是故障碼(每次故障碼都不同)
也有 Z OFFSET 的問題
也有#position_endstop: -0.5(# 是機器自己加的)
#control: pid
#pid_kp: 58.437
#pid_ki: 2.347
#pid_kd: 363.769 (4個# 跟上面一樣 是機器自己加的)
很奇怪的是
## <---------------------- SAVE_CONFIG ---------------------->
#
# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
##
#
# [extruder]
## control = pid
#
# pid_kp = 24.176
## pid_ki = 1.389
#
# pid_kd = 105.165
##
#
# [heater_bed]
## control = pid
#
# pid_kp = 33.624
## pid_ki = 0.642
#
# pid_kd = 440.059
##
#
# [stepper_z]
#*# position_endstop = 0.470
如果PRINTER.CFG 的末端 已經有這些紀錄 為何還會有故障碼?

================================================
昨晚我換一張新的記憶卡 今晚會再重試 我直覺是記憶卡故障導致
希望今晚有好消息在跟各位報告 謝謝各位耐心的解答

English is the translation and Chinese is the original meaning

Attach your printer.cfg. From what you have pasted, the entire block is messed up.

I’ll upload it after get off work in the evening.

And please upload as a file.

printer (1).cfg (43.7 KB)

thank everybody help

I just tried a new memory card and this command still won’t reboot properly (SAVE_CONFIG). I can only see the normal operating screen after forcing the power on and off. Is there anything else I need to adjust?
Thanks everyone

這是最新的文件了

printer (2).cfg (43.7 KB)

klippy (1).zip (413.6 KB)

Your printer.cfg is a raging mess. It would make sense to:

  1. Familiarize yourself with the settings and documentation. Another starting point may be Klipper’s printer.cfg - Syntax and Parsing Rules
  2. Start over and build a clean config
  3. Respect warnings like #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. if you do not know what you are doing.

Not sure if I cleaned up everything, but try
printer.cfg (42.7 KB)

  • It is expected to be in /home/orangepi/printer_data/config/printer.cfg.
  • Replace the file and then restart Klipper
  • Redo z_offset calibration and potentially PID tuning

Thank you. I’ll get back to you with the results tomorrow. Could you please help me with a few more questions? Could you explain these lines?
164 position_endstop: -7.83 (-7.83 refers to the height of which line)
171 position_min: -30 (If the other three lines are correct, this value is obviously a bit risky. What should I set to be safe?)
321 #z_offset: -8.305 (If z_offset: -8.305 in line 321, does that affect line 885?)
885 #*# z_offset = -1.950 (Currently, the first floor is still 8.305mm high. I tried it last night. How should I adjust it?)
Thank you, Sineos, and everyone for your continued help. The machine is finally working.

I have another question: I followed the instructions on Probe calibration - Klipper documentation and entered “PROBE” (this should indicate the probe is connected, right?) Then, when I reached the “PROBE_CALIBRATE” command for calibrating the probe’s Z-axis offset, was this also for testing the probe? My question is: Where do I set the distance between the probe and the printhead?

Your printer.cfg includes a seperate klicky configuration reference.

You are using a Klicky?

Yes I use it

All your questions are answered within available documentation: