Hey there. There is already a thread but the solution to disable Wake-On-LAN is no option for me. It is horrible. My PC will always wake from sleep after something like 5 minutes.
I’m using SyncTrayzor on my Windows 11 installation. How can I fix this? I disabled the network adapter wake option but like I said it’s no option for me. I also have set the option to only allow magic packet enabled but still, the computer awakes.
Sorry?
It’s a desktop PC with LAN attached. So the is no real model because it’s custom. Of course, I can tell you more details but I don’t think it’s a hardware/software issue. I guess there is a problem in general with SyncTrayzor/ SyncThing.
CPU : AMD Ryzen 7 3700X | Mainboard : MSI MPG X570 Gaming Pro Carbon WiFi
RAM : 32GB G.Skill Trident Z Neo DDR-3600 CL16 CPU : AMD Ryzen 7 3700X | Mainboard : MSI MPG X570 Gaming Pro Carbon WiFi
RAM : 32GB G.Skill Trident Z Neo DDR-3600 CL16
Can you check whether there is anything suspicious or possibly related logged in the Event Viewer? You can access it by right clicking the Start button.
Only indirectly, so it’s not specifically a problem with SyncTrayzor and/or Syncthing…
Power saving is a complex combination of hardware, firmware, drivers and operating system all working harmoniously together.
As you already know, Syncthing is designed to mirror the contents of a folder to another device running Syncthing. This means that Syncthing causes multiple system activities including:
CPU I/O
Disk I/O
Network I/O
Depending on the particular “power plan” configured in Windows 11, the CPU might switch to a lower power state, the disk might spin down (if it’s a HDD) then switch to a low power state, and the network adapter might switch to a low power state.
Since Windows Vista, a “Modern Standby” mode can keep a network connection active while the rest of the system is asleep (requires a mainboard to have a supporting chip).
Windows 11 is less than two years old, so it’s not surprising that there have been numerous reports of issues with PCs that don’t go to sleep, don’t wake up from sleep, wake up too often from sleep, etc., etc.
Before digging into Windows power plan settings, first try a quick experiment turning off the filesystem event watcher and increase the full rescan interval from the default 60 seconds to 3600 seconds for every Syncthing folder. See if that allows the PC to sleep for as long as you want.
Are you a wizard or something? Now I put my PC on multiple times and it didn’t wake up. I changed nothing. Just disabled and enabled wake-on-lan and magic packet again in the network device settings. That’s so weird because I did it so many times before…
Die Systemsitzung ist von 209 zu 210.
gewechselt. Ursache: SxTransition
Second (Kernel-Power):
Die Systemsitzung ist von 210 zu 212.
gewechselt. Ursache: WinRT
BootId: 67
Third (Power-Troublershooter):
Das System wurde aus einem Standbymodus reaktiviert.
Zeit im Energiesparmodus: 2023-08-01T00:19:38.914283100Z
Reaktivierungszeit: 2023-08-01T00:28:09.939284700Z
Reaktivierungsquelle: Unbekannt
What do you mean? In Windows?
I found something suspicious in the syncthing.log:
[77DME] 2023/08/01 02:28:09 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: could not find a connectable relay
[77DME] 2023/08/01 02:28:09 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[77DME] 2023/08/01 02:28:09 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
[77DME] 2023/08/01 02:28:09 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[77DME] 2023/08/01 02:28:09 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net: no such host
[77DME] 2023/08/01 02:28:09 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
[77DME] 2023/08/01 02:28:09 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net: no such host
[77DME] 2023/08/01 02:28:21 INFO: Established secure connection to Q5X4CGA at 192.168.178.49:22000-192.168.178.29:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10
[77DME] 2023/08/01 02:28:21 INFO: Device Q5X4CGA client is "syncthing v1.23.6" named "UNRAID-Server" at 192.168.178.49:22000-192.168.178.29:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10
[77DME] 2023/08/01 02:29:22 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[77DME] 2023/08/01 02:29:58 INFO: Joined relay relay://81.235.139.59:22067
[77DME] 2023/08/01 02:33:28 INFO: quic://0.0.0.0:22000 resolved external address quic://176.199.17.233:64959 (via stun.syncthing.net:3478)
02:28:09 is the exact same time Windows logs the 3 events. It must have something to do with this.
The connection to Syncthing relays are normal and it can be disabled in Syncthing if not needed.
I’m assuming that device “UNRAID-Server” above is one of yours since it’s a LAN connection.
Could be related, but Windows is choosing to wake up to act on the Syncthing connection request.
To clarify, when you say “sleep”, do you mean your PC has no fans, no activity other than perhaps a pulsing LED indicator?
Or do you mean that the PC cuts the signal to the monitor but is otherwise still active? (It’s the tech industry’s fault for making the distinction fuzzy.)
If it’s the former, and the PC is in “S3” mode, Syncthing cannot wake the computer because all processes are suspended in RAM. Only a hardware trigger will wake the computer. The next lower power level, “S4” (aka., “hibernate”), is when the contents of main memory and video memory are dumped onto the drive before the computer shuts down.
The second power event that was logged referred to “WinRT”, which is the Windows Runtime, so it’s Windows that’s waking the computer. Try a power efficiency analysis: powercfg -energy. The report should list any drivers that are causing problems.
It’s like the PC is shut down. No fans, no activity, nothing.
Yes, it’s my server where Syncthing is running too. These both are interacting.
I’m not sure if it’s S3 or S4 because Windows tells something like save energy with its button but I got an automation at home that should trigger hibernation. But no matter which one of them I use, the PC awakes.
Found 8 errors and 6 warnings. One of them:
Energierichtlinie:Standbyzeitlimit ist deaktiviert (Netzbetrieb)
Der Computer ist nicht so konfiguriert, dass nach einer Zeit der Inaktivität automatisch der Wechsel in den Standbymodus erfolgt.
The other ones are similar to this one:
USB-Standbymodus:Vom USB-Gerät wird nicht in den Modus für selektives Energiesparen gewechselt.
Von diesem USB-Gerät wurde nicht in den Modus für selektives Energiesparen gewechselt. Die Prozessorenergieverwaltung ist möglicherweise nicht möglich, wenn sich dieses USB-Gerät nicht im Modus für selektives Energiesparen befindet. Dieses Problem verhindert jedoch nicht den Wechsel des Systems in den Standbymodus.
Gerätename
USB-Verbundgerät
Hostcontroller-ID
PCI\VEN_1022&DEV_149C
Hostcontrollerspeicherort
PCI bus 42, device 0, function 1
Geräte-ID
USB\VID_046D&PID_C53D
Portpfad
2,3
So it is saying it’s not stopping to get in the energy saving state (standbymode).
In S4 mode, only pressing the power button or a WoL signal will wake the computer because the CPU, drives and other main components have powered down.
With WoL (Wake-on-LAN), another device needs to send a special “magic” packet that contains the MAC address of the device to be woken up. If the NIC in the matching target device supports WoL, it tells the mainboard to initiate a system power up as though someone pressed the power button.
Windows 11 adds another wrinkle in that when a user chooses to shut down the computer, it doesn’t shut down in the classic sense. It’s closer to hibernation so that Windows 11 starts up faster the next time the power button is pressed.
Vendor ID 046D is assigned to Logitech and device ID C53D is registered as the G631 keyboard.
I wasn’t able to locate a G631 USB keyboard on Logitech’s website, so it could be that the registration data is erroneous. But if you have any USB devices, try unplugging one at a time to see if the PC stays asleep.
Speaking of USB, is your Syncthing folder on an external drive?
Okay but how can I find out if my PC was in S4 or S3? I see a difference because in saving energy my PC LED is blinking and in (probably) hibernation it is turned off.
Oh, interesting. Didn’t know I could figure out the devices. There are 8 devices with an error then. My G613 keyboard (wireless), a unifying adapter from Logitech, a Corsair headset adapter, and more. Is it a problem? I cannot unplug them because I need all of them. And I mean it does not happen when Syncthing is not running on the PC. That’s still the thing.
My Syncthing folder is on an internal HDD mounted on volume E: so nope.
S4 is basically a complete shutdown – the only way a PC can use less energy is if it’s unplugged from an outlet.
Only the power button and a NIC that supports WoL will wake the PC up.
In S4 mode, there are no lights except ones on a WoL-capable NIC and one on the mainboard (if available) showing that there’s current coming from the power supply.
(Lights plugged into USB ports to bling up a PC don’t count because some mainboards offer “USB charging” where the +/- wires still supply power, but the data lines are inactive.)
To rule out WoL, just unplug the network cable for a while. Unless the NIC is flaky (it happens) the PC will stay off.
With S3, the PC is technically still on, but the OS and other processes are suspended. Usually some form of input from a keyboard, mouse, etc. triggers a wake-up.
Everything points to an issue with Windows and/or the hardware and not Syncthing because Syncthing is simply a running process. Windows is the one that decides when to sleep and how.
But as I mentioned earlier, Windows 11 blurs the line with multiple ways a computer can be sleeping.
Yup, the vendor and device IDs are used to identify devices plugged into the bus (USB ports on a mainboard are technically part of a USB hub – aka., the “root” hub) so that the OS and other software know what they’re talking to. Devices also identify themselves as being part of a USB “class”. There’s a HID (Human Interface Device) class, storage class, video class, etc.
Since you want the PC to sleep, I’m assuming that you aren’t using them while it’s sleeping – otherwise, you’ve got a very unique way of using a computer.
If the PC wakes up on its own while they’re all unplugged, it’s something else.
Unfortunately, debugging power saving issues is a lot of trial and error plus a methodical process of elimination.
It’s not that USB HDDs are bad, but it adds all kinds of complications when the goal is to put a PC to sleep.
This started with Windows 8 and its Connected Standby (which was later renamed in Windows 10 to Modern Standby). However, in the beginning, the mode was limited to tablets only. Nowadays, it seems that most laptops don’t even support S3, because since Windows 10, Microsoft has been pushing Modern Standby (S0ix) to all types of mobile computers . This shouldn’t have any relation to the problem discussed here though, as it’s clearly a desktop PC, which won’t have Modern Standby enabled unless done so by the user explicitly.
Personally, I’d simply try disconnecting all USB devices except for the mouse and keyboard first, and then see what happens after the PC goes to sleep.
But why does it only happen then when Syncthing is running??? It makes no sense. Something has to trigger it. Stop Syncthing and everything works again. It makes no sense to just pull out all USB cables or pull out LAN cable. It has something to do with Syncthing no matter what you tell me. I mean it’s obvious. And all these things are no solutionn.
It helps to differentiate between causation and correlation.
Focus on what happens when Syncthing on your PC is contacted by your “UNRAID-Server”:
Syncthing sends/receives data over a network connection (wired Ethernet for your setup) = network I/O.
Syncthing reads/writes to its database, log file and specified folders as needed = disk I/O.
Syncthing converts files into blocks, hashes blocks, updates its database, updates its log file, provides info for the web GUI, etc., etc. = CPU I/O.
(There’s also PCI bus I/O for the NIC and storage devices. The list goes on and on.)
In S3/Standby state, there is no CPU I/O because only RAM is still active while it’s holding the OS and programs in a state of suspended animation.
In S3/Standy state, the drives are also normally powered off, so no disk I/O.
In S3/Standby state, there can be network I/O if the NIC supports WoL.
In S4/Hibernation state, the PC is technically powered off, so Windows isn’t running. Syncthing isn’t running. Nothing.
There’s also S1, S2 and S5, but all three involve the CPU being suspended (S1) or powered off (S2/S5), so it’s impossible for Syncthing to be doing anything.
As you’ve said, the sleep issue only occurs while Syncthing is running, but Syncthing cannot be running if the PC is in a S1/S2/S3/S4/S5 state.
And if the PC is in a S1/S2/S3/S4/S5 state, only an external trigger can wake it up.
As Spock said – “When you eliminate the impossible, whatever remains, however improbable, must be the truth.”
(I’d be seriously impressed if one of Syncthing’s list of features included the ability to run while a CPU is suspended or powered off.)