Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: Check for air filtration support on the printer level before emitting air filtration gcode command #8681

Conversation

igiannakas
Copy link
Contributor

@igiannakas igiannakas commented Mar 3, 2025

Prevents spurious M106 P3 commands being sent if air filtration is enabled at the filament level but disabled at the printer level.

In klipper these enable the part cooling fan by default which is a no-no for ABS prints if the user has inadvertently used a filament profile from the shared library against a printer that doesnt support air filtration.

image
image
image

Tests

Enabled option in print profile - M106 P3 command issued
Disabled option in print profile - M106 P3 command not issued

In both cases air filtration was enabled in the filament profile.

@igiannakas igiannakas changed the title Check for air filtration support on the printer level before emitting air filtration gcode command Bug fix: Check for air filtration support on the printer level before emitting air filtration gcode command Mar 3, 2025
Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.
Thank you!

@SoftFever SoftFever merged commit 22e410f into SoftFever:main Mar 6, 2025
15 of 16 checks passed
@igiannakas igiannakas deleted the Check-air-filtration-support-at-the-printer-level-too branch March 6, 2025 12:57
@SoftFever
Copy link
Owner

@igiannakas
I’m conducting a post-merging review of the changes.
In Orca, we use M106 P2 for part cooling fan control, while M106 P3 is reserved for the air filtering/exhaust fan.
This isn’t a bug; it’s by design. Please refer to the following WIKI pages:
https://github.com/SoftFever/OrcaSlicer/wiki/air-filtration and https://github.com/SoftFever/OrcaSlicer/wiki/Auxiliary-fan .

The machine settings "support_air_filtration" and "support_chamber_temp_control" are currently in development mode only and may be deprecated or removed in the future. They are there just for the sake of compatibility for now.
I noticed that having two similar related options in different places can confuse users, especially since their purposes overlap. To address this, I let users to control these settings solely in the filament settings.Screenshot 2025-03-07 at 7 35 25 PM

With this behavioral change, we will cause unexpected changes for those who use these features in the their settings. I could make "support_air_filtration" in advanced mode, but that won't change the fact that we break user's existing profile after upgrading. Imagine users who turn on exhaust fan for PLA printing with his enclosed printer, their print will fail after this change and they won't have a clue. So, I'm going to revert this PR. If you still have any concerns and questions, please let me know!

@igiannakas
Copy link
Contributor Author

hm...The issue comes from having the air filtration in both the filament and the printer settings.

For example, if using a shared library filament, the option to enable air filtration is attached to the filament, hence is issued as a command to the printer.

However the printer doesnt say support air filtration. This means that it gets a M106 P3 command issued which in klipper gets interpreted as an M106 part cooling command -> hence turns on the part cooling by default.

Hence why in this PR I made the printer profile take priority - if the user has disabled air filtration in the printer profile -> the filament setting is ignored.

I think having both options kind off makes sense, as you can share filament profiles between printers and for any printer that supports air filtration, the exhaust fan is enabled. For any that doesnt, the exhaust fan is ignored. Or am I miss judging this? ie the air filtration option at the printer level is not populated by default in the printer profiles hence it would break user's experience during the transition until they enable the fan filtration option in the printer profile themselves?

Thoughts?

@igiannakas
Copy link
Contributor Author

Oh I see...

So they are def->mode=comDevelop; options only, so they won't be visible. Also we can't guarantee that they have been set in the profiles correctly.

In which case, probably this PR needs to be rolled back but in this release, we should really enable this option as advanced and tool tip it to say - populate this ahead of the next release or something similar where this will be active. The need for this I think is still there as when sharing filaments across printers there needs to be a mechanism to override these settings on a per printer basis (I think at least)?

@SoftFever
Copy link
Owner

SoftFever commented Mar 7, 2025

Oh I see...

So they are def->mode=comDevelop; options only, so they won't be visible. Also we can't guarantee that they have been set in the profiles correctly.

That's right. Almost no printers are correctly set up, and they can't be set properly either. Because for DIY printers, this setup isn't required. While having the printer option makes sense on paper, I think it’s worth the hassle.

In which case, probably this PR needs to be rolled back but in this release, we should really enable this option as advanced and tool tip it to say - populate this ahead of the next release or something similar where this will be active. The need for this I think is still there as when sharing filaments across printers there needs to be a mechanism to override these settings on a per printer basis (I think at least)?

Like I mentioned before, changing this would disrupt all custom profiles that rely on the exhaust fan setting in their filament profiles. If this behavior is altered without prior notice (let’s be real, only a few users read all the change notes), many won’t realize they need to enable the printer option until they run into multiple failed prints and start troubleshooting—assuming they even know what to look for.

@SoftFever
Copy link
Owner

hm...The issue comes from having the air filtration in both the filament and the printer settings.

For example, if using a shared library filament, the option to enable air filtration is attached to the filament, hence is issued as a command to the printer.

However the printer doesnt say support air filtration. This means that it gets a M106 P3 command issued which in klipper gets interpreted as an M106 part cooling command -> hence turns on the part cooling by default.

Hence why in this PR I made the printer profile take priority - if the user has disabled air filtration in the printer profile -> the filament setting is ignored.

I think having both options kind off makes sense, as you can share filament profiles between printers and for any printer that supports air filtration, the exhaust fan is enabled. For any that doesnt, the exhaust fan is ignored. Or am I miss judging this? ie the air filtration option at the printer level is not populated by default in the printer profiles hence it would break user's experience during the transition until they enable the fan filtration option in the printer profile themselves?

Thoughts?

My thought process is this: the default filament profiles in the Orca Filament Library shouldn’t enable such an optional fan. The specialized filament profiles for each printer are responsible for such options.
Also, I’m not saying it’s ideal, but if the printer doesn’t support the M106 P3 command and doesn’t have the fan, this command won’t cause any actual issues other than warnings in the log file or console. 😉

@igiannakas
Copy link
Contributor Author

Let’s revert it :)

fyi klipper with automatically enable the part cooling fan if they don’t have a definition of the P part of the command.
That is what spurred me on to do this. Also for some reason that option in my printer ABS profiles was enabled. Not sure where that came from to be honest but wasn’t an issue up until 2.3 and quite recently at that (like 2-3 weeks now).

So may be worth having a look at the updated profiles just in case anything has changed? I couldn’t spot anything myself but it’s puzzling how that happened. Maybe also klipper stated defaulting this to enable the part cooling fan? Not sure :(

@SoftFever
Copy link
Owner

Let’s revert it :)

fyi klipper with automatically enable the part cooling fan if they don’t have a definition of the P part of the command. That is what spurred me on to do this. Also for some reason that option in my printer ABS profiles was enabled. Not sure where that came from to be honest but wasn’t an issue up until 2.3 and quite recently at that (like 2-3 weeks now).

So may be worth having a look at the updated profiles just in case anything has changed? I couldn’t spot anything myself but it’s puzzling how that happened. Maybe also klipper stated defaulting this to enable the part cooling fan? Not sure :(

Ah, good point!
I think air filtration is enabled in the Orca Filament Library, which isn’t correct.
Voron is now using the system library.
I’ll raise a PR to fix that.

@igiannakas
Copy link
Contributor Author

Sweet, thank you 🙏🏻👌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants