Extrusion issue after migrating to Klipper

Hi all,
I have recently got introduced to Klipper and I was impressed by the features that it provides, so I decided to install Klipper on my Ender 5 pro (was Marlin). Everything seems fine and works as expected, except the extruder. I can verify that the basic configuration is correct because the firmware can Enable/Disable motor and Extrude/Retract fillamet by the correct distance when nothing is being printed.

The problem starts when I print something. I get horrible quality during print which seems to be related to extrusion. You can take a look at images. By the looks of the image, I thought these 2 can be a potential cause for this problem:

  • Over extrusion
  • Lack of enough cooling

About the over extrusion, I can confirm that the calibration is correct (by extruding 50mm of filament). About cooling, I turned off the heated bed and added a big cooling fan blowing at the nozzle while printing and nothing changed.
To rule out possibility of hardware issues, I switched back to Marlin to print the same gcode, and it printed fine (shown in attached image)! Even without the big cooling fan. So I believe this is a software/configuration issue in Klipper, or maybe gcode incompatibility with Klipper, or something similar to that, but I cannot figure out what’s going wrong. Can anyone point out to a direction so that I can have a successful print? I really look forward to use Klipper.

This is some information about the print:

  • Printer: Ender 5 pro
  • Board: Creality 4.2.2
  • Extruder: MK8 extruder
  • Hotend: MK8 hotend
    Slicer: Cura 4.9
  • Material: PLA
  • Hotend temperature: 200
  • Bed temperature: 0

Attached files:
Image of the same gcode printed with Marlin (right) and Klipper (left):

A video of the print with extrusion issue:

Klippy log file (trimmed from the last printer restart):

Additional Info (since I was not able to provide more than 2 links in one post):

Marlin config file for comparison:

Printed Gcode:

Your Z-Axis kinematic parameters are too aggressive for a lead-screw system, especially in the Ender 5 flavour.

[printer]
kinematics = cartesian
max_velocity = 600
max_accel = 2000
max_z_velocity = 40
max_z_accel = 1000
max_accel_to_decel = 5000

Try something along:

[printer]
kinematics = cartesian
max_velocity = 300 # 600 is too much for my liking
max_accel = 2500 # 2500 to 3000 should work
#max_accel_to_decel = 1250 # typically 0.5 x max_accel. no need to set it
max_z_velocity = 5 # 5 to 10 will be sufficient. Start with 5
max_z_accel = 100 # with an accel of 1000 you will most likely stall your stepper on Z

Edit:
I’m also not sure if your Z-Axis rotation_distance = 8 is correct. IMO it should be 4 but I don’t know your printer (there are Ender 5s with 4 and 8, depending on the age). Just make sure that your Z-Axis actually moves 10mm when you command it to, e.g. in Octoprint

2 Likes

Good catch! Z-Axis rotation distance was the issue, I did not verify Z calibration and the correct “rotation_distance” for Z was indeed 4 instead of 8. The effect of this incorrect setting was that I was extruding twice the amount for Z displacement. Thank you Sineos for your pointing it out.