MCU 'mcu' shutdown: Move queue overflow

I’ve had my SV08 for about a month now and this issue keeps cropping up, and its cost me several KG’s of filament at this point. Initially I thought I was just a problem with fuzzy skin in OrcaSlicer, or exclude object, and no matter which configuration I used it always failed mid-print, so I’ve abandoned these options completely. More recently I am now getting this same issue with concentric top layer fill pattern - but the issue is inconsistent, the same gcode may or may not finish successfully

I’m printing with a 0.6mm Nozzle at 0.2mm layer heights, 3500mm/s^2 accelerations, 100mm/s print speeds; all in an effort to reduce the number of times I get the MCU shutdown, which has helped in general, but still not with the issues mentioned above.

I’ve seen a few other posts about this issue, but without any solid fixes other than avoiding exclude object/fuzzy skin. I’m just wondering if anybody else has experienced this issue here, and any advice?

@sovol3d You should open a support ticket by emailing to info@sovol3d.com. Include your order #.

Can you zip and upload your klippy.log file?

This error is indicating a result of insufficient memory in the host computer. Are you running any “extra” code on your machine?

See MCU shutdown due to move queue overflow - General Discussion - Klipper for a couple hints but that thread isn’t marked “solved”

1 Like

Thanks for your reply!

I’ll include the klippy.log from a print I’ve just tried now which failed again, although this was using 0.1mm layer height. I can’t yet upload onto the forum, but the Google Drive link https://drive.google.com/file/d/141aGPpKH3aTSBJOc9H8fKjBktQWotx-1/view?usp=sharing

I’m not quite sure what would count as extra code, but I have made a couple of changes to the printer.cfg and macro.cfg, mainly for some neopixels attached to the toolhead.

Could you indicate the changes made to your files to help the support team?

1 Like

Yes sure!

For the Neopixels:

pin: extra_mcu:PA10 # replace with the actual pin for your UART TX
chain_count: 3 # number of LEDs in your strip
color_order: GRBW # most Neopixels are GRB, check yours
initial_RED: 0.3
initial_GREEN: 0.3
initial_BLUE: 0.3
initial_WHITE: 1.0

To increase the timeout for heaters:

[idle_timeout]
gcode: _IDLE_TIMEOUT
timeout: 6000

Changed the Start Print Macro:

[gcode_macro START_PRINT]
description:
variable_state: ‘Prepare’
variable_record_extruder_temp:0
variable_max_record_extruder_temp:0
gcode:
{% set mesh_name = “default” %}
{% set mesh_calibrate_temp = printer[‘gcode_macro _global_var’].bed_mesh_calibrate_target_temp|int %}

{% set extruder_target_temp = printer.extruder.target|int %}

{% set bed_targer_temp = printer.heater_bed.target|int %}

M400

CLEAR_PAUSE

G90
{% if state == 'Prepare' %}

    {action_respond_info("Prepare!")}

    {% if printer.toolhead.homed_axes|lower != "xyz" %}
        G28
    {% endif %}

    {% if printer['filament_switch_sensor filament_sensor'].enable == True and
          printer['filament_switch_sensor filament_sensor'].filament_detected != True
    %}
        M117 No filament!!!
        {action_respond_info("Please Insert filament in Sensor!")}
        CANCEL_PRINT
    {% endif %}

    {action_respond_info("Check Heating!")}

    M140 S{bed_targer_temp}
    M104 S{extruder_target_temp}

    {% if printer.heater_bed.temperature < bed_targer_temp %}
        M117 Bed heating...
        {action_respond_info("Bed heating...")}
        M190 S{bed_targer_temp}
    {% endif %}

    {% if printer.extruder.temperature < extruder_target_temp %}
        M117 Nozzle heating...
        {action_respond_info("Nozzle heating...")}
        M109 S{extruder_target_temp} 
    {% endif %}

    {% if printer.quad_gantry_level.applied|lower != 'true' %}
        QUAD_GANTRY_LEVEL
    {% endif %}

    _CALIBRATION_ZOFFSET

    BED_MESH_CALIBRATE ADAPTIVE=0 
    
    SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=state VALUE='"Start"' 
    UPDATE_DELAYED_GCODE ID=_print_start_wait DURATION=0.5

{% elif state == 'Start' %}
    M117 Printing now!!!
    save_last_file
    {action_respond_info("Start!")}
{% endif %}

Lighting effects are a COMMON source of issues with Klipper on low power hosts.

The H616 on the Sovol board is on the lower end of low.

Comment out the additions and try a print.

1 Like

I’ll give it a go see if it fixes the issues, and update here with any progress - for some reason it seems the problem is manifesting and now I can’t complete a single print without shutdown, no matter my slicer settings.

I’ve tried everything I can find online, but any small circular structures are causing the same issue

These generate a HUGE number of very small moves that have to be Queued and transmitted very quickly. Is your slicer sending “arcs” (G2-G3 - Arc or Circle Move) which Klipper has to split and calculate?

Did you reach out to Sovol support?

1 Like

Thanks Cardoc, yeah I reached out to Sovol but no response yet.

I have arcs turned off in orcaslicer.

I’m just not quite sure what to try next, do you think going to mainline klipper is something that’s could resolve this?

The queue overflow is a problem with the HOST computer. Set your runtime speed modifier to 50%. Does the error continue to happen?

There are Linux tools to monitor Processor and memory loads. I’ve never had to use them but they might identify the process that is using too many resources.

If I had the issues you are experiencing I would reflash the OS on the mainboard.

If I reduce the speed it’ll definitely get further into the print, and may complete some models not possible otherwise. If I’m desperate for something, I’ll print at 40 - 50mm/s, but not guaranteed to complete.

For anything with fuzzy skin, it’s a crash on the first layer no matter what speed.

It seems to me that you have either a corrupted OS or a hardware problem with the “linux half” of your mainboard.

Reflash your OS and then reinstall your additions one at a time, testing each one.

I just found the reference to queue overflow on the Wiki.

Amazing! I’ve already got a spare emmc and stlink, so I’ll give this ago and let you know if its fixed!

Successfully moved over to mainline klipper without a hitch, and now printer is working perfectly. Thanks for your help!

1 Like

For anybody else who gets stuck with this error I found the root cause and figured out how to fix it. The problem is Sovol’s PLR (power loss recovery) customization to Klipper. This is why moving to mainline Klipper fixes it, because that removes Sovol’s PLR customization. It’s pretty easy to fix on the Sovol firmware now that we know what’s causing it.

The problem is in ~/klipper/klippy/extras/gcode_move.py Lines 123-133. These lines write information to a file on the sd card synchronously on every single move command. That’s too slow, especially for python on a relatively constrained host. It causes moves to be processed too slowly when there’s a lot of short moves, the host fails to communicate with the mcu fast enough resulting in the move queue overflow error.

To fix it, ssh into the printer and simply comment out these lines in ~/klipper/klippy/extras/gcode_move.py

        if 'G' in params and 'Z' in params and 'X' in params and 'Y' in params and 'F' in params:
            if self.v_sd.cmd_from_sd:
                #commandline = gcmd.get_commandline()
                content = {
                    'commandline': gcmd.get_commandline(),
                    'Z': params['Z'],
                    'extrude_type': 'M82' if self.absolute_extrude else 'M83',
                    'e_extrude_abs': 0 #self.Coord(*self.move_position)[3]
                }
                with open("/home/sovol/sovol_plr_height", 'w') as height:
                    json.dump(content, height)

PLR will obviously no longer work, but it never worked well to begin with and failed every single time when the move queue overflow happened since it was the writing of plr info causing the failure. Hopefully Sovol fixes this in an official firmware update. It was hard to track down but in hindsight it’s a pretty obvious huge flaw in the PLR design – there’s no way that writing to a file synchronously with every move command is going to work reliably.

Now I can print as fast as I want with spiral z-hop and organic supports, no more problems!

1 Like

Wouldn’t simply changing [plr] to #[plr] in printer.cfg accomplish the same thing?

No. Commenting out the plr include in printer.cfg will not stop the python code from writing to the sd card on every move command. In fact that was one of the first things I tried – it only removes some macros but doesn’t affect the actual cause of the problem. The only way to fix it is to comment out those ~10 lines in gcode_move.py.

The code in my gcode_move.py is a little different. I commented out the lines of code that were similar. It worked! I had a print that failed at least half a dozen times with this error. I just had a successful print with the code change.

THANK YOU!!!

1 Like

Glad it helped! It’s quite a bad bug in the firmware. I emailed Sovol about it and they said they’d “pass it on to their engineering team” so who knows if we’ll ever get a firmware with PLR that doesn’t cause prints to fail.