Welcome and nice X5!
1. The power folding mirrors have a microswitch to feedback mirror position. The actuating lever on the microswitch can "fall off" causing the problem you describe. You can repair this yourself but may need to open both mirrors to find which switch is causing the problem.
Here is a how-to post with some pics. Instructions for opening the mirrors
here.
2. Check the door seals are not worn out and the door card is not loose/unfixed.
__________________
Cheers, Brian
=========================================
2001 X5 4.4i Sport
Black Sapphire, Hi Gloss Shadowline, Full Privacy Glass.
Too Cool for Jack Bauer