Last updated by Sascha Brockel on 22 August 2023

Expected Reading Time: 9 minutes

A common and frustrating problem faced by many PC and laptop users is the unwanted wake-up from sleep mode. This phenomenon can have multiple causes, from system-internal updates to external interference.

Often, certain hardware components such as the mouse or keyboard are responsible for this, as they can send a signal to the computer when the slightest movement or touch is detected. Likewise, scheduled tasks, such as updates or security checks, can interrupt the sleep mode.

Troubleshooting is sometimes difficult, but requires a combination of system settings, driver updates, and disabling hardware devices if necessary to stop the unwanted wake-up.

For some time I have been using the tool Syncthing, which synchronizes files 1 to 1 between multiple devices. This can be thought of as a kind of OneDrive or Dropbox. I have long configured my PC so that I can start it via Wake On LAN (WOL). However, since I started using the tool, my computer regularly woke up a few minutes to 20 minutes later at the latest, which I didn't want at all because I went to sleep or left the house, for example.

I had to search for a long time to find out what the reason for the wake-up was. I had suspected Syncthing, since it occurred exactly since the setup. Temporarily, I had no choice but to disable the wake-up of the computer in the network adapter, which I found very unfortunate, since I liked to turn on my PC via Alexa.

When it comes to WOL being triggered by another device, as presumably here by my server, you still need a laptop or other PC that can record network traffic while the actual affected PC is idle. The solution requires the use of WireSharka network analysis tool to check the exact network traffic. This must now be installed on the secondary device. The tool has been on the software market for ages and is free of charge. You can also download the program as Docker Container install on its server.

Once installed, the program allows you to easily record network traffic. To do this, select the network adapter in the program via which the Internet is currently connected. This is usually already preselected and you do not have to change it. For a LAN connection it would often be Ethernet and for WLAN it would be WLAN or WiFi. To record, press the button in the upper left corner, which looks like a shark fin. This button turns gray and the stop button turns red and active.

The first network traffic should now be visible. However, as we now want to know where the Wake On LAN message is coming from, we enter "wol" (the abbreviation for Wake On LAN) in the top bar and press the Enter key. Now only entries with the protocol "WOL" are filtered. This can also be seen in the following image.

The first entry was a manual start of a WOL event from my server and was therefore justified. The other entries, however, should not exist at all. The culprit with the source "AVMAudio_db" leads back to my router, the FRITZ! The name AVM, the manufacturer of the FRITZ! This sends a broadcast message to all devices and has always found the recipient on my computer.

Even if the PC is switched off, my server or Syncthing tries to address it on a port. Through certain settings in the FRITZ!Box, these then also come through, although the PC is in sleep mode. This is my special case. There are very many possibilities, why a computer can wake up from the sleep mode. But you can differentiate in this case, because you can clearly see through Wireshark that another device is causing the behavior and it is not triggered by a Windows update, for example, because the network traffic would not show up like that.

There are two points that are required to ensure a working WOL. This means that no computer will be woken up from sleep mode by FRITZ!Box anymore.

Under Home network -> Network in the FRITZ!Box you can select the affected device and must ensure that the option "Automatically start this computer whenever it is accessed from the Internet." is not activated. Otherwise, the scenario described above happens, for example, Syncthing addresses the computer and the router thinks it has to tell the router that it is time to wake up. This is similar to the case when you had the first lesson off at school and your parents woke you up at 8 o'clock anyway because they thought you had overslept. You can see this attitude again in the following picture.

The next important point is under Internet -> Shares. There you have to take a closer look at the shares for the PC with its IP address. If you look at these and the setting "for "Allow independent port sharing for this device." is activated, this must be changed. This was active in my case and caused more or less the same behavior that I have already described in point 1. I had activated this option from the old days when port sharing was often required for online games and I didn't want to have to enter the ports for every game. But you have to bite the bullet and do it, otherwise the PC will wake up again. Accordingly, uncheck the box as shown in the picture and deactivate the setting.

The FRITZ!Box will no longer send broadcast messages to wake up devices. This means you can relax and switch on Wake On LAN for your device again without it waking itself up. But always remember to check the box next to "Only Magic Packet can activate computer from sleep mode" should be set.

The most trivial cause can be movement of mouse or keyboard, if this was configured so in Device Manager. This can be configured similarly as for the network adapter.

Basically you get by the command powercfg -lastwake in the command line to find out who or what last woke up the PC. It is also quite possible that Windows is configured incorrectly and therefore it does not work as expected. For this you can use the command powercfg -energy and see what Windows might be complaining about and fix it. But to say it in advance, not everything is necessary. Also with me there are entries that do not fit for Windows, but still have no influence.

To make sure that only the devices you are starting from can wake up the PC, you can use the command powercfg -devicequery wake_armed in the command line and gets a list of all devices that are able to do so. By default, these are mouse, keyboard and, depending on the configuration, network adapters.

Another option is Windows Updates. These belong to the Task Scheduler topic. Active schedulers can be viewed with the help of the console and the command powercfg /waketimers can be output. If entries appear here, these programs are able to wake up the computer from sleep mode.

If the PC still wakes up without a timer, you should set the following in the power options under the item Save energy -> Allow timer to activate the setting "Deactivate" specify.

Otherwise, you can make inquiries in the event viewer. How to do this exactly can be found at Deskmodder read about it. This covers the most common cases and you should be able to identify the problem, unless you have a special case like me with the FRITZ!Box.

In summary, unintentional waking up from sleep mode can be an annoying affair that can have various causes. Often, certain hardware components like the mouse or keyboard are responsible, which send signals to the computer when small movements or touches are made. Scheduled tasks like updates or security checks can also interrupt hibernation. Troubleshooting can be challenging and often requires a combination of adjusting system settings, updating drivers and possibly even disabling certain hardware devices. A personal case illustrates how such problems can occur and how an intensive search for the cause may be necessary.

Identifying and fixing such problems requires a thorough understanding of the network and system configuration. An important tool for diagnosis is the Wireshark tool, which can be used to record and analyze network traffic.

In the case mentioned, the Syncthing tool was suspected as a possible trigger. Wireshark hunted down the culprit: in this case, a broadcast message from the FRITZ!Box that caused the computer to wake up. Specific solution steps were shown to properly configure the FRITZ!Box and prevent an unintentional wake-up. Other potential causes were also highlighted, including mouse or keyboard movement, Windows updates, and active timers.

Overall, solving such problems requires a thorough analysis, adjustments in system settings and possibly the removal of interfering factors to ensure that the PC or laptop hibernation remains undisturbed.


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.