Sounds like a hardware failure but there are a couple things we can try. Does it have a removable battery?
OK try this:
Resetting the SMC & PRAM on portables with a battery you should not remove on your own 1. Shut down the computer. 2. Plug in the power adapter to a power source, connecting it to the Mac if its not already connected. 3. On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time. 4. Release all the keys and the power button at the same time. 5. Press the power button to turn on the computer. 6. Press and hold the Command-Option-P-R keys before the gray screen appears. 7. Hold the keys down until the computer restarts again at least twice. 8. Release the keys.
Reboot into the Recovery HD by choosing the ‘Apple‘ menu > Restart, then hold down the ‘Command’ + R’ keys on the keyboard during the start up process. If the squares are still present then you have a hardware failure and it needs repair. If not then it is software issue and you should try reinstalling the system.
Then it has a hardware failure and it needs repair... nothing more you can do. Just hold the power button for 10 seconds to shut down. Sorry.
Please remember that the experts here cannot fix failed hardware. We guarantee a correct ANSWER, even if that answer determines the product needs to be physically repaired. No one likes to hear they need to spend more money to fix the problem but at least you now know what needs to be done and you can make an informed decision.
If you are satisfied, please kindly provide an OK or Above Rating - so I get paid. Thanks!!