Timer Too Close error after M600 pause in recent Klipper builds

Hi Kevin,

Just to give you some additional context regarding the LOAD_FILAMENT macro: I’m using a relatively high filament loading speed to eliminate unnecessary waiting during filament changes. This means a very large number of steps are being generated in a very short period.

This actually makes me wonder if there’s a connection with the first bad commit, the “Generate step from timer…” change. However, these high extruder linear speeds may never occur during normal prints due to the volumetric speed limits set in my slicer. If I were to increase the volumetric speed limit, I might encounter the same issue during printing.

It’s also possible that the random TTC errors mentioned by @code29 are related to their printer being faster, and my high speeds during filament loading just happen to trigger the same behavior. Alternatively, reducing the filament speed in the LOAD_FILAMENT macro may prevent the issue entirely. I plan to test these scenarios as soon as possible.

At the same time, I’m reading through the code to understand the systematic impact of this change. Since I’m relatively new to this project, if there are any documents explaining the changes, sharing them would be really helpful for me to get up to speed.

Thanks again,
— Sezgin

Thanks for working on this, and thanks for providing a detailed description of the issue.

I was able to reproduce something similar locally. The issue appears to be a subtle interaction between G4 and the new backend flushing mechanism. In some situations a G4 command (or series of commands) could cause the toolhead to think it is in an active state while the background step generation flush timer became idle. This could result in a situation where truly idling the toolhead may not flush out the last move command. It was a very subtle timing issue.

I have committed a fix (commit 184ba408) that will hopefully resolve this issue. More work may be needed in this area in the future, but hopefully this resolves the immediate problem.

Thanks again,
-Kevin

Hi Kevin,

Yes, the bug is indeed fixed. Thank you for the patch — it allowed me to return to using the latest version again.

While testing, I used the same multicolor model as in my previous tests to ensure the same conditions. So far, I haven’t encountered any issues. In the coming days, I’ll continue testing under real-world conditions with plenty of multicolor prints.

If I happen to run into the same issue again, I’ll be sure to revive this thread.

Thanks again!
Sezgin