If your Windows 11 PC goes dark after a few minutes, it’s usually going to sleep. Open Settings > System > Power & battery, expand Screen, sleep, & hibernate timeouts, and set the sleep options to Never. If the PC shuts off completely without warning, a hibernate timer, an update restart, overheating, or a power problem is the more likely cause, and the sections below cover each one.
These steps apply to Windows 11 Home and Pro on laptops and desktops. On older Windows 11 builds, the timeout section is called Screen and sleep, and on a desktop without a battery the page may be called Power instead of Power & battery.
Figure Out What’s Happening First
“Turning off” can mean a few different things, and each has its own fix. Match what you see to the right section:
| What you notice | Likely cause | Where to fix it |
|---|---|---|
| Screen goes black, but lights or fans stay on, and a key press brings it back | Screen timeout or sleep | Stop the PC From Sleeping |
| PC is off after you leave it, and your open apps are gone when you turn it on | Hibernate timer or a scheduled shutdown | Turn Off the Hibernate Timer, Cancel a Scheduled Shutdown |
| PC restarts overnight and shows “Working on updates” | Windows Update restart | Stop Restarts for Updates |
| Power cuts out instantly, often during games or heavy work | Overheating, power supply, or hardware | If the PC Shuts Off Suddenly |
If you’re not sure, check the Windows event log, described in Find Out Why Windows Shut Down. It records whether the PC shut down normally, was told to shut down by an app, or lost power.
Stop the PC From Sleeping
- Press Windows key + I to open Settings.
- Select System, then Power & battery.
- Expand Screen, sleep, & hibernate timeouts. On older versions it’s called Screen and sleep.
- Open the menu next to Make my device sleep after and choose Never, or a longer time. Laptops show separate settings for On battery and Plugged in, so set both if you want the PC to stay on either way.

- If the screen going dark is the problem, also change Turn my screen off after to a longer time. The PC keeps running while the screen is off.
Windows saves the change right away, so you can close Settings.
Newer PCs sleep sooner than you might expect. Microsoft’s power settings guide lists these defaults:
| Setting | Modern Standby PCs | Older (S3) PCs |
|---|---|---|
| Screen off, on battery | 3 minutes | 3 minutes |
| Screen off, plugged in | 5 minutes | 5 minutes |
| Sleep, on battery | 3 minutes | 10 minutes |
| Sleep, plugged in | 5 minutes | 15 minutes |
With sleep set to Never or a longer time, the PC stays on while you step away. To change only when the display turns off, adjust the screen timeout in Windows 11.
If you’d rather let the PC sleep and wake it from another device when you need it, you can enable Wake-on-LAN in Windows 11.

Turn Off the Hibernate Timer
Hibernate saves your open work to the drive and then powers the PC off completely. From the outside, a hibernating PC looks exactly like one that shut down on its own. If your apps come back when you press the power button, it was hibernating. If they don’t, see the shutdown sections below.
- Go to Settings > System > Power & battery and expand Screen, sleep, & hibernate timeouts.
- If you see Make my device hibernate after, set it to Never for both On battery and Plugged in. Not every PC shows this option.

If there’s no hibernate option in Settings, check the older Control Panel settings, where the hibernate timer can still be set:
- Press Windows key + R, type control, and press Enter to open Control Panel.
- Select Hardware and Sound > Power Options, then Change plan settings next to your current plan.
- Select Change advanced power settings.
- Expand Sleep, then Hibernate after. Set the value to 0, which Windows shows as Never.

- Select OK.
While you’re in that window, check Sleep after as well. The steps for changing advanced power settings in Windows 11 explain the rest of the list. For when each mode makes sense, see sleep vs. hibernate in Windows 11.
Reset your power plan if settings seem to be ignored
If an app or an old tweak changed your power plan, you can put every plan back to the Windows defaults. This undoes any custom power settings you made.
- Right-click Start and select Terminal (Admin).
- Type powercfg -restoredefaultschemes and press Enter.
- Set your sleep and hibernate times again using the steps above.
Stop Restarts for Updates
Windows restarts on its own to finish installing updates. Active hours tell it when not to.
- Open Settings > Windows Update > Advanced options.
- Select Active hours.
- In the Adjust active hours drop-down, choose Automatically to let Windows learn when you use the PC, or Manually to set the hours yourself.

Per Microsoft’s active hours guide, Windows uses these hours to avoid inconvenient restarts for updates.
If you need the PC to stay on through a long job, you can pause updates. Go to Settings > Windows Update and choose a pause length or end date with Pause updates. Microsoft’s pause updates article says you can pause for up to 35 days, and the PC won’t restart to finish updates until the pause ends. Updates resume automatically after that. For other options, you can stop automatic updates in Windows 11.
Cancel a Scheduled Shutdown
A shutdown timer set with a command, a downloaded tool, or a scheduled task can turn the PC off at a set time.
Cancel a countdown in progress. If Windows warns that it will shut down in a few minutes, open Terminal or Command Prompt, type shutdown /a, and press Enter. Microsoft’s shutdown command reference notes that this only works during the countdown, before the shutdown actually starts.
Look for a scheduled task.
- Select Start, type Task Scheduler, and open it.
- Select Task Scheduler Library in the left pane.
- Select each task you don’t recognize and check its Actions tab. A task that runs shutdown.exe or a shutdown tool will turn the PC off on a schedule.
- Right-click a task you don’t want and select Disable. Disabling is safer than deleting, because you can turn it back on later.
Some PC maker apps and backup tools have their own “shut down when finished” option. Check the settings of any app that was running when the PC turned off.
Keep the PC Awake Without Changing Settings
If you only need the PC on for a download or presentation, Microsoft’s free PowerToys includes Awake, which keeps the computer awake without changing your power plan. Turn on Enable Awake in PowerToys Settings, then pick a mode:
- Keep awake indefinitely until you turn it off.
- Keep awake for a time interval, then go back to normal.
- Keep awake until expiration, a date and time you set.
By default the screen can still turn off, so turn on Keep screen on if you need the display. You can also change modes later by right-clicking the Awake icon in the system tray. Microsoft notes Awake only works while you’re signed in, not at the lock screen.

Find Out Why Windows Shut Down
Event Viewer keeps a record of every shutdown, so you can tell a crash from a normal shutdown.
- Right-click Start and select Event Viewer.
- Expand Windows Logs and select System.
- Select Filter Current Log in the right pane.
- Type 41,1074,6008 in the Includes/Excludes Event IDs box and select OK.
- Look for entries at the time the PC turned off. The General and Details tabs of each entry are explained in this Event Viewer walkthrough for Windows 11.

Here’s what each event means, based on Microsoft’s Event ID 41 troubleshooting article:
| Event | What it means | What to check |
|---|---|---|
| 1074 | An app or a person started the shutdown or restart | The entry names the program, such as an update service or a shutdown tool |
| 6008 | The previous shutdown was unexpected | Its time tells you when the PC really turned off |
| 41 (Kernel-Power) | Windows restarted without shutting down cleanly | Power, heat, a crash, or the power button being held down |
If Event 41 shows a BugcheckCode of 0, Windows didn’t record a crash code, which often points to lost power. The steps for checking crash logs in Windows 11 explain these event IDs, and how to check error logs on Windows 11 covers the rest of the log.
If the PC Shuts Off Suddenly
When the power cuts out with no warning and Event 41 or 6008 shows up, the cause is usually outside Windows’ power settings.
- Overheating: clean dust from the vents and keep laptops on a hard surface. A PC that shuts off during games or heavy work is often too hot. Check your CPU temperature in Windows 11 and how to control your laptop fan.
- Power: check the power cable, power strip, and wall outlet. Plug the PC straight into a wall outlet to rule out a failing surge protector. On a laptop, a worn battery or the wrong charger can cut power even while it’s plugged in.
- Power supply: a desktop power supply that’s failing or too small for its graphics card can shut the PC off under load. An underpowered or faulty power supply is a common cause of Event 41.
- Power button setting: make sure the button isn’t being pressed by a case or cover. Its action is set in Control Panel > Power Options > Choose what the power buttons do.
- Overclocking and memory: turn off any overclocking and run a memory test. Search for Windows Memory Diagnostic in Start and select Restart now and check for problems.
- Drivers and updates: install pending updates in Settings > Windows Update, including driver updates under Advanced options > Optional updates, and check your PC maker’s site for BIOS and chipset updates.
If the shutdowns continue after these checks, have the PC looked at by the manufacturer or a repair shop, since a failing power supply or motherboard can’t be fixed with settings.
How to Confirm It Worked
Leave the PC idle for longer than your old sleep time, with a few apps open. If it’s still on and the apps are still open when you come back, the timers were the cause. To undo the change later, return to Screen, sleep, & hibernate timeouts and pick a shorter time.
Unexpected Shutdown Questions
Is it bad to set sleep to Never?
It doesn’t harm the PC, but it uses more power, especially on laptops. Set a long time instead if you only need it to stay on during certain tasks, or use PowerToys Awake for one-off jobs.
Why does my PC turn off even though sleep is set to Never?
The screen may be turning off while the PC stays on, so set the screen timeout to a longer time too. If the PC really powers down, check the hibernate timer, Windows Update restarts, and Event Viewer as described above.
Why does my PC shut down at night?
Overnight shutdowns are usually a hibernate timer or an update restart. Event 1074 in Event Viewer names the program that started a shutdown, so you can tell an update restart from a shutdown tool or scheduled task.
Can an app keep my PC awake?
Yes. Video players and presentation apps usually keep the screen on while they’re active. Microsoft PowerToys has an Awake tool that keeps the PC on without changing your power settings.
Does closing the laptop lid turn it off?
Closing the lid puts most laptops to sleep. You can change that in Control Panel > Power Options > Choose what closing the lid does, where you can pick a different action for On battery and Plugged in.

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are checked step by step against the device or app maker’s own documentation and tested on his own devices whenever he has the hardware or software, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.