A computer can automatically restart due to either software issues or hardware failure. One common cause of an automatic restart is when an operating system (OS) has downloaded a critical update that has to be applied immediately. Other automatic restarts can be due to software crashes, in which case a screen may be shown to indicate what failed. A computer can also automatically restart due to hardware failures, such as a problem with the central processing unit (CPU), graphics processing unit (GPU), or power supply unit (PSU). Inoperable fans, poor heat sink contact, or excess dust can all result in enough heat to cause a shutdown.
Some operating systems are designed to automatically restart when a critical update or patch has been downloaded and is ready to install. The OS may give the user an option to postpone the restart, though it is typically not possible to disable the process. Disabling automatic restarts altogether is often possible, though the process varies from one OS to another and even between versions. It is sometimes an option in the update manager, though in other cases more advanced techniques, such as editing the registry, are required.
Other software related reasons for a computer to automatically restart are typically related to a failure of some kind. A driver crash may cause an automatic restart, though any number of other failures can as well. If a computer is automatically restarting on a regular basis, there may be some type of virus or malware. In this case, it can be a good idea to run a variety of different programs to detect the presence of malicious software.
Hardware failures can also cause a computer to automatically restart. If the computer has any way of monitoring the temperature of components, such as the random access memory (RAM), CPU, and GPU, that is one place to start investigating. These temperatures may be observed to determine if one is abnormally high at the time of an automatic restart, in which case that component is the likely culprit. A bad heat sink or inoperable fan can cause some of these components to overheat, though the component itself may require replacement.
A power supply unit can also cause a computer to shut down if it is not providing enough electricity to the various components. This situation often occurs after new components have been installed because advanced video cards and other upgrades can draw a substantial amount of power. It is also possible for a power supply unit to stop working correctly due to age or failure of internal components. Dust can also create excess heat in power supplies in addition to various other parts of a computer, which may lead to automatic shutdowns or premature component failure.