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.
Personal case with FRITZ!Box
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.
Finding the needle in the haystack
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.
Now you should already see the first network traffic. But since we now want to know where the Wake On LAN message comes from, we enter "wol" (the abbreviation of Wake On LAN) in the upper bar and press the Enter key. Now only entries with the protocol "WOL" will be filtered. This can also be seen in the following picture.
The first entry was a manual start of a WOL event from my server and thus had its justification. The other entries, however, should not exist at all. The culprit with the source "AVMAudio_db" leads back to my router, the FRITZ!Box. In addition also suitably the name AVM, the manufacturer of the FRITZ!Box. This sends a broadcast message to all devices and has then always found the receiver on my computer.
How does it happen?
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.
How do I configure the FRITZ!Box correctly for functioning Wake On LAN?
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.
1. Deactivate Wake On LAN at the respective network device
Under Home Network -> Network in FRITZ!Box you can select the affected device and you have to make sure that the option "Automatically start this computer whenever it is accessed from the Internet." is not enabled. Otherwise, the scenario described earlier happens that, for example, Syncthing addresses the computer and the router thinks it has to let the router know that it's time to wake up. Similar to the case when you had exceptionally the first hour off at school time and your parents woke you up at 8 o'clock anyway, because they thought you overslept. You can see the setting once again in the following picture.
2. Handle port shares
The next important point is Internet -> Shares. There you have to take a closer look at the shares for the PC with its IP address. If you look at them and the setting "for "Allow independent port sharing for this device." is activated, this must be changed. This was active for me and caused more or less the same behavior that I already described in point 1. I had activated this point still from old days when one often needed port releases for games online and I had no desire to always deposit the ports for each game. But you have to bite the bullet and do it, otherwise the PC wakes up again. Accordingly, as shown in the picture, uncheck the box and disable the setting.
This means that FRITZ!Box will no longer send broadcast messages to wake up devices. This means that you can relax and switch on Wake On LAN for your device again, without it making itself independent. But always keep in mind that you have to uncheck the "Only Magic Packet can activate computer from sleep mode" should put.
Other causes
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" set.
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.
Conclusion
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.
0 Comments