closing the lid puts it to sleep and that can trigger the reboot.
At the time of hardware test, Apple said to first Time Machine backup, then manual backup of all files, then clean-disk, then reinstall OS, and then to install back each app manually from app store, and finally copy back all files, bookmarks etc. i.e .do not restore from Time Machine.
However, after I came home, I did embark on above, but I found my machine crashing right after the clean-disk and reinstall of OS. I did not even get to manual reinstall of apps and data. This clearly showed that it is the OS issue and not HW or even apps.
I have not really found the time to get back to Apple on this..instead decided to wait for 14.3 ...but seems like thats kaput as well.
is your reboot always throwing AMDFrameBufferVIP::SetPowerState error?