Hi I can't believe I'm still awake. You can't restore to factory settings if you have a hardware problem. What error did you receive?? Please try here.
Dokie!http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02491515&cc=us&dlc=en&lc=en
You may also be infected with malware. Run the free version of Malwarebytes.
http://www.malwarebytes.org/free/
Should have went to bed when I was ahead. Just kidding!
Dokie!