It looks like it’s losing steps, yes. This is likely due to an under-current or over-acceleration situation.
Open the config.txt on the SD card and look for the line beginning with ‘alpha_current’ - a K40 will usually use a 1.0A motor in the X position (but not always - thanks china).
There are two things you can do:
- blindly increase the value to 1.0, run some test cuts, monitor the motor to make sure it’s not getting super hot/emitting smoke/making grinding noises
- get the model number of the motor, look up its datasheet, and use a value corresponding to whatever the proper current for that motor is supposed to be
Note the drivers on the Laserboard max out at 1.2A. If your motor requires significantly more current than this, it’s time to purchase an external driver for that motor (but in a stock K40 that’s going to be highly unlikely).
If changing the current doesn’t help or makes it worse, change it back to what it was before and instead lower the ‘alpha_acceleration’ value by 500 (you can try this multiple times) and see if that whips it into shape.
Good luck …