# Extrusion issue after migrating to Klipper

**URL:** <https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216>\
**Category:** General Discussion\
**Created:** [April 29, 2021, 11:54pm UTC](https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216 "2021-04-29T23:54:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamran](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/kamran/32/101_2.png) [@Kamran](https://klipper.discourse.group/u/Kamran)\
**Post date:** [April 29, 2021, 11:54pm UTC](https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216/1 "2021-04-29T23:54:28Z")

</div>

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):

 ![Print-Marlin&Klipper](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/b076dc943ce98b2cfd74885bc8c54647777d3972.jpeg)

A video of the print with extrusion issue:

> **[print\_video.mp4 (video)](https://drive.google.com/file/d/18G9NpkInNLUZ1YDNvi_8TNqRj2k5paNh/view?usp=sharing)**
>
> Google Drive file.

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

> **[klippy.log](https://drive.google.com/file/d/14dj7Z2ysu-33cgwZTd2HLxuYN5XE6J70/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![Kamran](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/kamran/32/101_2.png) [@Kamran](https://klipper.discourse.group/u/Kamran)\
**Post date:** [April 29, 2021, 11:58pm UTC](https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216/2 "2021-04-29T23:58:57Z")

</div>

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

Marlin config file for comparison:

> **[Configuration.h](https://drive.google.com/file/d/164y3Cllm0sxEf00tTD6koij1qvhqIwWI/view?usp=sharing)**
>
> Google Drive file.

Printed Gcode:

> **[test\_square.gcode](https://drive.google.com/file/d/1ixIZ9AqqRTWOV1ATmsibolq1XUlktXHE/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [April 30, 2021, 7:52am UTC](https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216/3 "2021-04-30T07:52:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kamran](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/kamran/32/101_2.png) [@Kamran](https://klipper.discourse.group/u/Kamran)\
**Post date:** [May 1, 2021, 10:02pm UTC](https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216/5 "2021-05-01T22:02:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [May 29, 2024, 2:40pm UTC](https://klipper.discourse.group/t/extrusion-issue-after-migrating-to-klipper/216/6 "2024-05-29T14:40:58Z")

</div>


