An issues with BMW's programming on the X5 40e has resulted in more than a few engine replacements from my source is telling me. If you have a X5 40e produced between July 6, 2015 to June 9, 2017 get this service action done quick.
This BMW Service Action involves F15 X5 40es produced from July 6, 2015 to June 9, 2017. BMW X5s which require this Service Action to be completed will show it as “Open” when checked either in AIR, the "Service Menu" of the Dealer Communication System or with the Key Reader.
When the combustion engine starts while driving, the higher load (torque demand) may cause pre-ignition (super knocking). This could result in the engine becoming noisy or having internal damage.
Unfavorable DME software
Update the DME software