what causes flickering headlights? then alternating, going off then back on? on 2005 Jaguar XJR

had my "rocket on wheels" for almost a year. recently, the headlights started flickering. then began going off & back on, intermittenlty, both sides.

Asked by for the 2005 Jaguar XJR
It's hard to guess without being able to do basic tests. I would first start and check the charging system is OK and that there isn't a diode or regulator problem internal in the alternator. Does it only happen on high beam or also happen on dip beam. Could be the HID lights having a problem, the main or low beam relay or switch. If you feel confident tracing wiring and have a good digital voltmeter, there is a company that independent auto repair shops get their information from, this same information is available inexpensively for people that work on their own cars.. The information is year make and model specific, covering repair procedures, torque specifications, fluid capacities and specifications, service bulletins, component locations, wiring diagrams ect.... Alldata is very easy to navigate
the wiring diagram I looked at is 4 pages but easy to follow.