Kobra X: bed heats to highest project temp during G9111 auto-leveling instead of active filament's temp #4
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Related to KX-Bridge-Release#96 (reported by @Blaim). Root-caused after tracing through the bridge and this repo's Kobra X machine profile — this is not a KX-Bridge bug, it's here.
Root Cause
resources/profiles/Anycubic/machine/Anycubic Kobra X 0.4 nozzle.json→machine_start_gcode:G9111is Anycubic's fused heat+auto-level macro.[first_layer_bed_temperature]is resolved inGCode::_print_first_layer_bed_temperature()(src/libslic3r/GCode.cpp:4025-4034):bed_temperature_formuladefaults toby_highest_temp(PrintConfig.cpp:2591-2598) and is never overridden by any Anycubic profile (confirmed viagrep -rl bed_temperature_formula resources/profiles/Anycubic/→ no hits). So[first_layer_bed_temperature]inmachine_start_gcoderesolves to the highest bed temp across all filaments in the project, not the temp of the filament actually being printed.The later in-body
M140 S<temp>gcode instead uses the correct per-filament/per-extruder value, so it corrects the bed down after leveling — matching the reported behavior (35°C during leveling → 30°C afterward).Confirmed with a real capture (
ziptie_plate(01)_PETG_0.2_8m5s.gcode):G9111 bedTemp=70 ...(highest-temp value across filaments used)M140 S65 ; set bed temperature(correct per-filament first-layer value)Other Anycubic machine profiles that use classic
M140/M190instead ofG9111(e.g. Kobra 2) are unaffected, since OrcaSlicer detectsM140/M190in custom start gcode and skips its own temperature injection (custom_gcode_sets_temperature()check in the same function) — this only bites profiles using theG9111fused macro without an explicit M140/M190 anywhere before it.Upstream precedent: BBL's own machines and SeeMeCNC profiles explicitly set
"bed_temperature_formula": "by_first_filament"in their machine JSON (seeresources/profiles/BBL/machine/fdm_machine_common.json). Anycubic profiles never set this key and silently inherit theby_highest_tempglobal default.Suggested Fix
Add to
Anycubic Kobra X 0.4 nozzle.json(and any other Anycubic profile usingG9111inmachine_start_gcode):This makes
[first_layer_bed_temperature]resolve to the actual printed filament's bed temp, matching what the laterM140command already uses — eliminating the leveling/print temperature mismatch.Verification steps
G9111 bedTemp=value against the laterM140 Svalue in the generated gcode — currently they diverge; after the fix they should match.cc @Blaim for reference — this is being fixed here rather than in KX-Bridge since the bug is in the machine profile / gcode generation, not the bridge itself.
Fixed in v2.4.2-kx1 — added
"bed_temperature_formula": "by_first_filament"to the Kobra X machine profile. The G9111 macro now heats to the correct per-filament bed temperature throughout auto-leveling.Release: https://gitea.it-drui.de/viewit/OrcaSlicer-KX/releases/tag/v2.4.2-kx1