Not sure where is would be on the X, but there will be a common earthing point (a bolt) up front on the frame where the headlight and sidelight earths run to. Trace the wiring back from the headlamp and you'll find it.
What you can do quite easily to test whether the earth is at fault, is to run a 'clean' earth (a separate wire) from the headlamp connector earth terminal directly to the battery temporarily. If the problem goes away then you'll have to find the common earthing point and clean it up, or permanently fix up a clean earth for the headlamp.
What tends to happen with common earths (where more than one electrical item shares the same path back to the battery) is if one of the components struggles to find a route back to earth, it will take the easiest path (electricity is lazy), which is often through another component's circuit and funny things happen: lights go out, lights flash when they shouldn't, lights come on when the shouldn't!
Also check the battery terminals are tight too.
|