Failed to stop klipper.service: Unit klipper.service not loaded

Hi, I tried to install numpy which ran fine, but when I came to make the mcu and stop the klipper service I got the following error: Failed to stop klipper.service: Unit klipper.service not loaded. I tried to carry on with the makeflash etc, but on the ‘Save and Restart’ of the printer, klipper could not start. (Has anyone else had this issue?)

hard to say from the little information. the service was not loaded when you installed numpy. I guess you are trying to add the input shaper? Have you rebooted? Is klipper online now?

Hello,

Yes I was in the process of installing input shaper. Numpy installed fine (I presume), but when I had this error when I tried to stop/start the service. I had prepared the RPI as an MCU and was trying to flash it, when I added the ‘RPI MCU section’ to my printer.cfg and restarted the printer the host would not boot. I had to then comment out the ‘RPI MCU’ restated and the host was available again.

Could this be something to do with the service not stopping correctly? When doing the ‘make flash’?

Can I uninstall Numpy and all the dependencies and try it again? If so what are the commands to do this?

Many thanks
Michael

you probably haven’t installed the RPI MCU correctly. That has nothing to do with numpy.

have you followed these instructions?

Yep, I followed the instructions on the Kilpper website on how to install input shaper. Numpy installed fine but it was the stopping of the service that didn’t work when I can to flash the RPI MCU part.

Many thanks
Michael

if it’s not stopping it’s because it’s already stopped :slight_smile:

Ok, but I then couldn’t start the service again… And this was after restarting Klipper

Many thanks
Michael

can you send some logs of when the mcu is failing? I’m fairly certain rpi mcu failed to install somehow

Would that be the Klippy.log file? Sorry, I’m very new to Klipper and Voron.

I’m at work at the moment but can certainly get you the logs when I get home.

Many thanks for your help. I really appreciate it.
Michael

yes let’s start from the klippy.log

Hi,

Please see the attached.

(Attachment klippy-1 (1).log is missing)

Hi,

I attempted to attach the klippy logs but apparently, it’s an invalid file type to attach to discourse!!! Is there another way??

it shouldn’t be too big. just paste it inside a

code tag

otherwise use pastebin

Starting Klippy…
Args: [’/home/pi/klipper/klippy/klippy.py’, ‘/home/pi/klipper_config/printer_1/printer.cfg’, ‘-I’, ‘/tmp/printer-1’, ‘-l’, ‘/tmp/klippy-1.log’, ‘-a’, ‘/tmp/klippy_uds-1’]
Git version: ‘v0.9.1-427-gc5f1835b’
CPU: 4 core ARMv7 Processor rev 3 (v7l)
Python: ‘2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]’
Start printer at Sun Apr 18 22:56:46 2021 (1618783006.7 42.2)
===== Config file =====
[pause_resume]

[display_status]

[gcode_macro CANCEL_PRINT]
rename_existing = BASE_CANCEL_PRINT
gcode =
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT

[gcode_macro PAUSE]
rename_existing = BASE_PAUSE
variable_extrude = 1.0
gcode =
{% set E = printer[“gcode_macro PAUSE”].extrude|float %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000

[gcode_macro RESUME]
rename_existing = BASE_RESUME
gcode =
{% set E = printer[“gcode_macro PAUSE”].extrude|float %}
G91
G1 E{E} F2100
RESTORE_GCODE_STATE NAME=PAUSE_state
BASE_RESUME

[mcu]
serial = /dev/serial/by-id/usb-Klipper_lpc1769_1A50010FC09869AF8FCD405EC32000F5-if00

[stepper_x]
step_pin = P1.4
dir_pin = P1.8
enable_pin = !P1.0
microsteps = 16
rotation_distance = 40
endstop_pin = ^P1.29
position_endstop = 250
position_min = 0
position_max = 250
homing_speed = 25
homing_positive_dir = true

[tmc2209 stepper_x]
uart_pin = P1.1
run_current = 0.8
hold_current = 0.500
interpolate = True
stealthchop_threshold = 0

[stepper_y]
step_pin = P1.14
dir_pin = P1.15
enable_pin = !P1.9
microsteps = 16
rotation_distance = 40
endstop_pin = ^P1.28
position_endstop = 240
position_min = -11
position_max = 240
homing_speed = 25
homing_positive_dir = true

[tmc2209 stepper_y]
uart_pin = P1.10
run_current = 0.8
hold_current = 0.500
interpolate = True
stealthchop_threshold = 0

[stepper_z]
step_pin = P4.29
dir_pin = P4.28
enable_pin = !P1.16
microsteps = 16
rotation_distance = 40
endstop_pin = probe:z_virtual_endstop
position_max = 235
position_min = -3.0
homing_speed = 25

[tmc2209 stepper_z]
uart_pin = P1.17
run_current = 0.8
hold_current = 0.500
interpolate = True
stealthchop_threshold = 0

[homing_override]
axes = z
set_position_z = 0
gcode =
G90
G0 Z5 F5000
G28 X0 Y0
G0 X127 Y100 F10000
G28 Z0
G0 Z5 F5000

[probe]
pin = ^P1.27
x_offset = 0.0
y_offset = 25.0
speed = 10
samples = 3
sample_retract_dist = 2.0
samples_result = median
samples_tolerance = 0.0125
samples_tolerance_retries = 5
z_offset = 2.115

[extruder]
max_extrude_only_distance = 100.0
step_pin = P2.6
dir_pin = P2.7
enable_pin = !P0.4
microsteps = 16
rotation_distance = 7.68
nozzle_diameter = 0.400
filament_diameter = 1.750
max_extrude_cross_section = 1.6
heater_pin = P2.3
sensor_type = ATC Semitec 104GT-2
sensor_pin = P0.24
min_temp = 0
max_temp = 300
control = pid
pid_kp = 28.125
pid_ki = 1.913
pid_kd = 103.361

[tmc2209 extruder]
uart_pin = P0.5
run_current = 0.50
hold_current = 0.400
interpolate = True
stealthchop_threshold = 0

[heater_bed]
heater_pin = P2.5
sensor_type = ATC Semitec 104GT-2
sensor_pin = P0.25
min_temp = 0
max_temp = 130
control = pid
pid_kp = 59.812
pid_ki = 0.608
pid_kd = 1471.381

[temperature_sensor raspberry_pi]
sensor_type = rpi_temperature
min_temp = 10
max_temp = 100
gcode_id = RPI

[fan]
pin = P2.1

[heater_fan hotend_fan]
pin = P2.2
max_power = 1.00
kick_start_time = 0.100
heater = extruder
heater_temp = 50.0
fan_speed = 1.0

[controller_fan electronics_fan]
pin = P2.4
max_power = 1.0
kick_start_time = 0.100
heater = heater_bed
fan_speed = 0.5

[printer]
kinematics = corexz
max_velocity = 300
max_accel = 7000
max_z_velocity = 100
max_z_accel = 1000
square_corner_velocity = 4.0

[idle_timeout]
timeout = 1800
gcode =
TURN_OFF_HEATERS
M84

[static_digital_output tmc_standby_pins]
pins = !P3.26, !P3.25, !P1.18, !P1.19, !P2.13

[virtual_sdcard]
path = ~/gcode_files

[bed_mesh]
speed = 50
horizontal_move_z = 5
mesh_min = 25,25
mesh_max = 225,220
probe_count = 6,6
algorithm = bicubic
fade_start = 1
fade_end = 10
fade_target = 0

[gcode_macro START_PRINT]
default_parameter_bed_temp = 85
default_parameter_extruder_temp = 240
gcode =
M140 S{BED_TEMP}
G90
G28
BED_MESH_CALIBRATE
G28
G1 Z5 F3000
M190 S{BED_TEMP}
M109 S{EXTRUDER_TEMP}
G90
G1 X5 Y25 F10000
G1 Z5 F5000
G1 Z0.3 F240
G92 E0.0
G1 Y190 E15.0 F1500.0
G1 X5.5 F5000
G1 Y25 E30 F1200.0
G92 E0.0

[gcode_macro END_PRINT]
gcode =
M140 S0
M104 S0
M106 S0
G91
G1 X-2 Y-2 E-3 F300
G1 Z10 F3000
G90
M84

[gcode_macro M600]
default_parameter_x = 50
default_parameter_y = 0
default_parameter_z = 10
gcode =
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-60 F1000
RESTORE_GCODE_STATE NAME=M600_state

[bed_mesh default]
version = 1
points =
0.125000, 0.087500, 0.050000, -0.137500, -0.225000, -0.450000
0.125000, 0.125000, 0.075000, -0.012500, -0.200000, -0.375000
0.125000, 0.100000, 0.062500, -0.025000, -0.237500, -0.425000
0.100000, 0.087500, 0.025000, -0.050000, -0.262500, -0.475000
0.137500, 0.100000, 0.012500, -0.075000, -0.250000, -0.462500
-0.012500, 0.112500, -0.025000, -0.100000, -0.325000, -0.487500
tension = 0.2
min_x = 25.0
algo = bicubic
y_count = 6
mesh_y_pps = 2
min_y = 25.0
x_count = 6
max_y = 220.0
mesh_x_pps = 2
max_x = 225.0

Extruder max_extrude_ratio=0.665203
Starting serial connect
webhooks client 3042966704: New connection
webhooks client 3042966704: Client info {‘program’: ‘Moonraker’, ‘version’: ‘v0.5.0-20-g5783604’}
got {u’count’: 339, ‘#receive_time’: 45.314832287, u’sum’: 384141, u’sumsq’: 3383320, ‘#name’: u’stats’, ‘#sent_time’: 45.309071602}
Loaded MCU ‘mcu’ 91 commands (v0.9.1-421-ge7b0e7b4-20210415_105757-switchwire / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)
MCU ‘mcu’ config: BUS_PINS_i2c1=P0.1,P0.0 BUS_PINS_i2c0=P0.28,P0.27 BUS_PINS_i2c2=P0.11,P0.10 BUS_PINS_i2c1a=P0.20,P0.19 BUS_PINS_ssp1=P0.8,P0.9,P0.7 STEP_DELAY=2 ADC_MAX=4095 BUS_PINS_ssp0=P0.17,P0.18,P0.15 PWM_MAX=255 CLOCK_FREQ=120000000 RESERVE_PINS_USB=P0.30,P0.29,P2.9 MCU=lpc1769 STATS_SUMSQ_BASE=256
Sending MCU ‘mcu’ printer configuration…
Configured MCU ‘mcu’ (1024 moves)
Starting heater checks for heater_bed
bed_mesh: generated points
Index | Tool Adjusted | Probe
0 | (25.0, 0.0) | (25.0, 25.0)
1 | (65.0, 0.0) | (65.0, 25.0)
2 | (105.0, 0.0) | (105.0, 25.0)
3 | (145.0, 0.0) | (145.0, 25.0)
4 | (185.0, 0.0) | (185.0, 25.0)
5 | (225.0, 0.0) | (225.0, 25.0)
6 | (225.0, 39.0) | (225.0, 64.0)
7 | (185.0, 39.0) | (185.0, 64.0)
8 | (145.0, 39.0) | (145.0, 64.0)
9 | (105.0, 39.0) | (105.0, 64.0)
10 | (65.0, 39.0) | (65.0, 64.0)
11 | (25.0, 39.0) | (25.0, 64.0)
12 | (25.0, 78.0) | (25.0, 103.0)
13 | (65.0, 78.0) | (65.0, 103.0)
14 | (105.0, 78.0) | (105.0, 103.0)
15 | (145.0, 78.0) | (145.0, 103.0)
16 | (185.0, 78.0) | (185.0, 103.0)
17 | (225.0, 78.0) | (225.0, 103.0)
18 | (225.0, 117.0) | (225.0, 142.0)
19 | (185.0, 117.0) | (185.0, 142.0)
20 | (145.0, 117.0) | (145.0, 142.0)
21 | (105.0, 117.0) | (105.0, 142.0)
22 | (65.0, 117.0) | (65.0, 142.0)
23 | (25.0, 117.0) | (25.0, 142.0)
24 | (25.0, 156.0) | (25.0, 181.0)
25 | (65.0, 156.0) | (65.0, 181.0)
26 | (105.0, 156.0) | (105.0, 181.0)
27 | (145.0, 156.0) | (145.0, 181.0)
28 | (185.0, 156.0) | (185.0, 181.0)
29 | (225.0, 156.0) | (225.0, 181.0)
30 | (225.0, 195.0) | (225.0, 220.0)
31 | (185.0, 195.0) | (185.0, 220.0)
32 | (145.0, 195.0) | (145.0, 220.0)
33 | (105.0, 195.0) | (105.0, 220.0)
34 | (65.0, 195.0) | (65.0, 220.0)
35 | (25.0, 195.0) | (25.0, 220.0)
Starting heater checks for extruder
Stats 46.3: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=2032 bytes_read=4804 bytes_retransmit=9 bytes_invalid=0 send_seq=190 receive_seq=190 retransmit_seq=2 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=119997024 heater_bed: target=0 temp=0.0 pwm=0.000 raspberry_pi: temp=23.8 sysload=2.12 cputime=0.879 memavail=7759304 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000
webhooks: registering remote method ‘shutdown_machine’ for connection id: 3042966704
webhooks: registering remote method ‘reboot_machine’ for connection id: 3042966704
Stats 47.3: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=2038 bytes_read=4910 bytes_retransmit=9 bytes_invalid=0 send_seq=191 receive_seq=191 retransmit_seq=2 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=119996780 heater_bed: target=0 temp=19.3 pwm=0.000 raspberry_pi: temp=24.3 sysload=2.12 cputime=0.904 memavail=7759136 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=18.9 pwm=0.000
Stats 48.3: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=2044 bytes_read=5031 bytes_retransmit=9 bytes_invalid=0 send_seq=192 receive_seq=192 retransmit_seq=2 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=119996580 heater_bed: target=0 temp=19.4 pwm=0.000 raspberry_pi: temp=24.8 sysload=2.12 cputime=0.913 memavail=7759224 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=18.9 pwm=0.000
Stats 49.3: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=2050 bytes_read=5152 bytes_retransmit=9 bytes_invalid=0 send_seq=193 receive_seq=193 retransmit_seq=2 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=119996385 heater_bed: target=0 temp=19.3 pwm=0.000 raspberry_pi: temp=24.3 sysload=2.12 cputime=0.922 memavail=7759100 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=18.9 pwm=0.000
Stats 50.3: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=2056 bytes_read=5258 bytes_retransmit=9 bytes_invalid=0 send_seq=194 receive_seq=194 retransmit_seq=2 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=119996207 heater_bed: target=0 temp=19.2 pwm=0.000 raspberry_pi: temp=23.8 sysload=2.35 cputime=0.931 memavail=7759204 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=18.9 pwm=0.000

that’s the log of the working machine. when it is working, connect to SSH, stop the service, make menuconfig and select “linux process” from the list, then make flash.

then enable the mcu process

sudo cp ~/klipper/scripts/klipper-mcu-start.sh /etc/init.d/klipper_mcu
sudo update-rc.d klipper_mcu defaults

Add the [mcu rpi] to your configuration and at this point you can restart the klipper service.

If it’s not working send the log. Please enclose the log into a code tag.

Hi,

Thank you so much for you help. I ended up reinstalling mainsail and Klipper and then started the whole process again and it now seems to be working. I’ve not yet connected the ADXL board and tried input shaper but hopefully the software side is sorted now.

May I ask you another question? I have the SKR E3 Turbo and I’m trying to get the LCD to work. It requires the spi pins but there isn’t any physical pins so it requires the software pins enabled. But I don’t know how you reference these pins nor what their pin assignments are.

Any help would be greatly appreciated.

Many thanks
Michael

you mean software SPI? This is a good start klipper/sample-lcd.cfg at master · KevinOConnor/klipper · GitHub