That's either an electrical or encoder issue. Check your head cables for any damage, ink splatter, or corrosion and replace as necessary. You can also air dust the terminals they plug into. Then clean the encoder strip and sensor. At the end of the day it could be the head simply failing or even damage to the main board but usually the head cables, encoder strip, and/or encoder sensor is causing the issue.