Which headlights and/or model is your 2005 X5?
More than likely you have the adaptive bi-xenon headlights...but we can't tell with the info you've left us.
The adaptive bi-xenon headlights also have the automatic feature as well. What position is your headlight switch? If in the "A" mode position (turned to the left)...then you may be having an issue with either the xenon control module (#1) or the ALC (adaptive light control) module (#5) (see diagram below of adaptive bi-xenon headlight).
As mentioned in my reply in the thread on the other forum...the e53's adaptive bi-xenon headlamps have a foot in both the old gen communication bus...but the new gen BMW option/features...and that you will find that these modules that control the adaptive bi-xenon headlights are only found on other new gen bmws like the e60/e63/e64/e65/e66/e83/etc.
You may be able to find some old e53 threads where the ALC module has flaked out and caused problems like you've mentioned (I hope I'm using the correct abbreviation for #5):