0

I'm testing raw WNS receiving during sleep on a battery powered windows PC which supports "S0 connected sleep state". Client app (UWP) can receive raw WNS until initial 20 minutes of modernstandby, but cannot receive after that.

Client app implements the registration of out-of-process background tasks triggered by PushNotificationTrigger ("IsNetworkRequested" property is set to true). This background task logs the time when it receives WNS. By configuring some settings (power management settings, registry and powercfg cmd, etc.), I could confirm that the background task can receive WNS shortly after it is sent even during sleep for 3 hours or more when connected by Wi-Fi.

But, if disable Wi-Fi connection and enable MBB (mobile broadband) connection instead, the background task cannot receive WNS during a sleep time of more than 20 minutes.

MBB case can be summarized as follows:

  • When sleep exceeds 20 minutes, the background task receives WNS at the time it exits sleep (Or receive WNS a few hours later).
  • When sleep is less than 20 minutes, the background task can receive the WNS at the time it was sent.
  • When plugin AC, the background task can receive the WNS at the time it was sent

I expect that the background task always receives the WNS shortly after it is sent. It's achieved with a Wi-Fi connection. Is it possible to wait for receiving on MBB for the same amount of time as Wi-Fi connection?

Test procedure:

  1. unplugged AC, only on battery powered
  2. Enter to sleep
  3. Wait 3 hour or 10/20/30/60 min
  4. Send WNS from server
  5. Wait 5 - 10 min
  6. Exit sleep
  7. Open log file and check recorded time (Test passed if the recorded time is a few seconds behind the time in step.4.)

Environment:

  • 2 Laptop PCs
  • Windows10 Pro (20H2/21H2)
  • Sierra Wireless EM7430 / Sierra Wireless EM7565

Device Manager

  • it looks mb adapter has power saving limit, could you mind check if you have enable power saving option for this adapter device? – Nico Zhu Mar 29 '22 at 07:12
  • In the Power Management tab of the MB adapter and all USB devices to which the adapter is connected, the "Allow the computer to turn off this device to save power" check-box is unchecked. I also disabled the "selective suspend" option in the Power option (advanced settings) and device manager. – Toru Suyama Mar 29 '22 at 07:54
  • thanks for your feedback, I will discuss with team, check if there is such power management policy. I will update below quickly. – Nico Zhu Mar 29 '22 at 08:00
  • 1
    thank you. I am sincerely wating for your update. If necessary for your check, I will send you the powercfg /qh result (but it is huge size). – Toru Suyama Mar 29 '22 at 08:20
  • Have you checked this document [Directed power management for PCIe devices](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/prepare-hardware-for-modern-standby#directed-power-management-for-pcie-devices), it looks base on specific device's power policy. – Nico Zhu Mar 30 '22 at 01:58
  • 1
    No, I haven't. I will check the document immediately. – Toru Suyama Mar 30 '22 at 02:54
  • I read this document but didn't get what to do next. What should I do specifically? I have attached an image of my PC's device manager. You can see the connection status from the PCI device to MB adapter. – Toru Suyama Mar 30 '22 at 08:22
  • Yep, this document just explain power policy, but does not provide document to disable above behavior. I will help to discuss with team. and if I have any updates, I will comment below. – Nico Zhu Mar 30 '22 at 08:27
  • 1
    Thanks, let me know if there is necessary information for your team discussion. – Toru Suyama Mar 31 '22 at 01:15
  • 1
    10 to 20 minutes after the PC went to sleep, windows-service process built for debugging purpose handled DBT_DEVICEREMOVECOMPLETE with multiple USB devices, including MB adapters. Event Viewer records multiple "USB device draining system power when system is idle. USB Device: VID: X PID: X REV: X Removal action failed: .." as warnings. But this warning is not recorded after handling DBT_DEVICEREMOVECOMPLETE. I guess that WNS will not be received by the MB adapter after this REMOVECOMPLETE. I hope this information will help your analysis and your team discussions. – Toru Suyama Mar 31 '22 at 01:24

0 Answers0