Long time reader, first time poster. Thanks in advance for your valuable time helping with this strange issue.
This MBP uses dual GPU's, but does not feature automatic graphics switching; graphics switching is either accomplished by logging out or launching GFXCardStatus. GFXCardStatus was not installed prior to this problem presenting.
I first noticed this problem recently while on battery power, disconnected from all external devices, when I tried to switch to the integrated GPU from the discreet Nvidia GeForce 9600M. At this point, I was on Yosemite 10.1 installed fresh from the app store two months previously (reformat done to use the SSD's hardware encryption). When I logged out, the display went black immediately, but the backlight was still on. I restarted, reset NVRAM and the SMC, and held option key on startup to attempt simply to get the grey screen, but still had no action on the display except for the backlight. At that point I hooked the laptop up to my Cinema Display and voilá, I could see the usual login screen. I immediately switched back to the discreet GPU, and both the built-in and external displays worked properly. The problem is perfectly duplicable; on the integrated GPU, only the external display is responsive. With discreet GPU, the built-in display works fine every time. It had been a long time since I remembered using the integrated GPU.
Console revealed that XPC was unable to find display 0x00001 (invalid address). A number of other posts have described XPC issues with other MBP's using dual graphics and Yosemite, but all of the other threads described being unable to connect to external displays; this is the first case, to my knowledge, of the XPC problem interfering with the built-in display.
Also, the MBP built-in display works fine when booted into safe mode. It appears that the MBP is using the integrated GPU when in safe mode. I reviewed all of my extensions and startup items, and it appeared only that the Realtek wireless drivers were loading a third-party (non-Apple-supplied) kext. Removing the Realtek extensions made no difference.
I changed Colorsync color profiles for the built-in display using while running on integrated GPU to no effect. My next step will be to reinstall from scratch and see if the problem is fixed, but given the implied low level of the problem (it appears to be related to the drivers or SMC) I think that fix isn't guaranteed. With driver files not being available by themselves though, a reinstall may be my only option. Oh yes: Apple Diagnostics lists no problems. Permissions repair and Disk Repair have been ineffective. Also, the OS still lets me drag things over to the built-in display when both the built-in and external displays are active; in Displays preference panes, things look normal except for the fact that the built-in display is all black.
Updating to Yosemite 10.2 made no difference.
Thanks again for reading!