Skip to content

MCU 'mcu' shutdown: Timer too close on print start #62

Description

@flaviut

In the couple weeks or so since I've installed this I've seen this error about 3 times, always immediately after sending a print over from Orcaslicer via the API:

// MCU 'mcu' shutdown: Timer too close
// This often indicates the host computer is overloaded. Check
// for other processes consuming excessive CPU time, high swap
// usage, disk errors, overheating, unstable voltage, or
// similar system problems on the host computer.
// Once the underlying issue is corrected, use the
// "FIRMWARE_RESTART" command to reset the firmware, reload the
// config, and restart the host software.
// Printer is shutdown

The resolution is simple, just restart Klipper and restart the print job, but this is annoying.

I suspect this has something to do with the CPU speed, which seems to sit at 600MHz most the time. I don't see any processes using a significant amount of CPU otherwise.

The default CPU governor is ondemand, which is configured to check the system load every 200ms. I suspect this could be the issue, Klipper all the sudden starts demanding more of the system, and the system falls behind before it realizes it needs to bump things up. I'm hoping that switching the governor to schedutil, which should hopefully respond instantly, will work:

$ cat /etc/systemd/system/cpufreq-tuning.service 
[Unit]
Description=Set CPU governor

[Service]
Type=oneshot
ExecStart=/bin/bash -c 'for d in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo schedutil > "$d"; done'

[Install]
WantedBy=multi-user.target
$ sudo systemctl enable --now cpufreq-tuning.service

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions