I had a situation with a 24" iMac where after replacing the hard drive, my display did not work correctly. Tried everything, including reinstalling OS X. Nothing worked. Took it to the Genius Bar. The Genius reset the PRAM/NVRAM & corrected the issue. You might want to try resetting the NVRAM. https://support.apple.com/en-us/HT204063 Good luck! Hope it helps!