Not sure about the M42, but I had the same problem with an M20B25 swap in an older E30. There was a separate signal wire off the DME that had to be spliced in. The DME has to send an injector signal to the cluster so the efficiency gauge works.
ETM says a white wire comes off pin 17 of the DME, goes to pin 8 of the round C101 chassis connector, then connects to a yellow/white wire that goes to pin 11 of connector C1 (the blue one) at the gauge cluster. You could probably splice it straight across the firwall, but I'd do it via the C101.
If that's not it, did you swap cluster coding chips? Could be that the M40 chip displays the M42 signal off the gauge. I'm not sure how different the cluster coding chips are.