Stability · Windows 11
Diagnose a PC that randomly restarts or shuts down
The screen goes black mid-task and the machine restarts — or never wakes up until you press power. Random restarts feel like one fault but have five common causes, and Windows has already written down which family yours belongs to. This guide starts with that record, then works heat, memory, and power before touching a single driver.
What you need
- Rough times for two or three restarts. "During games, around 9 pm, twice this week" is enough — you will match them against the log in the first step, and the pattern (under load, or idle, or random) is half the diagnosis.
- A can of compressed air and a screwdriver, for desktops. Only for the cleaning and reseating steps later; nothing gets opened in the first half of this guide.
- An hour of machine time for the memory test. It runs outside Windows and the PC is unusable during it, so start it when you can spare the machine.
Start with the event log
Every unexpected shutdown leaves the same entry behind. Reading it splits the whole problem in two before you touch a screw.
- Open Event Viewer. Right-click the Start button and choose Event Viewer. Open Windows Logs > System in the left pane.
- Find the Kernel-Power entries. Look for events with source Kernel-Power and Event ID 41, at the times the machine came back up after a restart. A nearby Event ID 6008 ("the previous system shutdown was unexpected") confirms the moment it died.
- Open one and read the BugcheckCode. Double-click the Event 41 entry and go to the Details tab. If BugcheckCode has a number other than 0, Windows crashed with a stop error (a blue screen you may never have seen) and recorded the code — search that code and jump to the software section. If BugcheckCode is 0, no crash was recorded: the machine lost power, froze solid, or was cut off before it could write anything. That points at hardware — heat, memory, power — which is where this guide goes next.
Event 41 only proves the shutdown was not clean; it is a symptom, not a culprit. Microsoft's own troubleshooting splits it exactly this way: a bug check code means chase the crash, and no code means chase the hardware. Do not let a search result sell you a registry cleaner for it.
Rule out heat
A processor or graphics card that overheats protects itself the only way it can: it cuts power instantly, which produces Event 41 with a bug check code of 0 and a machine that dies under load but idles all day.
- Match the pattern. Restarts during games, video renders, or summer afternoons — but never while browsing — is the heat signature. Restarts in the first minute after a cold start, or at random idle moments, usually are not.
- Check the fans and the vents. With the machine running, confirm every fan spins: case fans, the CPU cooler, the graphics card. Look at the intake vents and filters. A felt-like mat of dust on a filter starves everything behind it.
- Clean it, powered off and unplugged. Blow dust out of heatsinks, fans, and vents with compressed air in short bursts, holding fan blades still with a finger so they do not overspin. Desktops: take the side panel off outside or over a bin; there is more dust than you expect. Laptops: blow through the vents, and use it on a hard flat surface so the underside intakes can breathe.
- Retest under the same load. Run the game or task that used to kill it. Surviving the exact workload that reliably caused the shutdown is real evidence; an hour of idling proves nothing.
Test the memory
Failing RAM produces restarts that look random because they are — the crash comes whenever the bad cell is used, which might be twice an hour or twice a week. It can leave a bug check code, or none.
- Run Windows Memory Diagnostic. Type Windows Memory Diagnostic into the Start menu, open it, and choose Restart now and check for problems. The test runs before Windows loads. When the PC restarts afterwards, the result appears as a notification after you sign in; a clean pass says no errors were detected.
- If errors appear — or the test itself crashes — isolate the stick. On a desktop, power off, unplug, and remove all but one memory stick, then test again. Work through the sticks one at a time in the same slot. A stick that fails alone is the fault; if every stick fails in one slot but passes in another, the slot (and board) is the problem, not the memory.
- Reseat even if the test passes. Pull each stick and click it back in firmly. Marginal contact in a slot causes exactly this fault class and costs nothing to rule out while you are there.
Suspect the power supply
On desktops, an ageing power supply is the classic cause of restarts that get stranger over months: fine on the desktop, dead the moment the graphics card draws real power, then dead at random as it weakens.
- Check the simple path first. Wall socket straight into the PC for a test day — no power strip, no extension lead, no tired UPS battery in between. Try a different kettle-style power cord if one is handy.
- Reseat the internal cables (desktop, unplugged). The thick 24-pin main connector, the 4/8-pin CPU connector near the processor, and the PCIe power connectors on the graphics card. Press each home; a connector a millimetre out causes load-dependent restarts.
- The definitive test is a swap. A known-good power supply of equal or higher wattage, borrowed or bought returnable, settles it: if the restarts stop completely, the old unit was dying. Never open a power supply itself — the capacitors inside hold a dangerous charge long after unplugging. Replacement is a whole-unit job, and on a laptop the equivalent suspect is the charger: test with the maker's original or a correct-spec spare before anything else.
Drivers, updates, and overclocks
Work this section when the event log showed a bug check code, or after the hardware checks above come back clean.
- Undo any overclock. If the CPU, graphics card, or memory is overclocked — including the one-click XMP or EXPO memory profile in the BIOS/UEFI settings — return everything to stock speeds and defaults for a week. Memory running past its stable speed is a leading cause of code-less random restarts, and Microsoft's Event 41 guidance names overclocking as one of the first things to rule out.
- Refresh the drivers that matter. Get the chipset and graphics drivers from the PC or component maker's site, not a driver-updater app. Install, restart, and give it days under the usual workload.
- Use Safe Mode as the divider. Boot into Safe Mode (Settings > System > Recovery > Advanced startup, then Startup Settings, then press 4) and use the machine there for a while. Stability in Safe Mode points at a driver or startup program; a machine that dies in Safe Mode too is telling you the fault is hardware.
- Catch the blue screen instead of the restart. If Windows flashes a blue screen too briefly to read, turn off the automatic restart: search Start for View advanced system settings, open the Advanced tab, choose Settings under Startup and Recovery, and untick Automatically restart. The next crash stays on screen with its stop code, which is the one searchable fact you need.
End state
- The machine runs the workload that used to kill it — game, render, full workday — repeatedly, without a restart.
- No new Event ID 41 entries appear in the System log across that period.
- You can name the cause and the evidence for it: the clogged cooler, the stick that failed alone, the power supply the swap condemned.
- If nothing was found faulty, the machine is clean, reseated, at stock speeds, and on current drivers — and you have the event log habit for next time: check BugcheckCode first.
When it goes wrong
- There is no Event 41 at all. A completely dead machine that will not even restart on its own — no log entry, no signs of life — is a power-path problem: socket, cord, charger, or power supply. Work the power section and skip the rest.
- Restarts happen only in one program. Note it and treat that program as the trigger, not necessarily the cause: one heavy game is often just the first workload hot or power-hungry enough to expose the hardware fault above.
- The memory test passes but the restarts continue. A pass rules out obvious memory failure, not marginal memory. The one-stick-at-a-time test under real load is the stronger check, followed by the power supply swap.
- A laptop dies and the case near the battery is bulging. Stop using it on charge and treat the battery as the fault: a swollen battery is a replacement part, not a settings problem, and it can cause exactly these shutdowns as it lifts and strains the board.
Sources
- Microsoft Learn, Event ID 41: "The system has rebooted without cleanly shutting down first" — the bug check code scenarios, and the advanced checks for overheating, overclocking, memory, and power supply.
- Microsoft Support, Windows startup settings — reaching Safe Mode through Startup Settings.