3D printer G-code · Marlin and Klipper

M106: Fan on (part cooling) (Marlin & Klipper)

Fan on (part cooling) — Sets the speed of the part cooling fan from 0 to 255 (255 = 100 %). Slicers turn the fan off for the first layers and on after that.

By cnccode · Updated
On this page
  1. What does M106 do?
  2. Parameters
  3. Example
  4. Tips from practice
  5. Related commands
  6. More fans commands
  7. Frequently asked questions
PropertyValue
CommandM106
FunctionFan on (part cooling)
FirmwareMarlin and Klipper
GroupFans
SyntaxM106 S<0–255> [P<fan>]

What does M106 do?

Sets the speed of the part cooling fan from 0 to 255 (255 = 100 %). Slicers turn the fan off for the first layers and on after that.

Parameters

ParameterMeaning
SSpeed 0–255
PFan number (Marlin)

Example

G-code
M106 S0   ; first layer
M106 S255 ; from layer 3 (PLA)

Tips from practice

  • ABS and ASA need little or no part cooling; PLA needs a lot for bridges and overhangs.

The command works in Marlin and Klipper. Options can differ: Klipper accepts fewer parameters for some M-codes and ignores codes it does not know with an "Unknown command" error.

More fans commands

CommandFunctionFirmware
M107Fan offMarlin and Klipper

Test it before you print

Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.

Open the simulator

Frequently asked questions

What does M106 do on a 3D printer?
M106 is fan on (part cooling). Sets the speed of the part cooling fan from 0 to 255 (255 = 100 %). Slicers turn the fan off for the first layers and on after that.
Does M106 work in Klipper and Marlin?
Yes, both firmwares understand M106.
Was this page helpful?