The reasons for the above behavior often lie in the wear of the chain, sprockets or both - but not only.
The following checkpoints help to solve the problem:
- Checking the chain wear with a Chain gauge or calipers
- Check whether the chain has stiffened chain links
- Check that the rear derailleur has no mechanical damage (e.g. derailleur hanger bent)
- Check the cassette and its sprockets for wear and fastening.
- Check the rear derailleur settings:
- Chain jumps over the first or last sprocket: Here, the alignment or the limit stops of the rear derailleur must be adjusted using the adjustment screws 'H' (= higher speed - smallest sprocket) or 'L' (= lower speed - largest sprocket).
> A luxury helper: the Tune true to line - Laser adjustment tool for rear derailleurs. - The cassette jumps onto the bottom sprocket. If the cassette is compatible with the rear derailleur, the bottom sprockets may be loose. Tighten the sprocket bolt to the correct torque. This is usually indicated on the sprocket bolt.
- Chain jumps within the gears: The tension of the shift cable must be adjusted here. There is normally an adjustment screw for this where the shift cable is routed into the shift lever. If the chain has difficulty jumping into the higher gears when shifting through the gears, the adjusting screw must be turned anticlockwise. If the chain skips gears, the shift cable must be loosened again slightly. Proceed in ¼ turn increments and check each time until the gears shift up and down smoothly.
- Chain grinds on the smallest gears (large sprockets) / The chain slips: The wrap (so-called B-screw) must be adjusted here. It regulates the distance between the upper derailleur pulley and the sprockets. A guide value for the distance is approx. 1.5 times the length of a chain link. It is best to follow the instructions of the rear derailleur manufacturer.
- A good troubleshooting list can be found among others here. You can find out how to set up a Shimano XT rear derailleur correctly in this video track.