My computer wakes up from standby in the middle of the night and doesn't want to remain standby
Solution 1
As suggested by David, powercfg /waketimers
showed the following output
C:\WINDOWS\system32>powercfg /waketimers El temporizador establecido por [SERVICE] \Device\HarddiskVolume4\Windows\System 32\svchost.exe (SystemEventsBroker) expira a las 23:35:31 el 08/01/2017. Motivo: Windows ejecutará la tarea programada 'NT TASK\Microsoft\Windows\Windo wsUpdate\AUScheduledInstall' que solicitó la reactivación del equipo.
And a Google search pointed to this Microsoft answer:
Basically two solutions are provided:
Method 1:
Follow the steps to detect and disable the device using Command Prompt (admin):
Press Windows+X keys and select Run as administrator.
Type the following command and hit Enter:
Powercfg -devicequery wake_armed
You will get the name/names of the devices. To disable a specific device from waking the computer, run the following command:
Powercfg -devicedisablewake "devicename"
Note: Make sure that you replace the “devicename”placeholder with the name of the device that you want to disable. If this issue still occurs after you disable one device, disable the devices in this list one by one until you determine which device is causing the issue. If you want to re-enable a device to wake the computer, run the following command:
Powercfg -deviceenablewake "devicename" command.
If the issue still persists, proceed further to the next method.
Method 2:
Let's disable the option in Group Policy to avoid wake up patters of the computer through scheduled tasks:
Press Windows+R keys and select "gpedit.msc".
Navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update.
Modify the "Enabling Windows Update Power Management to automatically wake up the system to install scheduled updates" policy.
Select Disabled from the list of options in this interface.
If you are unable to use the Group Policy Editor method or it's not available in the current version of Windows, use may use the Registry Editor method: Disclaimer: Please make sure that you backup the registry before proceeding with the steps mentioned below:
Press Windows+R keys and type "regedit". Hit Enter.
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU (you may need to create the WindowsUpdate and AU keys) and create a DWORD value named AUPowerManagement. Set this value to 0.
Or create and import the following file AUPowerManagementDisable.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"AUPowerManagement"=dword:00000000
Solution 2
I had a similar problem - but the PC resumed just after 10 seconds!
I checked the Wake On Lan thing, control-panel settings, device settings and what else I found, but nothing worked.
So I got curious, what caused the wake - and found the pretty handy Microsoft commandline tool powercfg.exe
(comes with Windows).
Wait for the computer to resume unexpectedly and start
cmd
with administrator rights. Type
powercfg /lastwake
and it displays the hardware responsible for the wake.
In my case it didn't show any device responsible. But there's is another command
powercfg /waketimers
It shows all processes which registered resume-timers. In my case the Samsung hard disk tool "Magician" was responsible for it - uninstalled it and now everything is working as expected again!
I hope this helps you!
Solution 3
Type Mouse
into the start menu search box, or the Control Panel search box, and then open up the Mouse Properties
panel. Find the Hardware
tab, select your mouse in the list, and then click the Properties
button.
You’ll have to click the Change settings
button before you can see the Power Management
tab…
And now, you can uncheck the box from Allow this device to wake the computer
.
That’s all there is to it.
Source. Written for Windows 7, should work in Windows 8.
Solution 4
You might need to check the tasks in the task scheduler. Tasks can be allowed to wakeup the computer. To check if that is the case, please see tab condition, checkbox "Wake the computer to run this task" on each scheduled task.
Related videos on Youtube
Mujtaba
Current Rails developer. Former PHP, C#, ASP.NET, ASP developer and SQL Server DBA. All-around application designer, data migrator, and problem solver that enjoys working with a team of passionate and talented developers to deliver high quality solutions for problems that matter and improve peoples' lives. CV: http://mroach.com/cv.html Not interested in work related to: Advertising Gambling Freemium Compulsion-loop gaming Teams and projects without culture of testing and code quality
Updated on September 18, 2022Comments
-
Mujtaba almost 2 years
I am new in swift and I want to add more then one file parameter in multipart my code is like this
func uploadWithAlamofirePDFAPI() { var paradict = NSMutableDictionary() let UrlPost = Url var Patientidstring = String() var Useridstring = String() var SurgeryDateString = String() var DischargeDateString = String() var FundDisbusmentDateString = String() var AmountString = String() var PatientConditionString = String() var IDString = String() Patientidstring = String(self.patient_idfromservernew) Useridstring = String(self.userId!) SurgeryDateString = String(surgery_datefromservernew) DischargeDateString = String(discharge_datefromservernew) FundDisbusmentDateString = String(fund_disbursement_datefromservernew) AmountString = String(txtAmount.text ?? "") PatientConditionString = String(txtPatientCondition.text ?? "") IDString = String(idservernewid) paradict = ["patient_id":Patientidstring,"hospital_id":Useridstring,"surgery_date":SurgeryDateString,"discharge_date":DischargeDateString,"fund_disbursement_date":FundDisbusmentDateString,"amount":AmountString,"patient_condition":PatientConditionString,"id":IDString,"type":"2"] print(paradict) Alamofire.upload(multipartFormData: { multipartFormData in multipartFormData.append(self.datavalue, withName: "bill", fileName: self.FileNamewithFormat, mimeType:"application/pdf") for (key, value) in paradict { print(key,value) multipartFormData.append((value as AnyObject).data(using: String.Encoding(rawValue: String.Encoding.utf8.rawValue).rawValue)!, withName: key as! String) }}, to: UrlPost, method: .post, headers: nil, encodingCompletion: { encodingResult in switch encodingResult { case .success(let upload, _, _): upload.response { [weak self] response in guard let strongSelf = self else { return } debugPrint(response) let alert = UIAlertController(title: nil, message: "Success", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in let MasterPatientListVC = self?.storyboard!.instantiateViewController(withIdentifier: "MasterPatientListVC") as! MasterPatientListVC self?.navigationController?.pushViewController(MasterPatientListVC, animated: true) })) self?.present(alert, animated: true) } case .failure(let encodingError): print("error:\(encodingError)") let alert = UIAlertController(title: nil, message: encodingError as! String, preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in })) self.present(alert, animated: true) } }) }
I want to add 2 more parameters here
Alamofire.upload(multipartFormData: { multipartFormData in multipartFormData.append(self.datavalue, withName: "bill", fileName: self.FileNamewithFormat, mimeType:"application/pdf")
When I am adding this line shows error:
Alamofire.upload(multipartFormData: { multipartFormData in multipartFormData.append(self.datavalue, withName: "bill", fileName: self.FileNamewithFormat, mimeType:"application/pdf"),(self.datavalueClinicSummary, withName: "Clinic", fileName: self.FileNamewithFormatClinicSummary, mimeType:"application/pdf")
and the error message is:
Consecutive statements on a line must be separated by ';'
Clinic
andChemical
are the two parameter that I want to add them the same way as I addedbill
. Is it possible?If yes then How can I add it? Thanks in Advance!
-
Jan Doggen about 11 yearsYou might want to pull the network cable (or disable your Wifi connection) to distinguish if the signal comes from the outside or from the computer itself.
-
usr-local-ΕΨΗΕΛΩΝ about 11 yearsFortunately, computer has no wifi (and even if it had I believe it should be shutted off on standby as happens with laptops). I'll try that
-
Kruug about 11 yearsWhat is the make/model of the keyboard, mouse, and pen? Also, have you tried unplugging the controller receiver?
-
usr-local-ΕΨΗΕΛΩΝ about 11 yearsKyeborad and trackball are Microsoft products. A Natural Keyboard Internet (as I may remember) and a Optical Trackball. The Bluetooth is a Broadcom 2045 EDR. The issue occurred with and without the Xbox receiver (I have attached it very recently, the problem didn't happen only this night)
-
Daniel R Hicks about 11 yearsIf you search here you will find that this is a fairly common problem. First thing to do is to make sure nothing is causing your mouse to move -- even a small vibration may be enough. Then you need to track down other causes for waking, and, among other things, many apps add Task Scheduler items that go off at random times and wake the box.
-
Ramhound about 11 yearsIts not a hardware failure. What is you Windows Update settings look like?
-
usr-local-ΕΨΗΕΛΩΝ about 11 years@Ramhound what exactly do I have to look for? Updates are automatically installed. Maintenance time is set to 3AM
-
Admin over 10 yearsit was my problem too, at night my computer wake up here is the solution support.microsoft.com/kb/2642531 disable allow wake timer, I hope it helps. Csaba
-
-
usr-local-ΕΨΗΕΛΩΝ about 11 yearsThis is interesting. I have found a few task (but one was scheduled for 5PM, not 5AM) that had that checkbox activated. However, Windows 8 features looooooooooooooots of tasks in its tree. Some .NET Framework related tasks (like NGEN 4.0 Critical) are marked with that option too. I'll carefully take a look but meanwhile I'd ask if there is a way to globally uncheck that option or to get a list of tasks allowed to resume by deep searching in the tasks tree
-
usr-local-ΕΨΗΕΛΩΝ about 11 yearsAnother option found: in Power Management's Advanced Options I found "allow resume timer" (sorry but my Windows is localized) that is marked DISABLED. This should mean that tasks are never allowed to resume from standby.
-
usr-local-ΕΨΗΕΛΩΝ about 11 years+1. let's see tonight
-
usr-local-ΕΨΗΕΛΩΝ about 11 yearsI won't withdraw my upvote, but that DIDN'T work. At 5:08AM the computer woke up again. I immediately turned it off
-
Admin over 7 yearstry the first answer @usr-local
-
Subramanian Mariappan over 4 yearsYou can accept the answer if you find it helpful. Cheers. :)