My PC shuts itself down , why?           
Or does a shut down loop. (truly shuts off all power)

There are lots of reason for this. (some are normal like the asinine windows 10 update forced shut down, <  W10 pro I can delay this for  days or months.
If you can not get the PC to even turn on again see my dead PC page.
I am not covering sleep below or hibernate  below, but read this and set the PC to not sleep or learn to unsleep a PC  )
The PC has very complex power modes, not just the power button, nor the START "shutdown" in Windows.
The modern PC can be setup in BIOS to turn itself on and off by the BIOS POWER calendar.
Or remote power on and off. (yes) or using WAKE on LAN. (keep it off and your router firewall Up)
The vary common reason for real unwanted shutoff  is the PC is overheated or a fan died. (run application  program free, called hwinfo32.exe to see if true.

Reasons and tests to do below: (based on 2 things, easy to do tests, and the most likely failures) (your reality may vary ;yrmv)

  1. Besides the silly and nasty Windows 10 update forced shut down, here is my list off all ways possible. (keep in mind PC have the most possible single point failures of just about any thing){#1}
  2. Laptop PC's have a huge big battery that even after 1 year old can short and overload the onboard power regulators or VRMs.{#2}
  3. You Lost AC power to your PC, (home or room or funky old power strip?) or the cords are loose, on a Laptop the battery then goes dead and PC with it dead., on a desktop it goes dead NOW.
  4. The PCs I have , all have fancy BIOS, (Enterprise grade PCs) that have  autopower on, and autopower off feature, be sure to look in BIOS pages  for that first.{#3}
  5. The PC has feature called scheduled tasks, in Windows ,  called TASK Scheduler,  what can be done there is run shutdown.exe /f/s, based on time and date, so look for it , see it? and turned it off. (rare to find this)
  6. The PC overheated, and like all PC's made shut them selfs off to save there own bacon. (BIOS does this at 80c , if not the  CPU does this  at 90C) Run HWinfo32.exe for free to see this?
  7. If the PC is over the age of 7 years old the RTC coin cell goes dead and that makes BIOS go wacky (because BIOS uses NVRAM to store settings and now NVRAM lost its power source)
  8. The PSU in a  desktop is bad, or some card or device on the motherboard, is shorting out. (we strip the PC down to find if any thing is shorting and overloading the PSU or REGS (VRM) {#4}
  9. The Laptop can do the same thing as just above, even the AC  line power pack can be bad. (replace it if suspected some are only $8 to buy new.) {#5}Some older laptops need 90watt pack to run right.
  10. The OS can be fully corrupted, (XP loves  to) This rare. Boot to any Linux live demo CD or USB boot stick, if PC shuts off still now ,then you know it is hardware failure!  5 minutes work with linux demo media in hand.
  11. There sure are other odd and rare failures, one persons, power switch was a wreck (cracked) and full of coffee spills, no need to dwell on such a simple failure. (new switch time) (some switches crack and short out)
  12. One more, the laptops, the DC power jack is bad 2 ways, ( the end is cracked, or inside the wire to the jack is cracked) If no battery (step2 above) the laptop goes dead instantly , if this jack fails.
  13. Last but not least, if the PC was made before year 2010 (or at) the PC screen has CCFL lamps, use a flash light to see if it really is shutting down, in this case it is not, just the screen backlamps went dead. Not the PC dead at all, just the LCD is dead, due to dead CCLF lamps.

There are 3 top causes, of this problem, in the macro sense: (besides overheated)
  • Lost AC or DC power at any rail or regulator and down it goes. (lost power or a short causing a regulator to shut down by design, ending that nasty guy Mr, fire)
  • Not only can power be shorted, but so can , address, data and control lines in any PC be shorted, and to find those we remove all modules first. see strip down link above.
  • The ICH chip (as seen here)  in the PC controls power on and off, 2 ways, the power switch closes or or Windows for any reason does a soft power off command to it and  so can BIOS.
If you wanted you can even remove the power switch while on, and see if the PC still shuts off by itself.
You can boot to linux CD and prove the hardware is good or bad in minutes work (1 hour if it take that long as over heating might do)
To find overheating failures we run HWinfo32.exe portable and free and fully SAFE !, to see how
hot things get inside the PC, 60C is par, 80c or more is NO GOOD.

See this fun video of Intel guy shorting DDR ECC ram data lines and the PC keeps running, love this video I do. My HP Z600 can do this.
For sure your cheap PC can't not do that, but mine can.
If say the RAM dies, the PC many shut off, (for sure if RAM overheats and then cools off and runs again)

Some say your PC shuts down and is not true at all. (or loops per below)
Some PCs if the Windows start up file fail the BIOS detects this and LOOPS, it boots,fails,boots fails endlessly, and can be a bad HDD.
No if the fans stay on the PC is not shut down. (screen  goes dead is not shut down)
Just because windows screens are dead does not mean the PC is dead nor shut down, if BIOS works the PC is not shut down. (check out your BIOS screens)
If the HDD goes dead or corrupted, the BIOS will halt (or loop) and shows the BIOS page 1, this is and attempt by BIOS to tell you NO BOOT device found.

My PC fails to boot  and loops never ever running windows fully(this is caused by a dead HDD, or the OS on said HDD is corrupted (HDD or SSD or M.2 boot media) the cure is simple reload the OS, (Do HDD first)
If HDD test pass, put  windows into safe mode next.

Footnotes: {#n}
  1. Windows 10 also has over 100 BSOD screens (blue screens of death and shuts down)
  2. The newer Laptops/Note pads the makers moved this battey inside, the Casing and must be opened and disconnected now. (if scared, have shop fix your  PC)
  3. The BIOS usually only shuts down if the PC overheats, ever clean your PC,or remove laptop from that blanket? BIOS even runs with no HDD/SSD installed at all. (yes this is a test too)
  4. The PSU shuts down for all shorts, (measured) and this is normal for shorts, the technician know this and does full fault isolation tests and PSU test too prove this case.
  5. The laptop/notebook has an AC power pack on the outside of the PC and can be bad, or the wrong pack, it costs as low as $8 to replace it; (some are weak or have noisy cap.s inside) or 60watt is not enough.

Factoid: #1, Desktops have standards, called ATX and more, and Laptops do not, so Laptops (and notebooks/Pads/etc) are all non standard, (nothing is more true than dismantlement in this regard)
Laptop repairs takes skills, to learn that there are screws to remove some hidden or must done in ORDER.
Then some have hidden magic casing snaps, to take any notbook apart.
The last is , there are 3 kinds of ribbon cable connectors that love to break in unskilled hands:
 (hinge type, wedge type or push/pull type ribbon cable connectors exist or all 3 in one PC, no not force them or they break and now a new $300 motherboard is needed. (I warned you)
PC's fail for these top 3 reaons, bad laptop battery, bad "RTC coin cell battery" (5-7year spec. life span) the HDD goes dead.  (or if XP? it  is fully  hopelessly virus infected)

All possible causes . (true shut downs, not sleep sure if drivers are wrong sleep sure can hang  in sleep mode or hibernate)
  • Windows 10 stinking forced updates (30 minutes of reboots over and over....)
  • Overheating CPU slows then shuts down all by itself.
  • PSU overload or the motherboard sees VRM  regulators overload.
  • Windows gross corruption or virus infected (boot to linux demo disk and see  if PC is ok now)
  • BIOS sees fans dead,or overheating; bam shuts down.
  • Some one created a Windows, Task Scheduler(script) with the commAND shutdown there.
  • BIOS went nuts, due to dead RTC coin cell battery.
  • Bad RAM or RAM DDR overheated
  • Any of 10 or more modules inside the PC shorting (overload) for  many reasons, they are bad or overheated.
  • AC line power loss and recovers
  • That huge laptop battery is not only bad but shorted, overloading critical power rails.
One thing  person can do is read the windows event logs. See if a power down event (or Restart)  happened and unexpected by you.

version 3  11-9-2018