If it is just one axis, try changinging the cables with one of the other axis, do an "air cut" a few times, and see if the X still does it. If it doesn't, it could be a wiring flaw.
I had this happen when building a system and it turned out it was 2 of the direction wires slightly touching each other.
Dave
Each wire has individually shrink tubing with no way to touch. I triple checked every wire before I plugged the motors in.