I have had a HP prebuilt for about a year now and as of about 6 months ago it would (normally while playing games or sleeping) shut down. The only way to turn it on was to unplug cord (no switch in back of psu) wait a bit, Plug it back in. Something weird is that it would turn on by its self (after 5 seconds would turn on like u pressed power button normally) and then after another 5 seconds with the hp logo popping up it would turn off. Rinse and repeat until eventually it would randomly just power on (kinda like starting an old car if you get what I mean). After all this happend I did upgrade the ram from 8gb to 16gb with just a single 16 gig stick but have taken it out for normal stick for less trouble shooting problems and it still happens. I have tried replacing cmos battery still nothing. New psu (correct power output and everything) still same result. Not really sure what do as I’ve tried just about all I can think of. The pc is getting enough air. Also when unplugging the front IO power button it dosent turn on by its self so I’m thinking that might have something to do with it. Yeah not sure what to do if nothing else will most likely build new pc.