Skip to content

U1 touchscreen repeats power-loss shutdown error on Play despite recoverable saved print #20

Open

Description

@rdcstout

Summary

After an actual mains power outage interrupted a U1 print, the printer's own touchscreen offered no usable power-loss recovery path. Pressing Play repeated the shutdown error instead of recovering the saved print. Recovery succeeded after a firmware restart followed by the dedicated power-loss restore command.

Reporting here for the U1 firmware team to triage. The fault crosses the firmware/touchscreen recovery flow; this report does not assume that the owning code is necessarily in this repository.

Related but distinct desktop issue: Snapmaker/OrcaSlicer#1062 (Orca does not expose saved power-loss recovery). This incident also affected the physical touchscreen with no desktop UI needed to reproduce the failed Play action.

Firmware version

U1 2.0.0; printer API Klipper software_version: 2.0.0.205_20260914173503. Moonraker reports 2.0.0.

Firmware source

Printer reports the official release version above. A complete comparison of installed files against the stock image has not been performed.

Third-party firmware source

No third-party firmware was installed during this investigation.

Was the configuration modified?

No configuration changes were made for diagnosis or recovery. The full pre-existing configuration has not been audited for unrelated changes.

What configuration changes were made?

None during diagnosis/recovery. Only the existing firmware restart and recovery commands were used; no thresholds or protection settings were changed.

Was the source code modified?

No source changes were made for this investigation.

What source code changes were made?

None.

How can the issue be reproduced?

Observed during an unplanned outage on October 23, 2026, not a deliberately induced test:

  1. U1 was printing Tray_PLA_6h48m.gcode.
  2. Mains power went out; room lights also went out. This was an observed outage, not merely an inferred or suspected false power-loss signal.
  3. The printer's touchscreen displayed a System Anomaly rather than a usable recovery prompt.
  4. Pressing Play on the touchscreen displayed the same error again.
  5. LAN diagnostics found firmware in shutdown with saved power-loss information.
  6. FIRMWARE_RESTART cleared the shutdown. Subsequent status reported standby, no exceptions, and virtual_sdcard.pl_env_valid: true.
  7. Sending SDCARD_PRINT_PL_RESTORE via Moonraker restored the job and returned it to printing at layer 7 of 132.

What was the actual result?

The firmware and touchscreen logs explain the Play/error loop:

  • 13:03:33: Mainboard and all four toolheads reported Power loss info saved.
  • 13:03:34: Firmware entered shutdown with mcu: Power loss triggered.
  • 13:03:36: Touchscreen displayed: Mainboard MCU detected power-off signal. System has shut down for protection.
  • 13:04:05: Touchscreen logged printer_module_resume; Klipper logged [pause_resume] request resume.
  • 13:04:06: The request failed with code 400 / mcu: Power loss triggered.
  • 13:04:08: Touchscreen displayed the same System Anomaly again.
  • 13:05:30: Diagnostic recovery issued FIRMWARE_RESTART.
  • 13:05:40: Touchscreen recognized pl_env_valid:1 and set its power-loss restore flag.
  • 13:05:50–13:06:49: Dedicated power-loss recovery ran and the printer returned to printing.

Times above are the printer log timestamps (UTC); the outage occurred around 09:03 America/New_York.

Before the firmware restart, the API reported the following relevant subset:

{
  "print_stats": {"state": "paused", "info": {"total_layer": 132, "current_layer": 7}},
  "pause_resume": {"is_paused": false},
  "virtual_sdcard": {"is_active": false, "pl_env_valid": false},
  "machine_state_manager": {"main_state": 7, "action_code": 0}
}

Exception messages included mcu: Power loss triggered and Power loss info saved for the controllers. After the restart, pl_env_valid became true; after the restore command, print_stats.state became printing and the file position advanced. This shows the saved job was recoverable despite the touchscreen failure.

A later touchscreen event may indicate a related stale-dialog issue: at 13:12:42, after recovery had finished and printing had resumed, dialog_power_loss_restore_button_click is_ok:0 invoked printer_module_power_loss_clear. Firmware correctly rejected it with Deleting power-off data is not allowed during printing. The exact visible dialog at that moment was not captured, so the stale-dialog interpretation remains an inference.

What was the expected result?

After power returns, the touchscreen should offer a usable, explicit recovery flow for the saved interrupted print, including any required controller reset/reconnection and validation. Play should not simply repeat the same shutdown error without a recovery path. Recovery dialogs should reflect the current job state after recovery is initiated remotely.

Log files

Sanitized excerpts from the captured printer logs follow. No full logs, private network addresses, account data, or unrelated configuration are included. No pre-recovery screenshot was captured. The print was confirmed running afterward; final part quality/completion has not been verified.

klippy.log (selected lines)

10-23 13:03:33.411:mcu 'mcu': #output: Power loss info saved
10-23 13:03:34.366:Transition to shutdown state: {"coded": "0003-0522-0000-0017", "msg":"mcu: Power loss triggered", "oneshot": 0}
10-23 13:04:05.987:[pause_resume] request resume
10-23 13:04:05.987:mcu: Power loss triggered
10-23 13:05:30.853:[gcode] FIRMWARE_RESTART
10-23 13:05:50.012:Success: Changed main state to PRINTING with action PRINT_PL_RESTORE
10-23 13:05:50.103:power_loss start print, filename:/home/lava/printer_data/gcodes/Tray_PLA_6h48m.gcode
10-23 13:06:49.678:Success: Changed main state to PRINTING

gui.log (selected lines)

2026-10-23 13:03:36.968 (: 215) <Controller Exception> {show_exception_dialog} success: 1 title:System Anomaly detail:Mainboard MCU detected power-off signal. System has shut down for protection.
2026-10-23 13:04:05.985 (: 219) <Module Printer> {printer_module_resume} 
2026-10-23 13:04:06.089 (:  68) <Print Management> {parse_print_management_resume_a_print} code:400
2026-10-23 13:04:06.089 (:  72) <Print Management> {parse_print_management_resume_a_print} error:mcu: Power loss triggered
2026-10-23 13:04:08.985 (: 215) <Controller Exception> {show_exception_dialog} success: 1 title:System Anomaly detail:Mainboard MCU detected power-off signal. System has shut down for protection.
2026-10-23 13:05:40.686 (: 345) <Parse Common> {parse_common_virtual_sdcard} pl_env_valid:1
2026-10-23 13:05:40.686 (: 147) <Temp Data> {temp_data_set_power_loss_restore_flag} flag:1
2026-10-23 13:12:42.865 (:1319) <View Print> {dialog_power_loss_restore_button_click} is_ok:0
2026-10-23 13:12:42.865 (: 634) <Module Printer> {printer_module_power_loss_clear} 
2026-10-23 13:12:43.388 (: 215) <Controller Exception> {show_exception_dialog} success: 1 title:System Anomaly detail:Deleting power-off data is not allowed during printing.

Activity

  1. alandebortolo commented on Nov 16, 2026

    @alandebortolo

    I traced the firmware side of this in the public source. The lines below are the same in 2.0.0 (93cb12f, the reporter's version) and 2.1.0 (7ac453b). I do not have a U1, so this is from reading the code against the log excerpts above; nothing here was run on a printer, and the touchscreen binary is not in this repository.

    Why the printer looked "paused" and offered Play

    1. power_loss_check.py line 201 to 206: when the mainboard reports power_loss_flag, the host calls invoke_shutdown with mcu: Power loss triggered (13:03:34 in the log).
    2. virtual_sdcard.py line 165 to 167: the shutdown handler sets must_pause_work, so the print loop exits. At the end of that loop (line 772 to 773) a print that stopped with the file still open and no error message is recorded with print_stats.note_pause(). So print_stats.state becomes paused, while pause_resume.is_paused stays false because no PAUSE ever ran.

    That is exactly the state dump in the report (print_stats.state: paused, pause_resume.is_paused: false, main_state: 7 = ABNORMAL). A client that decides to show Play from print_stats.state alone sees a paused print. Whether the touchscreen does that I cannot tell from here.

    Why Play can only repeat the error

    pause_resume.py line 54 to 56: the resume request runs RESUME through gcode.run_script. After a shutdown gcode.py swaps to the not-ready handlers (line 185 to 190), and cmd_default (line 338 to 339) rejects every command with the shutdown message. That is the code:400 / mcu: Power loss triggered at 13:04:06. No request can succeed in this state except a restart.

    Why pl_env_valid was false until the restart

    pl_env_valid is set in one place only, handle_get_mcu_pl_flash_data (virtual_sdcard.py line 181 to 184), which runs on power_loss_check:mcu_update_complete, sent from the ready handler after the host queries the saved flash data (power_loss_check.py line 134 to 149). It is not refreshed when the data is saved during the session. So in the session that lived through the outage the flag stays false even though the mainboard and the four heads logged Power loss info saved, and it turns true only after FIRMWARE_RESTART (13:05:40). SDCARD_PRINT_PL_RESTORE also needs main_state IDLE (line 466 to 475), which the restart gives.

    What this suggests

    The firmware normally gets this restart for free, because a real outage also powers down the host. The report is the case where the host stayed up across the outage, and then nothing triggers the restart and the status objects describe a paused print with no recovery data. Two things the firmware team could decide, and I have not written a patch because I cannot test either on hardware:

    • a status field a client can trust for this state, for example exposing that the shutdown reason is the power-loss code 0003-0522-0000-0017 and that recovery data was saved, so the screen can offer "restart and recover" instead of Play;
    • or recording the stopped print as something other than paused when the stop comes from a shutdown (line 772), since RESUME cannot work there. This line is shared with every other shutdown mid-print, so it changes what clients see in those cases too.

    The stale dialog at 13:12:42 I did not look at: it is touchscreen state, and the firmware's refusal there is correct (SDCARD_PRINT_PL_CLEAR_ENV refuses while the main state is PRINTING, line 476 to 484; the wording in the log differs from the string in this file, so the text shown may come from the screen).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions