Chosen Solution
I plug in my laptop and it is on and running fine. I walk away for an hour or more and then find that it is completely shut off. I don’t know why this keeps happening. I looked at my settings and don’t see anything set to make it do this. Does it need a new battery?
click START and type control. CONTROL PANEL will show at the top. Click that. When it opens click POWER OPTIONS. In there you will find options to set when the unit sleeps and when it hibernates. There are also different power options available and all contain those settings.
My HP Pavilion 14m-cd0001dx has done a similar thing after I re-installed Windows during an SSD upgrade. I believe it is due to a feature in Windows 10 where it will hibernate (essentially saves contents of RAM to hard drive, then powers off) after being in sleep mode for a certain amount of time in order to save the battery. There should be an option to turn that off somewhere in the power settings although I unfortunately forget exactly where. I would check that first.