S0Idle

I am trying to enable S0 Idle, and the device can wake the system via PCI PME. However, when I try to configure WdfDeviceAssignS0IdleSettings( idleSettings.IdleCaps = IdleCanWakeFromS0), I get a STATUS_POWER_STATE_INVALID. Reading MSDN, it indicates the following:

"
Starting in KMDF version 1.11 running on Windows 8, the framework checks if the system’s firmware can handle a wake signal while the system is in its fully on (S0) power state. If the machine fails this check, WdfDeviceAssignS0IdleSettings returns STATUS_POWER_STATE_INVALID, and the device remains in its fully on (D0) power state as long as the system remains in S0.
"
Does this mean the system for some reason will completely prevent the device from going to D3.hot even if the driver wants to idle the device? Is it just that the system doesn’t support PCI PME in D3.hot ?

thanks

What are the reported device capabilities? You can see them in the properties dialog for the device in device manager or in the debugger.

d

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
Sent: Saturday, October 7, 2017 10:42:40 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] S0Idle

I am trying to enable S0 Idle, and the device can wake the system via PCI PME. However, when I try to configure WdfDeviceAssignS0IdleSettings( idleSettings.IdleCaps = IdleCanWakeFromS0), I get a STATUS_POWER_STATE_INVALID. Reading MSDN, it indicates the following:


Starting in KMDF version 1.11 running on Windows 8, the framework checks if the system’s firmware can handle a wake signal while the system is in its fully on (S0) power state. If the machine fails this check, WdfDeviceAssignS0IdleSettings returns STATUS_POWER_STATE_INVALID, and the device remains in its fully on (D0) power state as long as the system remains in S0.

Does this mean the system for some reason will completely prevent the device from going to D3.hot even if the driver wants to idle the device? Is it just that the system doesn’t support PCI PME in D3.hot ?

thanks


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

The device says:

PCI S0 Wakeup supported :

Current Power State : D0

Power capabilities:
00000099
PDCAP_D0_SUPPORTED
PDCAP_D3_SUPPORTED
PDCAP_WAKE_FROM_D0_SUPPORTED
PDCAP_WAKE_FROM_D3_SUPPORTED

Power state mappings:
S0 -> D0
S1 -> Unspecified
S2 -> Unspecified
S3 -> D3
S4 -> D3
S5 -> D3

thanks

The device and/or bios are reporting it can’t wake from s0

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
Sent: Sunday, October 8, 2017 12:49:47 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] S0Idle

The device says:

PCI S0 Wakeup supported :

Current Power State : D0

Power capabilities:
00000099
PDCAP_D0_SUPPORTED
PDCAP_D3_SUPPORTED
PDCAP_WAKE_FROM_D0_SUPPORTED
PDCAP_WAKE_FROM_D3_SUPPORTED

Power state mappings:
S0 -> D0
S1 -> Unspecified
S2 -> Unspecified
S3 -> D3
S4 -> D3
S5 -> D3

thanks


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

Thanks Doron. How can I confirm that either way? The device is perfectly capable of waking in S0, and so it is either that my driver isn’t advertising it correctly or it is the bios itself.

Your driver should not be able to change then answer if it is computed by the bus driver and the bios. Try a different model of machine and see what it says. Look in your pci bars and see what it reports. Since the docs say wdf started looking at the bios setting in w8, install w7 on the same machine and see if the result is different.

d

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
Sent: Sunday, October 8, 2017 8:14:25 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] S0Idle

Thanks Doron. How can I confirm that either way? The device is perfectly capable of waking in S0, and so it is either that my driver isn’t advertising it correctly or it is the bios itself.


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

Thanks Doron. using GetIdleWakeInfo also returned DeepestWakeableDstate==DeviceWakeDepthNotWakeable. So I assume it is a limitation on the platform? Just wanted to confirm, if there is anything we would have to do either from the device or from the device driver to enable runtime idling support.

thanks

Maybe something from the device. I don’t know. Did you test on multiple different motherboard/bios combinations? The

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
Sent: Monday, October 9, 2017 5:27:08 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] S0Idle

Thanks Doron. using GetIdleWakeInfo also returned DeepestWakeableDstate==DeviceWakeDepthNotWakeable. So I assume it is a limitation on the platform? Just wanted to confirm, if there is anything we would have to do either from the device or from the device driver to enable runtime idling support.

thanks


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

Wait. Aren’t we simply talking about what settings exist in your device’s PCIe Power Management Capabilities?

Aren’t there bits in the PMC for your device that control/indicate all this stuff?

Peter
OSR
@OSRDrivers

My device supports D0, D3 as well as PME in D3hot and WAKE# in D3 cold as per the config space.

I assume the following tab in the device manager also refers to the device itself.

Power capabilities:
00000099
PDCAP_D0_SUPPORTED
PDCAP_D3_SUPPORTED
PDCAP_WAKE_FROM_D0_SUPPORTED
PDCAP_WAKE_FROM_D3_SUPPORTED

I am trying the same on a different motherboard to see if it will make any difference.