how to disable hibernate feature

hi,

My windows pv driver for xen doesn’t support sleep/hibernate feature
right now (Exactly can hibernate but cannot resume). So I need to told
power manager that system cannot turn into sleep/hibernate state. In my
bus driver, for each child device query capability IRP, I set it cannot
resume from D1/D2/D3…, and set device power state to unspecified when
system power state is sleep/hibernate. It works fine in srv 2008 x86/x64
and srv2003 x64 but cannot work on srv 2003 x86. I found that in 2008
x86/x64 or 2003 x86’s ‘power option’, I cannot fond any option to
enable/disable hibernate when system running with my pv driver. But I
can find in srv 2003 x86 and can enable it. Is that any different
between 2003 x86 and x64 on power manager policy? How can I told system
power manager that current system cannot turn into sleep/hibernate power
state?

thanks
wayne

> hi,

My windows pv driver for xen doesn’t support sleep/hibernate
feature right now (Exactly can hibernate but cannot resume).
So I need to told power manager that system cannot turn into
sleep/hibernate state. In my bus driver, for each child
device query capability IRP, I set it cannot resume from
D1/D2/D3…, and set device power state to unspecified when
system power state is sleep/hibernate. It works fine in srv
2008 x86/x64 and srv2003 x64 but cannot work on srv 2003 x86.
I found that in 2008
x86/x64 or 2003 x86’s ‘power option’, I cannot fond any
option to enable/disable hibernate when system running with
my pv driver. But I can find in srv 2003 x86 and can enable
it. Is that any different between 2003 x86 and x64 on power
manager policy? How can I told system power manager that
current system cannot turn into sleep/hibernate power state?

My laptop is broken so I can’t access the docs easily, but under KMDF
you would just not report that you support hiber ‘special’ files.

James

in your WDM bus driver for the PDO for your HBA you need to fail the PIRP with IRP_MJ_PNP/IRP_MN_USAGE_NOTIFICATION(DeviceUsageTypeHibernation) with some !NT_SUCCESS value (other than STATUS_NOT_SUPPORTED). If this is KMDF you just remove the call to WdfDeviceSetSpecialFileSupport(WdfSpecialFileHibernation)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Wednesday, March 18, 2009 3:08 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] how to disable hibernate feature

hi,

My windows pv driver for xen doesn’t support sleep/hibernate
feature right now (Exactly can hibernate but cannot resume).
So I need to told power manager that system cannot turn into
sleep/hibernate state. In my bus driver, for each child
device query capability IRP, I set it cannot resume from
D1/D2/D3…, and set device power state to unspecified when
system power state is sleep/hibernate. It works fine in srv
2008 x86/x64 and srv2003 x64 but cannot work on srv 2003 x86.
I found that in 2008
x86/x64 or 2003 x86’s ‘power option’, I cannot fond any
option to enable/disable hibernate when system running with
my pv driver. But I can find in srv 2003 x86 and can enable
it. Is that any different between 2003 x86 and x64 on power
manager policy? How can I told system power manager that
current system cannot turn into sleep/hibernate power state?

My laptop is broken so I can’t access the docs easily, but under KMDF
you would just not report that you support hiber ‘special’ files.

James


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks James and Doron. I have done as you said. Now I cannot find
‘hibernate’ selection on ‘power option’.

But now the problem is when I run WHQL ‘Common Scenarios Stress with IO’
and ‘Sleep Stress with IO’ test case, it will fail with message ‘The
system reports that it no longer support any sleep state’ and windows
will pop up a warning windows says ‘Windows cannot hibernate, will
disable hibernate before restart’.

I think that means if I fail
IRP_MN_USAGE_NOTIFICATION(DeviceUsageTypeHibernation) IRP with
status_not_support directly, WHQL will fail since it may get some info
from other way and know that current system should support hibernate.
It’s strange that on server 2008 and even server 2003 x64 edition, WHQL
test detects that current system doesn’t support any sleep state even I
success IRP_MN_USAGE_NOTIFICATION(DeviceUsageTypeHibernation) IRP and
those two test case passes. Any idea?

thanks
wayne