three possibilities:
1. improperly inserted at transmission housing.
2. improperly inserted to speedometer housing.
3. the cable is about to break. prepare to buy a replacement cable.
Probably the cable is binding with the protective sheathing. The lubrication tends to dry up as the cable ages. Try pouring gear oil into the speedo cable from the meter side.