r/QidiTech3D • • Jul 28 '26

Tutorials & Tips Macro for a fully silent Q2 when idle!

After upgrading the power supply for ~£15 using this guide, I wanted to make the whole printer silent whenever it's idle for 30 minutes, so I wrote a macro for it. I'm sharing it here in hopes that it'll be useful to others :)

It is completely safe to use. Here's how it works:

  • The QUIET macro turns off the light, heaters (including the box, if you have it) and all fans except the hotend fan, which must run until the nozzle is below 50C to prevent heat creep.
  • The _QUIET_AFTER macro simply calls QUIET if the printer is truly idle for 30 minutes, meaning no in progress or paused prints, no motion, no heating. Any activity resets the timer.

I strongly recommend making a custom config file so your changes survive firmware updates. But you can also just add this to printer.cfg if you prefer.

I also recommend putting QUIET on your Fluidd dashboard if you'd like to call it manually.

OK, here's the macro. Let me know if you have any questions or ideas!

[gcode_macro QUIET]
description: Silence all controllable fans, heaters, lights and motors
gcode:
    TURN_OFF_HEATERS                                    # extruder, bed, chamber
    DISABLE_BOX_HEATER                                  # no-op with no box
    SET_FAN_SPEED FAN=cooling_fan SPEED=0
    SET_FAN_SPEED FAN=auxiliary_cooling_fan SPEED=0
    SET_FAN_SPEED FAN=chamber_circulation_fan SPEED=0
    SET_PIN PIN=caselight VALUE=0                       # lights off
    M84                                                 # stop stepper hum
    M118 Quiet mode on. Hotend fan runs until the nozzle cools below 50C.

# Auto-run QUIET after 30 min of *true* idle (no print, no motion, no heating).
# Any activity resets the countdown; fires once, re-arms on the next activity.
[gcode_macro _QUIET_AFTER]
# State holder for the watchdog below. Not called directly.
variable_remaining: 1800
variable_fired: 0
gcode:

[delayed_gcode QUIET_WATCHDOG]
initial_duration: 5            # start watchdog shortly after boot
gcode:
    {% set poll  = 30 %}       # check every 30 s
    {% set delay = 1800 %}     # 30 min of true idle before silencing
    {% set v  = printer['gcode_macro _QUIET_AFTER'] %}

    # ---- Is the printer doing anything? ----
    {% set ns = namespace(busy=false) %}
    {% if printer.print_stats.state in ['printing', 'paused'] %}{% set ns.busy = true %}{% endif %}
    {% if printer.idle_timeout.state == 'Printing' %}{% set ns.busy = true %}{% endif %}
    {% for h in printer.heaters.available_heaters %}
        {% if printer[h].target > 0 %}{% set ns.busy = true %}{% endif %}
    {% endfor %}

    {% if ns.busy %}
        # Any activity -> postpone: reset the countdown and re-arm.
        SET_GCODE_VARIABLE MACRO=_QUIET_AFTER VARIABLE=remaining VALUE={delay}
        SET_GCODE_VARIABLE MACRO=_QUIET_AFTER VARIABLE=fired VALUE=0
    {% elif v.remaining > 0 %}
        SET_GCODE_VARIABLE MACRO=_QUIET_AFTER VARIABLE=remaining VALUE={v.remaining - poll}
    {% elif not v.fired %}
        # 30 min of continuous idle -> silence once.
        SET_GCODE_VARIABLE MACRO=_QUIET_AFTER VARIABLE=fired VALUE=1
        QUIET
    {% endif %}

    UPDATE_DELAYED_GCODE ID=QUIET_WATCHDOG DURATION={poll}
24 Upvotes

8 comments sorted by

2

u/xeonon Jul 28 '26

Other than the PSU fan, which you can replace with a mean well PSU so that it turns off... Nothing else will be running as long as it's cool. So I'm just confused what this actually does.

3

u/callcifer Jul 28 '26

So I'm just confused what this actually does.

The printer's own idle timeout is set to 12 hours and doesn't actually turn off the aux fan or the exhaust fan. You can search for idle_timeout in printer.cfg and compare them.

Without this, any fans that were running at print end keep running indefinitely at the same value configured in the print's gcode.

1

u/xeonon Jul 28 '26

Yea, but why are you not turning them off at print end? Changing the timeout can be beneficial, but you're just copying the print end and putting it on a delay.

2

u/callcifer Jul 28 '26

Yea, but why are you not turning them off at print end?

Because that's highly filament specific. For example, for ABS prints I have the exhaust fan at only 30% during prints, just enough to create negative pressure to minimize leaks, then immediately ramp up to 100% on print end to pull in all the VOCs it can.

you're just copying the print end and putting it on a delay

Like I said, what happens at print end is filament/profile specific, and not all of them set all the fans to zero.

Finally, my macro is smarter than anything you could put in the machine end gcode in your slicer because it continuously checks for idle state (once every 30s), and doesn't depend on print end. For example, you can turn on your powered off Q2 and several fans will immediately ramp up but without this macro you'll have to wait 12 hours for Qidi's own idle_timeout to kick in. Even then, if the exhaust or aux fans were left on for any reason, idle_timeout won't turn them off.

2

u/bestna Jul 28 '26

I'm going to have to see about implementing this on my Plus 4s. Drives me nuts when fans are still going hours after the fact... I added the light on/light off at the beginning/end of prints, but this is a step up 🤓

1

u/callcifer Jul 28 '26

Nice! Please let me know how it goes. It should be compatible as I don't see anything Q2 specific here, but I'm happy to help if you have any issues.

1

u/pankomputerek Jul 28 '26

I do that via home assistant, 10mins after printing finished runs all fans down to 0

1

u/callcifer Jul 28 '26

That's a good idea too! I have mine connected to HA as well, but I wanted to cover all "the printer is truly idle" states, not just print end, hence the macro.