Windows sleep and wake up

PC automatically wakes from sleep mode (II)

More information

This is a step-by-step article.

Symptoms

When I put my PC into sleep mode, it automatically wakes up at certain times. What can I do about it?

Resolution

PCs don’t know any sleep disorders. If, however, the computer wakes up unexpectedly regularly at night (or even during the day) at certain times, you should check the power saving modes. May be the PC is activated by timed action of the system or an application. These include, for example, scheduled backups. How to proceed:

1. Click on the Windows icon.

2. In the field for Search programs and files enter the command Power options.

3. In the result list of the start menu, click on Power options.

4. In the current power plan, click the entry Change power saving options.

5. In the following dialog box, click on Change advanced power settings.

6. Under Power options click on the plus sign in Energy saving.

7. Click on the plus sign in Allow timer for activation.

8. Now change the preference under Allow timer for activation from Enable in Disable. If you are using a mobile PC, enable for both areas On battery and Network operation.

9. When finished, click OK.

Note: The automatic wake up could also be caused by other reasons. If this guide does not result in the desired effect, see also the other contributions of this series.

References

For more useful information, see the following articles in the Microsoft Knowledge Base:

2642510 PC automatically wakes up from sleep mode (I)

2642546 PC automatically wakes up from sleep to (III)

Note This is a «FAST PUBLISH» article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Computer Waking Up from Sleep (Win 7, 8, 10)

PC keeps waking up from sleep mode – what do I do?

“I put my PC into hibernation/standby mode for the night and for no apparent reason it wakes up at 2 am, why does this happen?” – This is quite a common question with Windows OS users. It turns out that computers, which use any of the newer Windows operating systems (Win 7, 8, 10), may occasionally wake up from sleep mode, without any incentive from the user. As it turns out, there could be several reasons for this and in order to prevent it from happening in the future, you must first find out what exactly caused it.

In order to do so, you must open the start menu, type cmd in the search box and press Enter. In the resulting window type powercfg -lastwake and press Enter again. This will show you the last thing that woke up your PC. In my case it was the power button. This guide is made for Windows 7, but know that the steps don’t differ much for Win 8 and 10.

If the last time your computer woke up, was due to your interaction with it, you will not be able to find out what is the actual cause for the unexpected and unwanted boot-ups. If that’s the case, type in another command: powercfg -devicequery wake_armed . This will show you all devices that are authorized to wake up your PC. On my computer this is only the mouse device, but if you experience those sudden awakenings, there should be other devices in the list.

Читайте также:  Свой ftp сервер для windows

If you want to go a step further and see all devices that can be programmed to wake up your machine, type in the command: powercfg -devicequery wake_programmable. Apart from my mouse, I have one more device, which can be programmed to do that.

Another way to find the reason for this minor problem is through the Windows event manager . In order to evoke it, press Windows key + R and in the search field type eventvwr.msc and hit Enter.

In there, click the arrow next to Windows Logs so as to expand it and then click on System. The events listed will probably be way too many for you, to look through all of them. Instead of doing this, look for the option Filter Current Log (located in the right side of the window). In the newly opened window use the drop-down menu labeled Event Sources. From it choose Power- Troubleshooting and press OK. This setting will make the list of events much shorter and easier to navigate through. Now it shouldn’t be very difficult to single out the exact event that you are looking for, namely the unwanted boot-up and what it was caused by.

How to prevent your Computer Waking Up from Sleep?

Following these instructions, you should have figured out by now, what causes those annoying boot-ups. Now it’s time to find a way to stop them. If the cause for the waking-up was listed as a device, it has probably been either your mouse or your keyboard. Since you actually have to interact with these two, in order to boot-up your PC, it is most likely that it is not them that cause the unexpected waking up. In the majority of cases the device, that is guilty of the sudden boot-ups, should be the network adapter.

To fix that, you will need to access the device manager. In order to do so, open the Control Panel, click on Hardware and Sound > Device manager (it is located under Devices and Printers).

In here, seek out the device that caused the problem. Right click on it and open Properties and then go to Power management. There, you should see a setting labeled Allow this advice to wake the computer, uncheck it and you are ready to go.

Know that occasionally the setting may be grayed-out. In this, case go to the command prompt (type cmd in the windows search box). Remember to do this with administrative rights. In there, you should write powerscfg -devicedisablewake (device name in here) in order to disable the waking up and powercfg -deviceenable (device name in here) in order to enable it.

There might be another reason for unexpected, unwanted boot-ups, namely a wake up timer. Some programs schedule such a timer so as to to download necessary updates, but this wakes up the computer, without ever putting it into sleep mode again. In order to see which of those programs do that, once gain open the command line tool and type powercfg -waketimers. The programs will be listed and from here you can either seek them out, one by one, and deactivate this setting or you can remove all timers at once by using the key combination Windows key + R and typing powercfg.cpl. This opens a window with the power settings of your PC. In there go to Change plan settings on the plan that you’re currently using. Then click on Change advanced power settings. Expand the menu labeled Sleep and the submenu labeled Allow wake timers. If you are using a laptop, there should be two options. Disable both of them. On a PC, there should be only one to be disabled. This will disable all possible wake-ups from programs that may have scheduled one.

Читайте также:  Настройка гостевого доступа windows 10

And there you have it. If you follow this guide, you should have no problem with unwanted boot-ups of your PC or laptop.

Did we help you? A thank you in the comments goes a long way to warm our hearts!

About the author

Brandon Skies

Brandon is a researcher and content creator in the fields of cyber-security and virtual privacy. Years of experience enable him to provide readers with important information and adequate solutions for the latest software and malware problems.

How to wake up computer from Sleep at a particular time in Windows 10

You can use the Windows Task Scheduler to wake up your Windows 10 computer wake from sleep mode, automatically at a preset time. This can be useful if you want a particular task performed at a particular time. Maybe you want to download large files at a specific time!

Wake up computer from Sleep

To wake up your Windows computer from Sleep mode at a fixed time, type Task Scheduler in Start Search and hit Enter.

In the right side, select Create Task. A new window will open. Here, under the General tab, fill in the Name and Description. Also check, Run with highest privileges.

Under the Triggers tab, click New. Another window will open. Here. Select One time (or Daily if you want it repeated every day at a particular time). Set the Date and Time when you want your Vista to wake up from Sleep.

Next, under the Actions tab, you have to mention a task. Click New. You can run a simple task, like say, first launching & then closing the command prompt window. This thus will wake your Vista machine at the pre-set time to carry out the task!

Select Action as: Start a program . To schedule a task that executes the command cmd .exe with command line arguments, copy-paste under Program/script

Under Conditions tab, check on the Wake the computer to run this task check-box. This is important!

Click OK and Exit Task Scheduler.

Your computer will wake up from Sleep at a particular time.

Schedule Windows to Sleep and Wake Automatically

Brian has been doing an awesome job of covering several neat things you can do with Windows Task Scheduler. One more: scheduling Windows to wake or sleep automatically at a particular time. Why would you want to do this? I don’t know about you, but for me, I was using my desktop Windows 7 PC as a file server for some time. Rather than sending wake-on-LAN packets every time I wanted to access a file on my Windows file server, I decided to leave the thing on from 10 AM to 10 PM every day. This was a compromise between waking up on demand and leaving my computer on 24/7 (sorry, environment.)

There are third-party power management programs that do this, many of which come bundled with laptops. But if you are on a plain vanilla Windows desktop, you may want just to go ahead and do it natively. Here’s how:

How to Disable Hybrid Sleep/Hibernation in Windows

The first step is to disable hybrid sleep and/or hibernation on your computer. Why would you want to do this?

Hibernate is a power-saving feature that saves your machine’s state (including unsaved documents, program states, etc.) onto your primary hard disk instead of onto the RAM (as sleep does.) The tradeoff is slower resume time, but less power draw. This is important for laptops with batteries, but not so much for desktops. Hybrid sleep does both—it saves open documents and application states into the memory and the hard disk. This is so you won’t lose anything in case of a power outage.

But the real issue is that sometimes, hybrid sleep/hibernation can interfere with an automated wake script, depending on your configuration. In my case, waking from hibernation from a script only half worked—the computer would turn on, the fans would spin, and I’d get stuck on the “Resuming Windows” screen forever. If you have similar problems, you might just want to disable hibernation/hybrid sleep altogether. Here’s how:

Читайте также:  Install expect package in windows

Open a command prompt as an administrator. To do this in Windows 7, click the Start button, type Cmd and then right-click cmd.exe and choose Run as administrator.

Type powercfg -h off and press Enter.

If the command was successful, then you’ll get no error messages.

If you get the error message: “You do not have permission to enable or disable the Hibernate feature” then re-read the previous step about running cmd.exe as an administrator.

Now, like a bear addicted to espresso, your computer will no longer hibernate. It’ll sleep, but it won’t hibernate. Mission accomplished.

For more information on Hibernation vs. Sleep, read this write-up that Austin did on the subject: Understanding Your PC And Devices, Sleep VS. Hibernate [groovyTips]

How to Create a Batch (.bat) File to Put Your Computer to Sleep

The way we’ll put your computer to sleep is by running a script (.bat) that will initiate the sleep command. By using a batch file, you can add other parameters and commands to it later without rejiggering your Windows Task Scheduler task.

To create a sleep batch file open up Notepad and type the following:

Rundll32.exe Powrprof.dll,SetSuspendState Sleep

Click File –> Save As, Under Save as type, choose All files *.* and give your file a name like sleep.bat (or something else with a .bat extension.)

Got it? If not, you can just download the sleep and wake batch files I already created by clicking here.

How to Create a Batch (.bat) File to Wake Your Computer

There isn’t a command line command to wake your computer. That’s because if you are in a position to be running commands, then your computer is, of course, already awake. But what we can do is create a batch file with something arbitrary in it and then tell Windows Task Scheduler that it can wake the computer to run it. So, go ahead and make a batch file that does something like “echo Hello!” and then save it as wake.bat.

Again, you can also just download our sleep / wake batch files here.

How to Schedule Your Computer to Sleep and Wake at a Certain Times

Now that we have batch files to sleep and wake our computer, all we need to do is tell Windows when to run them.

Run Task Scheduler. The fastest way to get to it is by clicking the Start button and typing Task Scheduler.

Click Action and then Create Task; in the General tab, give it a name like “Sleep.”

In the Triggers tab, click New. Set the task up to begin “On a schedule” and choose daily and plug-in the time when you want it to run. Click OK.

Your trigger will be enabled.

Next, click the Actions tab and click New. Set the action to “Start a program” and browse to your sleep.bat script. Click OK.

Here’s your action:

If you want to prevent the computer from sleeping if programs are running or someone is using the computer, then use the following settings in the Conditions tab:

Click OK. You’re done with this part. If you want to test it out, you can add a new trigger that sets it in motion 1 minute from now.

Next, let’s make a Wake task. Click Action and Create Task, and name it Wake in the general tab.

Then, create a daily trigger with the time you want to wake your computer.

Next, go to the Actions tab and make an action to run your wake.bat script.

Now, go to the Conditions tab. Here, make sure that the “Wake the computer to run this task” option is checked.

Click OK. Now, your computer will wake and sleep at the scheduled times. Enjoy!

Оцените статью