Windows 11 may automatically shut down after a period of inactivity, interrupting your workflow or causing unsaved data loss. This behavior typically occurs due to specific power settings or scheduled tasks configured within your operating system. Adjusting these settings can effectively resolve this issue, allowing your PC to remain active even when idle.
Method 1: Adjust Power and Sleep Settings
Step 1: Click on the Start menu and select Settings (gear icon). Alternatively, press Windows key + I
to quickly open Settings.
Step 2: In the Settings window, click on System, then choose Power & battery from the left pane.

Step 3: Under the Screen and sleep section, you'll find several drop-down menus. Set each dropdown option (e.g., "On battery power, put my device to sleep after" and "When plugged in, put my device to sleep after") to Never. This prevents your system from automatically sleeping or shutting down due to inactivity.

Step 4: Scroll down to the Power mode section and select Best performance to ensure your system prioritizes performance over power-saving measures that might trigger auto shutdown.

After changing these settings, close the Settings app and restart your computer to apply the changes.
Method 2: Modify Advanced Power Plan Settings
Step 1: Press Windows key + R
to open the Run dialog box. Type control.exe powercfg.cpl,,3
and press Enter. This will open the "Advanced Power Options" window directly.

Step 2: In the Advanced Power Options window, expand the Sleep option by clicking the plus (+) icon. Under this, expand Sleep after and set both "On battery" and "Plugged in" settings to Never.

Step 3: Next, expand the Hibernate after option and set both "On battery" and "Plugged in" settings to Never as well. This prevents Windows from entering hibernation mode automatically.

Step 4: Finally, expand Allow hybrid sleep and set it to Off for both "On battery" and "Plugged in" modes. Click Apply, then OK to save your changes.

Restart your PC to ensure these advanced power settings take effect.
Method 3: Disable Scheduled Shutdown Tasks
Sometimes, Windows 11 may have scheduled tasks that trigger automatic shutdowns after inactivity. Disabling these tasks can resolve the issue.
Step 1: Press Windows key + S
to open the search bar, type Task Scheduler and press Enter to launch it.

Step 2: In Task Scheduler, navigate to Task Scheduler Library > Microsoft > Windows > UpdateOrchestrator. Here, look for tasks named "Reboot," "Shutdown," or similar.

Step 3: Right-click on each relevant task and select Disable. If prompted for administrator permission, click Yes to confirm.

Step 4: Next, navigate to Task Scheduler Library > Microsoft > Windows > WindowsUpdate. Check for similar tasks that may trigger automatic shutdowns, right-click, and disable them as needed.
Once done, close Task Scheduler and restart your computer to apply the changes.
Method 4: Use Command Prompt to Disable Auto Shutdown
If the above methods don't resolve the issue, you can manually disable any scheduled shutdown commands using Command Prompt.
Step 1: Click on the Start menu, search for Command Prompt, right-click it, and select Run as administrator.

Step 2: In the Command Prompt window, type the following command and press Enter:
shutdown /a

This command aborts any scheduled shutdown tasks currently active on your system.
Step 3: Next, enter the following command to check if any shutdown tasks are scheduled:
schtasks /query | find "shutdown"

If any shutdown tasks appear, you can disable them individually using Task Scheduler as described in Method 3 above.
Close the Command Prompt window and restart your PC to confirm the changes.
After implementing these methods, your Windows 11 PC should no longer shut down automatically when idle. Regularly checking your power settings and scheduled tasks ensures your system stays active and responsive as needed.
Member discussion