I had this same problem:
When I press "D" and power button, the screen test OK, so the display does work.
When I attach an external monitor it worked perfectly.
Here was my fix... I had to purchase a new internal ribbon cable and replace it. The part was 7JFX4 and and got it for about $35...