水曜日, 12月 16, 2015

How to prevent Windows 10 waking from sleep when traveling in bag? - Super User

How to prevent Windows 10 waking from sleep when traveling in bag? - Super User



Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
I am not turning laptop off, but rather putting into hibernation, as it starts much faster and I can continue working without starting all apps again.
It was working long time from Windows XP to Windows 8.1.
However now (after upgrade to Windows 10), when I just take my laptop out of the bag after a travel, it was quite hot. I've realized that it is turned on.
In the event log I have found that it was installing updates and before that there was the following log:
The system has returned from a low power state.
Sleep Time: ‎2015‎-‎08‎-‎16T12:55:18.180075900Z Wake Time: ‎2015‎-‎08‎-‎16T12:55:17.852758500Z
Wake Source: Unknown, but possibily due to timer - Windows will execute 'NT TASK\Microsoft\Windows\UpdateOrchestrator\Reboot' scheduled task that requested waking the computer.
When I located the task above in the task scheduler, it has trigger in that time, however the "last run time" is day before. So I do not know what to believe "last run time" or the wake source from the event above?
How to find out what is waking the computer from the hibernation (it is possible?) and how to prevent it?
shareimprove this question
This has worked for me so far. Go to:
Control Panel\Hardware and Sound\Power Options\Edit Plan Settings
Click "Change advanced power settings"
Go to "Sleep->Allow wake timers" and change the setting to Disable.
power options screenshot 1
UPDATE: As Erik pointed out, there can be two options:
power options screenshot 2 with 2 options
Disable them both.
shareimprove this answer
   
Thanks, I try that. – TN. Aug 22 at 19:40
2 
Didn't work for me, that was already disabled, and Windows update woke up my PC anyway – Erik Sep 10 at 6:15
1 
Use "powercfg -waketimers" to check for presence of any other wake timers. Some versions of Spotify and TeamViewer are reported to create wake timers as well. However, I also have issue of Windows 10 ignoring disabled wake timers. – voldemarz Sep 23 at 21:53 
   
For anyone reading this, Spotify fixed the bug that made it create wake timers a few weeks ago. – GodsmithNov 2 at 20:38
After upgrading to Windows 10, the computer in my bedroom kept waking me up at 3AM. Disabling Wake the computer on the Microsoft\Windows\UpdateOrchestrator\Reboot scheduled task didn't help. Windows turns the flag back on periodically. Even disabling "Disable wake timers" in Power Options didn't help. The UpdateOrchestrator kept orchestrating midnight alarms.
As a solution I've added a powershell script that removes wake settings every hour.
  1. To allow running powershell scripts: run powershell as administrator, and run:
    Set-ExecutionPolicy RemoteSigned
  2. Create a file called "disable_wakejobs.ps1" that contains one line of code:
    Get-ScheduledTask | ? {$_.Settings.WakeToRun -eq $true -and $_.State -ne "Disabled"} | % {$_.Settings.WakeToRun = $false; Set-ScheduledTask $_}
  3. Open Task Scheduler and create a scheduled task.
  4. In the "General" tab, set the user account to "SYSTEM" user (or you'll have to update a saved password every time you change your own password.)
  5. In the "Triggers" tab, create a trigger that runs the job daily and repeat every hour.
  6. In the "Actions" tab, create an action to "Start a program", with "Program/script" set to "PowerShell.exe", and arguments -Command "c:\tools\disable_wakejobs.ps1" (change the path to where you stored disable_wakejobs.ps1 in step 2.)
The PowerShell commands come from this blog post by Reidar Johansen.
shareimprove this answer
   
I get an error running this: Set-ScheduledTask : The parameter is incorrect. At C:\Users\Filip\scripts\disable_wakejobs.ps1:1 char:123 + ... Disabled"} | % {$_.Settings.WakeToRun = $false; Set-ScheduledTask $_} + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Set-ScheduledTask], CimException + FullyQualifiedErrorId : HRESULT 0x80070057,Set-ScheduledTask – Godsmith Oct 6 at 16:33
   
None of the other solutions worked for me so I'm hoping this does the trick! Hacky, but whatever I can do to not have my PC turn on in the middle of the night, I'll do. – GotDibbs Dec 1 at 1:10
   
How crazy is that? You cannot even rely on the settings anymore and they got resetted. Is microsoft out of their mind? It's totaly unreliable. – t3chb0t Dec 8 at 13:51
   
I see no way to set the user account to "SYSTEM" user in step 4. – Castaa Dec 12 at 0:46

0 件のコメント: