A list of recommended Marlin features

Marlin comes with a lot of features and sometimes people don't know which of them are useful for them when using their printer with Octoprint.

Here are some features that can make your life easier :slight_smile:

Let's start with the Configuration.h:

  • #define NOZZLE_PARK_FEATURE

    • Specifies a printhead park position.
    • required for ADVANCED_PAUSE_FEATURE (see below).
  • #define SPEAKER

    • Most of the time printers come with a build in buzzer/speaker that can not only be used for confirmation and warning sounds - you can also use them to play midi like music.
      I personally put a short song in the preheat button plugin so I know when the printer is ready to go and another when when the print is finished (via the gcode scripts in the settings menu).
      You can either make your own gcodes in online midi to gcode converters or just download a big collection like this one 3D printer tunes (11101tones) let your printer play music by Maxdarkdog - Thingiverse.

Now the Configuration_adv.h:

  • #define SOUND_MENU_ITEM
    • this one is not really something you can use with Octoprint but you can use it to mute the menu sounds after if you enabled the speaker.

:grey_exclamation: The following progress related features depend on the display which is connected to your printers mainboard - they may not work with certain displays.

  • #define LCD_SET_PROGRESS_MANUALLY
  • #define SHOW_REMAINING_TIME
    • Display estimated time to completion.
  • #define USE_M73_REMAINING_TIME
    • Use remaining time from M73 command instead of estimation.
  • #define ROTATE_PROGRESS_DISPLAY
    • Display (P)rogress, (E)lapsed, and (R)emaining time.
  • #define LCD_PROGRESS_BAR
    • Show a progress bar on HD44780 LCDs.

  • #define LONG_FILENAME_HOST_SUPPORT

    • This allows hosts to request long names for files and folders with M33.
  • #define AUTO_REPORT_SD_STATUS

    • Auto-report SdCard status with M27 S>seconds<.
  • #define ARC_SUPPORT

  • #define BLOCK_BUFFER_SIZE 64
    #define BUFSIZE 32
    #define TX_BUFFER_SIZE 32
    #define RX_BUFFER_SIZE 2048

    • Those settings increase different buffer sizes (Planner bufffer, ASCII buffer, Transmission and Receive Buffer).
      Increasing those buffers reduces the chances of blobbs and other defects caused by buffer underruns and short communication hiccups.
      The max value depends on which printer board you're using and how much ram is available for the CPU.
      :warning: If you use those increased values you should put M400 on top of your end gcode in your slicer to prevent it from starting before the print finished - otherwise it could for example turn your heaters of while a lot of moves are still in the buffer.
  • #define EMERGENCY_PARSER

    • Realtime Reporting
      Report position and state of the machine (like Grbl).
      Auto-report position during long moves.
    • Allows you to interrupt some long running commands, most notably if you decide you want to cancel while the printer is waiting for the bed/hotend to heatup, you won't have to wait for the temperature to reach target before it actually cancels.
  • #define ADVANCED_OK

    • Adds buffer usage information to the ok (for example ok P15 B3).
    • required for the buffer buddy plugin.
  • #define ADVANCED_PAUSE_FEATURE

    • Advanced Pause for Filament Change

      • Adds the G-code M600 Filament Change to initiate a filament change.
      • This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
    • Requirements:

      • For Filament Change parking enable and configure NOZZLE_PARK_FEATURE.
      • For user interaction enable an LCD display, HOST_PROMPT_SUPPORT, or EMERGENCY_PARSER.
    • Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.

    • If you have HOST_PROMPT_SUPPORT enabled (see below), these prompts get passed back to OctoPrint as well.

  • #define AUTO_REPORT_TEMPERATURES

    • Auto-report temperatures with M155 S >seconds<.
  • #define AUTO_REPORT_POSITION
    #define M114_DETAIL
    #define M114_REALTIME

    • Some host software and serial controllers use M114 to get the current position, but polling with M114 is less than optimal, and in older versions of Marlin it would cause print stuttering. With M154 hosts can simply set an interval and Marlin will keep sending reports automatically. This method is preferred over polling with M114 .
      • :grey_exclamation: I'm not sure if those features are used at the moment, but they could become useful in the future.
  • #define EXTENDED_CAPABILITIES_REPORT

    • When enabled Marlin also reports its capabilities with the M115 gcode.
  • #define REPORT_FAN_CHANGE

    • Report the new fan speed when changed by M106 (and others).
      • :grey_exclamation: I'm not sure if this feature is used at the moment, but it could become useful in the future.
  • #define MEATPACK_ON_SERIAL_PORT_1 | #define MEATPACK_ON_SERIAL_PORT_2

  • #define GCODE_CASE_INSENSITIVE

    • Accept G-code sent to the firmware in lowercase.
  • #define HOST_ACTION_COMMANDS

      • #define HOST_PROMPT_SUPPORT
        • passes back some prompts to Octoprint
      • #define HOST_START_MENU_ITEM
        • This adds a 'HOST START' menu item to the LCD. This is most useful in a case where you end up canceling a print because the first layer wasn't coming out right and then want to start it again from the LCD, or similar.

edit: forgot to thank @TTalkington - I copied some descriptions from this post

9 Likes

Hi PrintedWeezl, Thanks for this guide.
I've gone and enabled some of these, hopefully it helps make prints a bit more stable and the firmware more futureproof.

Regarding the buffer sizes, is there any problem with halfing some of the values in the doc?
For example BUFSIZE 32 --> 16 and RX_BUFFER_SIZE 2048 --> 1024.

I run out of RAM according to PlatformIO if I have these at the size you reccomend. Halfing these puts me down to 90% instead of over 100%.

Thank you!

Yep that's fine.
I would do the same in your case :slight_smile:

1 Like

Maybe split them into adv. og normal cfg files?

They are, but it may be easy to miss:

1 Like

Yes sorry - maybe a more bold font or a hr to seperate the two files.

Anyway great work

1 Like

made those lines bigger - hope it's better that way :slight_smile:

Awesome.

I was considering making a marlin web config tool. Might add an OctoPrint optimizing flag

2 Likes

@PrintedWeezl is there any recommend serial max/min speed?

1 Like

Good question.
The faster you print, the more data you're pushing through the cable, but I never measured how much I really need.
Personally I like 500000 - if the board can handle it. Works fine on my Skr 1.4 turbo but a Creality 4.2.2 wasn't able to handle it.
Fortunately you can almost double your baudrate with meatpacker.

So right now I'm using 250000 with meatpacker on the Creality board and 500000 without meatpacker on the the Skr.

That doesn't mean you couldn't also use meatpacker with 500000 baud - I just didn't enable it when I built that firmware.

Iirc meatpacker showed me top transfer rates close to 2.000 KB/sec, but I don't know how that translates to baudes.

Yes im running with a skr e3 v2 with meatpacker and 250000 aswell

I'm new to OctoPrint. I installed Octo4a on an old android, as I can not afford a raspberry pi at this time. The Octo4a app on it sees my printer. And Octoprint see's the octo4a server and camera feed. But when connecting to the printer on the octprint web UI, it times out. I've increased the time out time in case it was just slow... Is there any further recommended Marlin features or different server ports I should be choosing for Marlin to accept the handshake from octoprint? I have an SKR2 Rev B.

Hello @jthomson1988 !

I think your issue really does not fit into this thread.
Your connection problem does not rely on a Marlin feature.
You may open a new thread or have a look on this:

2 Likes

M20_TIMESTAMP_SUPPORT if using Marlin >= 2.1.2 and using sd card.

Also enable in OctoPrint (>= 1.9) Serial Connection -> Firmware & protocol -> Wait to load the SD card file list until the firmware capability report is processed. Needs EXTENDED_CAPABILITIES_REPORT in Marlin.

1 Like

Faster sd print cancel using M524 g-code (which with Marlin >= 2.1.2 is recognized by emergency parser early): OctoPrint Settings -> Serial Connection -> Firmware & protocol:

  • add M524 to "Emergency commands"
  • set M524 as "SD Cancel Command"

These values are no longer in the bugfix-2.1.x branch config files. At least, they are not there for me to just uncomment. Should I add the lines manually? Or are they no longer necessary?

I do see a M73_REPORT setting that is disabled by default. I don't see that at all in the older 2.0.x files. So seems like a new feature.

These were recently changed:
LCD_SET_PROGRESS_MANUALLY -> SET_PROGRESS_MANUALLY and SET_PROGRESS_PERCENT
USE_M73_REMAINING_TIME -> SET_REMAINING_TIME
RORATE_PROGRESS_DISPLAY is no longer needed, it's assumed if you are using remaining time and progress that you want it to be rotated with elapsed.

For future reference, even when things get renamed (which is rare), they generally stay in the same section of the file. If you can't find something look where it used to be. In this case, Marlin/Configuration_adv.h at efde96131d9e9288dc2ea28b548f691a184fb33e · MarlinFirmware/Marlin · GitHub

2 Likes