this post was submitted on 02 Aug 2023
21 points (95.7% liked)

3DPrinting

15638 readers
585 users here now

3DPrinting is a place where makers of all skill levels and walks of life can learn about and discuss 3D printing and development of 3D printed parts and devices.

The r/functionalprint community is now located at: !functionalprint@kbin.social or !functionalprint@fedia.io

There are CAD communities available at: !cad@lemmy.world or !freecad@lemmy.ml

Rules

If you need an easy way to host pictures, https://catbox.moe/ may be an option. Be ethical about what you post and donate if you are able or use this a lot. It is just an individual hosting content, not a company. The image embedding syntax for Lemmy is ![](URL)

Moderation policy: Light, mostly invisible

founded 1 year ago
MODERATORS
21
Klipper vs Marlin (lemmy.world)
submitted 1 year ago* (last edited 1 year ago) by nosnahc@lemmy.world to c/3dprinting@lemmy.world
 

I actually have Marlin + Octoprint but found out recently that Klipper exist. I read everywhere that Klipper is better but I don't really get why. I understand that Klipper use raspberry as powerfull calculator instead of the STM32 of the printer, but octoprint is used to send Gcode to Marlin too... So what's the really difference please?

Edit : I don't understand how Klipper or Marlin can give better results when gcode and instructions are generated by Cura

top 35 comments
sorted by: hot top controversial new old
[–] thantik@lemmy.world 16 points 1 year ago* (last edited 1 year ago) (1 children)

Don't listen to anyone that tells you a machine is fast because it has Klipper. Marlin has just as much capability to go fast as Klipper does. They both simply use different methods of doing so.

Klipper does all of the motion calculation on the CPU, whereas Marlin typically does it on the microcontroller, but also has options for doing it on the CPU as well.

Many people who don't have the technical knowledge or experience will tell you that you need Klipper to go fast, but you don't. They're just two different firmware ecosystems that operate slightly different than one another. Klipper keeps all the configuration at a high level, Marlin keeps a lot of its configuration at a low level, built into the firmware.

Largely this means Klipper is easy to tinker with, change, and simply reboot without having to flash new firmware, whereas Marlin you've gotta recompile in order to get the new firmware flashed and changes made.

There's too much misinformation in the 3D printing communities and I'm hoping that people won't spread the same bullshit over here as they do on reddit; where you see someone that looks like their 3D printer was hit with a boulder, and all the comments are "you need to dry your filament".

IF you want Marlin to operate like Klipper, you can use the option DIRECT_STEPPING and https://github.com/colinrgodsey/step-daemon in order to do so. Additionally, since Klippers ecosystem typically is using something like KlipperScreen as a UI (Marlin has ITS options for nice UIs as well) - lots of people simply prefer that UI.

Additionally, the reason for the misconception is mostly that Cura simply generates movement commands, and it's the firmware that dictates how the motors accelerate/decelerate, any kind of ringing compensation, etc. So Cura can say "Go to X200 at 12000mm/s", it's the firmware that decides the parameters how to do that. There's a lot of different strategies for achieving this, S curve acceleration, trapezoidal, etc. Each firmware, and it's distinct implementation can be more robust against steppers skipping depending on which implementation is chosen, or how well it has been implemented -- or even just simply configured.

Since there's a lot of people using Klipper on their fast machines, it's also a lot easier for people to copy these results. Inevitably you get people kind of following the group, because they saw a video...and told their friends who saw the video, then made their own videos, and there's a mass of people who then have become disconnected from the information and think that's the only way to do it.

[–] MrSlicer@lemmy.world 1 points 1 year ago

I have been testing the marlin input shaper. One thing I wish it had was the ability to monitor the vibration instead of the arbitrary calibrated eyeball choosing what part of the test print looks the best.

[–] _cerpin_taxt_@lemmy.world 6 points 1 year ago (1 children)

Klipper is great... Once you get it working. Way better than Marlin, but good luck getting it to work.

I swapped my motherboard for a BTT Manta + CB1 + EZ2209 drivers. Took about 7 months to get it to a state where my prints are regularly okay. Every 3D printing community I've come across is less than helpful, and all Klipper documentation is written like you're already at a pro level, as does pretty much every other guide out there. People will swear it's so easy, but you know what helped after 7 months of tinkering? Myself just throwing everything I have at my config in hopes of something working.

What kind of printer do you have?

[–] IMALlama@lemmy.world 2 points 1 year ago (1 children)

Klipper in a frequently used application like Voron? You'll have help for days. Klipper in an novel or bespoke application? Good luck.

[–] _cerpin_taxt_@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

I have an Ender 6, which is a super common printer. Not on the same level as the 3.

Voron isn't an application, though. It's a type of printer.

Novel or bespoke printer? Not sure what you're talking about, but it's supposed to be universal firmware. There are plenty of guides out there and folks running Klipper on all sorts of printers, including mine. They just aren't well-written, or aren't written for beginners, or assume you're a pro that doesn't need anything explained.

This is exactly what I'm talking about with the 3D printer community. I'll say one thing, and then someone will say something completely unrelated in response, like you just did.

I ask, "Hey, can anyone with (insert my specs here) show me their Klipper config or Slicer profiles for reference?" and I get 100 responses asking me why I'm using the hardware I'm using, recommending me other hardware that they like, telling me to use a different slicer that they like better, telling me if I don't tell them my issue or show them pics of my prints they can't help me (I never asked for help with prints, just to look at someone's config with similar hardware), downvoting me for not already being a 3D printing pro, and just generally being unpleasant and literally answering anything but my question.

I work in tech. I'm used to Googling answers, hitting up forums, digging through old posts, etc. It's about 50% of how I get my job done. There is something fundamentally wrong with the majority of the 3D printing community.

Not bashing this community specifically, as it's too new to judge and so far people seem helpful and nice, but this is a problem I run into everywhere I turn to for assistance, like GitHub, Reddit, Printables, and various other manufacturer forums. The 3D printing community is pretty dogshit.

Let's make this a much better community than literally everywhere else (which shouldn't be difficult at all). When you post your setup, post your full specs with your firmware config and slicer settings. Is there a way we can tag ourselves or add a profile/signature? Maybe we can even put links to our specs.

So much of the 3D printing community seems to want to kill it by scaring off all newcomers. We can make this place the definitive stop for 3D printing knowledge, questions, and configs, but it's going to take the work of some mods and the entire community to get there.

Share knowledge like the rest of the tech enthusiast world. Your Klipper config isn't some super secret proprietary code for your eyes only. You don't have to guard it like it's your virginity. This hobby is going to die outside of super corporate builds with zero after market parts or builds like the Bambu X1 if the 3D printing community as a whole doesn't learn how to share and not be a dick.

[–] jwigum@lemmy.world 5 points 1 year ago

He’s using the first definition of application, you’re using the third: https://www.merriam-webster.com/dictionary/application

Seems you’re running into an issue with a specific hardware config, and people are trying to help you back into solutions for the issues you’re having (pictures of prints, recommending known good/workable hardware configs, etc.). That’s pretty nice, but you seem to be chafing at the perception they aren’t giving you exactly what you want. Slicer profiles can be really detailed, so you’ll have to be specific about what information you need/want. “Give me everything” isn’t going to do it. The requests to look at example prints make me think people either aren’t confident they can trust your descriptions, or they don’t have the hardware you’re using (but still want to help). It might also just be a community requirement to make sure there’s actionable data in an ask to the group.

There seem to be some resources out there for what you’re asking:

https://3dprintbeginner.com/how-to-install-klipper-on-creality-ender-6/

https://3dpandme.com/2022/10/02/tutorial-btt-manta-m8p-cb1-klipper-guide/

https://github.com/Klipper3d/klipper/blob/master/config/generic-bigtreetech-manta-m8p-v1.1.cfg

Based on some of your comments, I figure you’ve probably already found some of the above. If not, I’d give them a look. Good luck!

[–] Grass@geddit.social 3 points 1 year ago

The best part of klipper for me is being able to change pretty much any setting in a text file and restart and it works without having to screw around with SD cards, or firmware filenames, or compiling other than the first time.

[–] GrayBackgroundMusic@lemm.ee 2 points 1 year ago

Always be careful about the new thing. People tend to overhype the new thing and downplay the old thing. Klipper is neat! I've seen it do good stuff. However, Marlin is still good. Nothing wrong with it, either.

[–] madejackson@lemmy.world 2 points 1 year ago

I was once at the exact same point where you are now. Marlin+octoprint really is good enough for most cases once you're up and running.

I pulled the trigger for klipper a couple of years ago and honestly never looked back. Mainsail is just so much more refined and usable than octoprint. Tuning Firmware Settings in klipper is so much simpler than marlin, it's just a breeze.

Combined with modern controller board (f.e. mks skipr), modern drivers like TMC2209, sensorless homing, Canbus-toolhead, resonance measuring, mmmh... chef's kiss ;)

[–] LazaroFilm@artemis.camp 1 points 1 year ago (2 children)

So both Klipper and Marlin+Octoprint use a Pi and an arduino (in simplified versions, the SBC and the MCU can be any boards but I’ll use those brand names to make it easy).

Marlin uses the Pi to display the web interface, then sends the gcode to the arduino. Then the arduino does the math to convert the gcode to motor commands. Gcode.

Klipper uses the pi to display the web interface, but it also takes the gcode and converts it to motor commands in the pi and only sends those simplified motor commands to the arduino.

So with Klipper the arduino doesn’t need to convert gcode which is a pretty intense computation. Also, gcode is actually pretty heavy to send vu serial over usb in Marlin and often the printer can print faster than the gcode can be sent. Which results in hang ups in the print, the printer pauses, especially in a print with a lot of curves and printing fast. Klipper can use the full power of the pi to make intricate motor commands, fine tuning acceleration and all to avoid vibrations (input shaper, it even uses an accelerometer sensor to refuse vibrations making cleaner prints and quieter printing)

Other benefits of Klipper, settings don’t need to be flashed to the arduino, they are saved in a text file on the pi. Changing Config is a simple text edit, then reboot to apply the changes. You can edit the settings right in the web interface.

One of the down sides of Klipper was that you had more functions in Octoprint with plugins, that’s not true anymore. You have many plugins compatible with Klipper with Timelapse exclude area, remote access, Obico (the spaghetti detective), and so on.

The web interface is much lighter and responsive than the bulky Octoprint. Octoprint was an afterthought while Mainsail was purpose designed for Klipper.

I used to run Marlin and Octo and hated the experience. Since I tried Klipper I can’t go back.

[–] sexybenfranklin@ttrpg.network 3 points 1 year ago (1 children)

One slight correction, nothing is stopping you from using Klipper with Octoprint. You just need to install the Octoklipper plug-in to Octoprint. Most people who run Klipper choose to use Mainsail or Fluidd, but it's not required.

[–] LazaroFilm@artemis.camp 3 points 1 year ago

You can but it doesn’t mean you should. The way Octoprint manages interacting with the printer is it spoon feeds g-code lines one by one. So it can stop sending them to pause a print, change the values to change Z height for instance etc… however, Klipper is usually able to print faster than Octoprint an send gcode via serial. The crutch is to use VirtualSD mode in Klipper but then Octoprint has very limited interaction with the gcode other than start stop, no gcode modification possible. Enters Moonraker. Moonraker is an API that allows to interface with Klipper in a standardized way to send complex commands to the printer. Mainsail UI is using it, so is Fluidd, KlipperScreen, Telegram bot etc…. The benefit is that Moonraker commands Klipper to do the changes natively instead of adding a layer to the chain. So yeah you can use it, but there is no real incentive to do so now that Moonraker is here. 5 years ago Octoprint was the only way to control Klipper and it was just painful, but we had no alternative.

[–] nosnahc@lemmy.world 2 points 1 year ago (1 children)

Thank you for the explanation!

[–] LazaroFilm@artemis.camp 1 points 1 year ago (2 children)

You’re welcome. There is a lot more than that even. When you start digging through, Klipper allows you so much control. You can even have your printer run shell commands (deactivated by default because it so powerful, it can be dangerous if you don’t know what you’re doing)

You can control RGB LEDs and more. You can also connect many arduino isntesad of just one

[–] p1mrx@lemmy.world 4 points 1 year ago (2 children)

You can even have your printer run shell commands

I briefly considered using Klipper to make a clock that prints 1 layer per minute, but gave up after realizing it'd be unreadable after the first hour:

[–] LazaroFilm@artemis.camp 2 points 1 year ago

You could use multi material with color change on the hour. You don’t even need to flush the nozzle you could have the color gradually change throughout the layer, or print a handful of perimeters only between each hour.
You could have the first sector to be filled with a hole in the shape of the hour number. Then on the hour change print a couple of top layers covering the hole and print the next layer with the next number as a hole. It’s a really cool idea, as long as you don’t use a heated bed and manage your nozzle heating properly to keep your electric bill manageable. Also you definitely want low print speed and some TMC drivers hehe.

[–] CmdrShepard@lemmy.one 1 points 1 year ago

Well if your clock business doesn't take off you could always consider the wagon wheel or bicycle business!

[–] nosnahc@lemmy.world 0 points 1 year ago (2 children)

First of all, I need to fond out how to control my tasmota switch to turn on/off my printer and my led...

[–] CmdrShepard@lemmy.one 2 points 1 year ago (1 children)

Are you running Home Assistant? Klipper/Mainsail has an integration for HA that will allow you to control your printer with it. You could use HA to control your Tasmota devices too.

[–] nosnahc@lemmy.world 1 points 1 year ago (1 children)

No I'm not, but i'll found a way

[–] nosnahc@lemmy.world 2 points 1 year ago

Looks like what I'm looking for Try it tonight

[–] Rootiest@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

Tasmota is natively supported by moonraker

# moonraker.conf

[power Printer]
type: tasmota
address: 192.168.1.124
password: mypassword
[–] nosnahc@lemmy.world 1 points 1 year ago

Yes! I get it working this weekend, thanks!

[–] rambos@lemmy.world 1 points 1 year ago

They are both good!

I believe they both have pressure advance and resonance compensation. With klipper you get option for much better UI (Mainsail OS in my case) and you can change your config in a web browser.

[–] MrSlicer@lemmy.world 1 points 1 year ago

There is post processing g code manipulation. Abl works this way, as does arc welder. If your bed is high on one spot there has to be some sort of manipulation after cura.

[–] dmention7@lemm.ee 0 points 1 year ago (2 children)

This might be situation dependant, but I personally (Ender 3 S1 Pro) spent weeks searching for ready-made firmware, then learning how to modify and compile firmware, then troubleshooting why I couldn't get Linear Advance working, only to finally figure out that it just plain wasn't supported by Marlin on my hardware.

I was about to give up and just go back to the stock Creality firmware, but decided to give Klipper a go without really knowing the full capabilities, other than that it natively supported Pressure Advance. In a fraction of the time I had spent dicking around trying to get a single feature enabled in Marlin, I had my printer running off a slick web interface, fully tuned up and printing substantially better than I was able to achieve with Marlin.

Now, granted, I never tried to get up and running with Octoprint so I probably am only half answering your question, but as a relatively casual printer I have found using and tweaking Klipper to be substantially more straightforward, and would not hesitate to recommend giving it a stab as long as you have a RPi laying around already.

[–] Neeen@sh.itjust.works 2 points 1 year ago

I did exactly the same thing as you. I like the built in web management in klipper so much more than octoprint.

[–] CmdrShepard@lemmy.one 2 points 1 year ago

Yes one of the big advantages of klipper is that you don't need to recompile the whole thing to make changes to your configuration. You just edit it in a text editor and then save and restart the firmware.

I also haven't used Octoprint, but other advantages for klipper over marlin are the ability to control your printer via a webUI, pressure advance, resonance compensation, easily add cameras, mesh leveling visualization, and a bunch more that I'm forgetting off the top of my head.

[–] fhein@lemmy.world 0 points 1 year ago (1 children)

gcode only contains high level instructions, e.g. "move 10mm on the X axis", which the firmware has to convert this to electrical pulses that can be sent to the stepper motors. If this is done naively the hardware wouldn't be able to follow the instructions due to inertia, filament viscosity, etc. Both firmwares have several methods to deal with this, but afaik Marlin does not have anything that does the same as Klipper's input shaper. Marlin has "linear advance" while Klipper has "pressure advance" which both try to solve the same problem but have different algorithms and you calibrate them differently. Using Klipper with calibrated input shaper will probably allow you to print faster than Marlin at an equivalent quality level.

Another difference is that all Klipper configuration goes into a text file, and you just restart Klipper to reload it. To change some settings i Marlin you have to re-compile the entire firmware and flash it.

Marlin's G29 command has different syntax depending on which ABL algorithm the firmware was compiled with, which IMO makes it more difficult to help other people who didn't compile their own firmware (i.e. who don't know which ABL algorithm their Marlin has).

[–] nosnahc@lemmy.world 0 points 1 year ago (1 children)

Thank you for the explanation!

[–] fhein@lemmy.world 0 points 1 year ago (2 children)

Found out just now that Marlin finally got input shaping: https://marlinfw.org/docs/gcode/M593.html

There's however a risk that you have to compile your own firmware if you want to enable it. Definitely not impossible if you know your way around computers, but editing Marlin configs can be quite daunting. Not that installing and configuring Klipper would be trivial for a computer illiterate person, but over all I've found it much easier to work with. I used Marlin for about a year, including compiling my own version of it, before switching.

For me the biggest disadvantage with Klipper is that I haven't got around to printing an enclosure for the RPi so it's just sitting on the desk next to the printer, and it's not compatible with the E3v2 display so I have to use Mainsail on my phone if I want to control the printer from the same room. I could of course buy a proper touch screen and run KlipperScreen, but they're a bit pricey.

[–] CmdrShepard@lemmy.one 2 points 1 year ago* (last edited 1 year ago)

I've been looking into using an old Android phone as a display/control screen. The only thing holding me back is that my spare device (Note 4) doesn't have pass-through charging and won't run off a charging cable without the battery installed. This can be bypassed by attaching a couple wires to the pins where the battery connects but I've been too busy with other stuff to do it.

Might be an option for you if you have one laying around. Many newer phones can run without a battery just fine.

[–] anderfrank@kbin.social 1 points 1 year ago (1 children)

There is an add-on that lets the E3v2 screen work with klipper. I have it working and while the feature set is a bit limited its enough to see the print status and start a new print (among other things). You just need to run 7 wires from the screen to the GPIO pins on the pi. I used a front panel cable from an old PC case to accomplish this. Check it out!

https://github.com/GalvanicGlaze/DWIN_T5UIC1_LCD/wiki

[–] fhein@lemmy.world 1 points 1 year ago

Ah, nice! I started implementing the same thing a long time ago but got bored making all the UI screens after I had coded the basics :)

[–] nosnahc@lemmy.world -1 points 1 year ago

I'll try it today then!