This issue could be caused by any of the below possibilities.
- Heat related issue.
- Hardware issue or error.
- Computer virus.
- Issue with operating system.
- Other failing hardware
Additional information:
This document is about computers that completely turn off; if your computer is turning off and then back on (restarting), please see document CH000605.
Some of the below steps in the answer require you open your computer and remove hardware devices. While in the computer, make sure you're aware of ESD.
Answer:
Heat related issue
A computer that turns off without warning is often a heat related issue. Many computers today are designed to turn off or automatically reboot if the computer, processor, or other device in your computer gets too hot. If you have heard any abnormal noises coming from your computer recently such as a high squealing, this could indicate a fan may be failing in your computer.
You can first start by verifying the fan on the power supply is working by examining the back of the computer and seeing if the fan is moving and moving smoothly. For all other fans in the computer, you will need to either open the computer and make sure the fan are working (processor fan and case fans) and/or if your BIOS monitors the RPM of the fans, enter BIOS and make sure the BIOS does not report any errors.
While inside the computer it's also a good idea to verify the processor heatsink is properly connected by disconnecting and reconnecting the heatsink. If the processor heatsink is not properly it will not keep the processor cool causing the computer to overheat.
Users may also be able to determine how hot their computer is by onboard thermal sensors. If your computer comes equipped with these sensors, make sure your CPU is not running to hot; additional information about how hot your CPU should be running can be found on document CH000687.