I have read and understood all rules of the Innovation Fund Phase 2
on
I consent to my project information (username, project cover, summary, etc.) being publicly displayed for review and showcase
on
Username (for public display)
alandebortolo
Project name
U1 Fix Pack
Project URL
Project cover
Project Category
Firmware
Project Summary
U1 Fix Pack takes bugs that U1 owners reported on Snapmaker’s firmware repository and still open, reproduces each one on the real firmware code with no printer on the desk, fixes it with the smallest patch I could write, and keeps a regression test that fails on firmware 2.0.0 and passes with the patch, in CI on every push.
Demo video, 2.5 minutes. The terminal output is real, taken from the evidence files in the repo; the voice is synthetic.
https://designmaster-solutions.github.io/u1-fixpack/demo.mp4
How it reaches the U1. The tests build Snapmaker’s own u1-klipper at the commit of firmware 2.0.0 (93cb12f), with the data dictionaries of the U1’s boards, and run it in Klipper batch mode with the shipped printer.cfg and fluidd.cfg. A bug counts as reproduced only when the firmware’s own output shows it: an error it raises, a position it reports, the clock of a command it sends to the MCU. Patches are plain .patch files against 93cb12f, small enough to apply on a custom firmware build.
u1-klipper#22: skip an object, Pause, and Resume fails with “Move out of range”. The test prints a file through the firmware’s own virtual_sdcard and presses Pause and Resume through the same webhook handlers Moonraker calls, with the shipped INNER_PAUSE/INNER_RESUME macros. On 2.0.0 all 3 cases fail: Resume and the end-of-print G1 E30 stop with the error from the report (Move out of range on Y axis), and after a park inside the skipped object the firmware’s own position says X33 while the head is at X45, off by the skipped object’s offset. With the patch, 3 of 3 finish and the print ends complete. Three deliberately wrong versions of the patch fail the test, including my own first version, which survived a single-leg park but not the U1’s multi-leg one.
u1-klipper#18: the part fan switches 2 to 4 seconds before the head gets to the M106/M107. The test decodes the MCU command stream of the e0 board with Klipper’s parsedump.py and compares the clock of the fan PWM command with the clock of the first extruder step of the move that follows the command. On 2.0.0, M106 turns the fan on 4,366 ms before that step, and M107 turns it off 4,266 ms before it. With the patch, both land 10 ms after it, inside a 12 ms tolerance (two 5 ms PWM periods plus 2 ms for step and scheduling quantization). The fix is the one the reporter pointed to: G-code fan changes ride the motion queue, as in mainline Klipper, and the fan speed the firmware reports (what Fluidd shows) changes when the PWM is scheduled, not when the line is read. Three deliberately wrong versions fail the test: one that leaves M107 immediate, one whose reported speed never updates, and one whose reported speed jumps ahead of the queued move.
Credit. The people who filed the issues found and described these bugs: alternativniy on #18, who also traced the root cause and pointed to the fix mainline Klipper uses, and SwineFlew931 on #22. This project adds the printer-free reproduction, the patch and the regression test, and offers each patch upstream as a draft pull request on u1-klipper (#24 for #22 and #25 for #18, linked from the project README).
Still needed on 2.1.0. The 2.1.0 release Snapmaker opened on November 3 (u1-klipper #23, head 7e565c8) does not touch the four files these patches change, and both patches apply cleanly to it.
Limits, stated up front. Batch mode has no physics and no real sensors, so a patch proven here is a fix of the firmware logic, not yet a print. #8 (runout and resume replaces the measured flow calibration) is not in the pack: it needs a real runout sensor event, and faking that would prove nothing. I built it with AI coding assistance.
If you have a U1 and hit either bug, please try the patch on a custom firmware build and tell me what happens, right or wrong. A run on a physical U1 is the one thing I cannot do from here.
Open Source Status
Open Source
Please specify the open source license used by this project
GPL-3.0
Cash Fund or U1 Hardware Sponsorship
Cash Fund
Originality
Improvement / optimization based on an existing project
If based on an existing project — your independent contribution
Based on Snapmaker’s u1-klipper (GPL-3.0). My contribution: the printer-free reproductions on the shipped firmware, the patches, and the regression tests with red/green/mutant evidence and CI. The firmware runner is reused from my own U1 Dry Run (topic 43986).
Is it a paid project?
No
