Interestingly, the event to Duplicati appears to happen (sometimes) before Power-Troubleshooter is able to log its event, based on the timing. Although I was never (in about three tries) able to get it to wake in Pause without a Pause after startup or hibernation
in Settings, adding a two minute delay over three runs:
Had estimatedPauseEnd to-the-second two minutes after Power-Troubleshooter’s event in event viewer.
Had estimatedPauseEnd five seconds sooner than that I think. I didn’t write it down fast enough, but proof
07:38:43 Event ID 1 from Power-Troubleshooter
2021-06-30 07:40:38 -04 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started
from Duplicati log file
A third run was slightly ahead of two-minutes-past-Power-Troubleshooter event, although there are earlier:
09:17:14 Event ID 1 from Kernel-General
The system time has changed to 2021-06-30T13:17:14.500000000Z from 2021-06-30T13:16:21.170437700Z.
Change Reason: System time synchronized with the hardware clock.
Process: '' (PID 4).
09:17:15 Event ID 131 from Kernel-Power
Firmware S3 times. ResumeCount: 28, FullResume: 249, AverageResume: 249
09:17:27 Event ID 1 from Power-Troubleshooter
The system has returned from a low power state.
Sleep Time: 2021-06-30T13:16:00.202244700Z
Wake Time: 2021-06-30T13:17:20.272831300Z
Wake Source: Device -Intel(R) USB 3.0 eXtensible Host Controller - 1.0 (Microsoft)
estimatedPauseEnd : 2021-06-30T09:19:15.2573866-04:00
programState : Paused
Maybe wake notification inside Windows goes simultaneously to Power-Troubleshooter and Duplicati?
Other notable points are that when the delay is set, Duplicati wakes up Paused, as visible in Tray Icon appearing paused, and top-of-screen pause control offering Resume. In my second test, the missed backup at 07:40 ran when pause ended, so another test would be to try to manually end pause in GUI, either with the top-of-screen resume button, or right-click Tray Icon and do a Resume from the menu.
From a code point of view, it’s possible that Duplicati sees the Resume
come in right after the Suspend
from its point of view (because it’s not running while the computer is asleep). That might make issues, however if it lost track of its state, then I’m not sure why it resumes after a longer delay. Needs testing.
I will leave further testing to @jf64 or someone who seems to see Duplicati delay too much on wake.
is disappointing, because I hoped a few second delay might make it run when it un-pauses, but at least further testing using a longer delay (e.g. two minutes) could be done to see if behavior varies from mine.