LightBurn Bug Report: Wrong M106/M107 G-codes for Laser Inline Control and air assist setting
Summary
LightBurn generates fan control G-codes (M106/M107) which are influenced by the air assist setting for laser control instead of proper laser commands (M3/M4) when using the Snapmaker Marlin profile with inline power mode.
Environment
- LightBurn Version: 1.7.08
- Device Profile: Snapmaker Marlin
- Operating System: Linux (also confirmed on Windows)
- Machine: Snapmaker 2.0
Problem Description
When using the Snapmaker Marlin profile with inline power control, LightBurn generates laser control commands based on the “Air Assist” setting, which is illogical:
- Air Assist ON: Generates
M106
- Air Assist OFF: Generates
M107
The main issues are:
- Confusing UI logic: The “Air Assist” setting controls laser commands, not air assist
- Inconsistent behavior: Laser control should not depend on an unrelated setting
- Better alternative exists: M4 should be used directly for variable power laser control
- Misleading configuration: Users expect Air Assist to control air flow, not laser power mode
Expected Behavior
- M4 should be used directly for variable power laser control (best solution)
- Laser power control should be independent of the Air Assist setting
- The Air Assist setting should only control actual air assist functionality
Steps to Reproduce
- Create a new project in LightBurn
- Configure Snapmaker Marlin device profile
- Set up a simple laser job with inline power control
- Generate G-code and observe the laser control commands
- Notice that M106/M107 are used instead of M3/M4
Actual Results
; Current problematic behavior: Laser control depends on Air Assist setting
; Air Assist ON:
M106 P0 S255 ; Laser control (works but tied to wrong setting)
M05 ; Laser off
G0 X153 Y88 F0
G0 Z0
; Layer C00
G1 Y153F6000 I S255 ; Inline power control
; Air Assist OFF:
M107 ; Laser control (works but tied to wrong setting)
M05 ; Laser off
G0 X153 Y88 F0
G0 Z0
; Layer C00
G1 Y153F6000 I S255 ; Inline power control
Expected Results
; Best solution: Use M4 directly for laser control
M4 S255 ; Variable power laser control (optimal)
M05 ; Laser off
G0 X153 Y88 F0
G0 Z0
; Layer C00
G1 Y153F6000 I S255 ; Inline power control
Impact
- Severity: Medium
- Frequency: Always occurs when using Snapmaker Marlin profile with inline power
- User Confusion: Air Assist setting controls laser power instead of air flow
- Illogical Dependency: Laser control tied to unrelated UI setting
- Workaround: Manual G-code editing or custom post-processing required
Additional Context
This issue creates confusion because:
- The Air Assist UI setting controls laser behavior, not air assist
- M4 would be better for variable power control as it compensates for acceleration/deceleration
- Users expect Air Assist to control actual air flow, not laser power
Suggested Fix
- Decouple laser control from Air Assist setting
- Implement M3/M4 laser control commands for inline
- Add separate “Constant Power” toggle (currently missing from Snapmaker Marlin profile)
- Use M4 by default for better variable power control
- Reserve Air Assist setting for actual air assist functionality
Related Issues
- Missing “Constant Power” toggle in Snapmaker Marlin profile
- Inconsistent behavior between different device profiles regarding fan control
@Skreelink can you relate?