Windows 11 restarts automatically after shutdown

shura

Well-known member
Joined
Feb 2, 2014
Posts
100
This is very strange. I have no automatic restart in my startup and recovery options, sfc and chkdsk all clear. Seems like a real problem to me -- file collection is attached. Thanks a lot!
 

Attachments

UPD: this was a wake on LAN issue. Disabling it stopped the restarts, but is there a way to see which local IP caused them?
 
Open an elevated Powershell prompt. Copy and past

Get-ScheduledTask | where {$_.settings.waketorun} |out-file $home\tasks.txt
notepad $home\tasks.txt


Hit enter, notepad should open with what is scheduled to wake.
 
Last edited:
Open an elevated Powershell prompt. Copy and past

Get-ScheduledTask | where {$_.settings.waketorun} |out-file $home\tasks.txt
notepad $home\tasks.txt


Hit enter, notepad should open with what is scheduled to wake.
C:\Windows\System32>Get-ScheduledTask | where {$_.settings.waketorun} |out-file $home\tasks.txt
'Get-ScheduledTask' is not recognized as an internal or external command,
operable program or batch file.
 
And here's something else funny: I re-enabled wake on lan and it still shuts down normally now.
 
This is a new build with all the parts still within their return/exchange periods, so I would really like to get to the bottom of this. The fact that restarting stopped (for now) after I disabled WOL could have been a coincidence. Any and all insight will be greatly appreciated.
 
Run the command in an elevated PowerShell prompt. You'll need to hit enter.
I tested it on my PC, it works.

Hit Start, type Poweshell, choose Run as Administrator.
 
TaskPath TaskName State
-------- -------- -----
\Microsoft\Windows\.NET Framework\ .NET Framework NGEN v4.0.30319... Disabled
\Microsoft\Windows\.NET Framework\ .NET Framework NGEN v4.0.30319... Disabled
\Microsoft\Windows\InstallService\ WakeUpAndContinueUpdates Disabled
\Microsoft\Windows\InstallService\ WakeUpAndScanForUpdates Disabled
\Microsoft\Windows\SharedPC\ Account Cleanup Disabled
\Microsoft\Windows\UpdateOrchestrator\ Schedule Wake To Work Disabled
 
Are you still having issues? It could simply have been a Windows update waking the machine up.

Another command you can run in the command prompt (not PowerShell)

To see what last woke your system.


powercfg -lastwake


And to see what's able to wake your system.

powercfg -devicequery wake_armed


This is the list of commands you can use to check the sleep/wake states of your PC.

Powercfg command-line options
 
The whole thing felt like the machine shut down with all fans stopping and then the power button was pressed a second later. I am not having issues anymore, but I really want to know what caused restarts earlier. As I said above, the problem has not reoccurred after I disabled WoL -- didn't happen even after I reenabled for about a day. Right now, WoL is disabled for good, at least I think it's disabled because sleep and shutdown cause the this ethernet's adapter LED on my Netgear router to be completely off instead of solid orange when WoL was enabled. I don't see a manual WoL setting in the BIOS, so I assume that windows passes that setting to the motherboard.

I absolutely accept that tracking the issue may not be possible at this point.

C:\Windows\System32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Device
Instance Path: PCI\VEN_8086&DEV_7AE0&SUBSYS_50071458&REV_11\3&11583659&0&A0
Friendly Name: Intel(R) USB 3.20 eXtensible Host Controller - 1.20 (Microsoft)
Description: USB xHCI Compliant Host Controller
Manufacturer: Generic USB xHCI Host Controller

C:\Windows\System32>powercfg -devicequery wake_armed
HID Keyboard Device
HID-compliant mouse
HID-compliant mouse (001)
HID Keyboard Device (004)


This is after disabling WoL. Before then, my network adapter was on the second list. I wasn't smart enough to issue powercfg -lastwake right after the first restart, but if it happens again, I will.
 
Also, to be clear, this wasn't one occurrence. It happened consistently over a period of maybe 40-50 minutes, during which I was reading online and running things like sfc and chkdisk, so there would be 10-20 minutes between occurrences. It stopped after I disabled WoL and didn't happen again even after I reenabled it (but it is back to disabled for good now). Hasn't happened since.
 
Two reasons from my recent memory. 1. Caused by Fast Startup. 2. A program hangs on during shutdown even though everything appears closed. The second one requires 3 total restarts to clear.
 
Two reasons from my recent memory. 1. Caused by Fast Startup. 2. A program hangs on during shutdown even though everything appears closed. The second one requires 3 total restarts to clear.
I have never, ever seen anything like this. Was this Win11?
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top