Lost Power Button event

I am working on a application & driver which captures and plays back video over SDI. There is no keyboard or mouse attached.

User turns on the machine. Application starts (scheduled task auto start) and captures or plays back preconfigured video. On completion of the work user presses power button and system turns off.

At present, the application registers for Shutdown notifications through SetConsoleCtrlHandler and SetProcessShutdownParameters

This arrangement works if the Power button pressed with in few minutes of system start up (say 5 minutes). However, Windows misses the Button press after a long use ( say after 30 minutes). The OS carry on Running without any knowledge of the button press. I mean no notifications sent to the application.

The driver is for Video add-on card and does not register for power notifications.

OS: Windows 2008 server 32bit
System: HP DL380 G6

What is the best method to get reliable Power Button press notification.

Thanks for your help
Bala

I want to be absolutely sure I understand what you’re saying: You have the system configured to sleep or hiber on the “short” press of the power button. And this sleep/hiber isn’t triggered when the power button is pressed?

In other words, it IS indeed WINDOWS that’s missing the notification…

If that’s the case, it sounds like you have a bug in the BIOS. Because it’s the BIOS, exclusively, that raises this event to Windows.

Peter
OSR

Thanks Peter,

The Power Button Press is configured to Shutdown the system under (Power Options => Power Button Action - Shutdown).

This works if I boot up the system and press the button again with in short interval. Application gets notified and Windows shuts down properly.

If the button is pressed after 30 minutes, nothing happens during the press. Even holding it for 2 seconds and release. It seems Windows has just lost the knowledge of the button press. It carrys on normal. If I press it again (does not matter if I hold it 0.5 or 2 second), Windows gets notification and shutdown happens.

So in summary, system boot and button press works if it is done within short period. After a long use first button press gets ignored and second press works. The second press works only if it is applied within a short time of the first (ignored) press.

I am not too sure whether I made it better this time in explaining or confused more.

Thanks for your help
Bala

Method 1:

  1. Power on the system
  2. Wait for boot up and application start
  3. Application runs
  4. Wait 5 minutes
  5. Press Power button
  6. Windows Shutdown

Method 2:

Same as Method 1 until step 3.

  1. Wait for 30 minutes
  2. Press Power button
  3. Nothing happens, Windows Runs normally
  4. Wait for 2 minute or less
  5. Press it again
  6. Windows Shutdown

Method 3:

Same as method 2 but on Step 7 if wait time is 30 minute or more Windows carrys normal. No shutdown occurs.

Maximum hold time for Button press is 4 seconds before system forcefully turns off. I have tried holding it for 2/3 seconds without success.

Thank you

Very clear, thank you for that extended explanation. I appreciate you taking the time.

As background: ANY press of the (soft) power button less than 4 seconds is considered a “normal” power button press. Pressing for 4 seconds or more gets you the “ACPI 4 Second Override” press, which should cause the BIOS to (ignore the OS and) power the system off.

Given that this behavior is restricted to your platform… in other words, people on all sorts of Windows systems don’t see this problem… I’d GUESS that this is in fact a BIOS problem on your machine. It COULD, of course, be some sort of hardware problem with the power button as well. Have you reproduced this behavior on another machine?

While I’m not a super expert in this area, I really don’t see how WINDOWS could be responsible for the behavior you’re describing.

Peter
OSR

Peter G,

I didn’t try it on the other machine as the application is linked to the video card. I thought it was some thing wrong with the application/driver/windows setup and didn’t really think at BIOS level or trying it on other machine. I should setup and try it on different machine now.

I was not sure what was happening and thought this behaviour was due to heavy system use by the application. I assumed that an interrupt or notification was getting lost in some level. Therefore I came here to ask for help but parsed my question on blaming windows. I understand now and stand corrected.

Now, I need to narrow down and locate the issue. As suggested I am going to try it on other machine (but same hardware configuration). Removing video card and trying without the application running. I will report back with the outcome.

Thank you for your valuable help,

Bala

Power button events percolate up through the ACPI interrupt hardware logic.
So does the ACPI PM timer. Chipsets have an option in the ACPI spec to
implement either a 24 bit timer or a 32 bit timer. The interrupt period on
the 32 bit timer is about 7 minutes.

I’m sure that debugging your machine would be quite interesting. I suspect
that after the first PM timer interrupt, no more are delivered. Of course,
there’s a lot of conjecture behind that statement. You’d have to get the
people who built the motherboard to debug it.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


wrote in message news:xxxxx@ntdev…

Peter G,

I didn’t try it on the other machine as the application is linked to the
video card. I thought it was some thing wrong with the
application/driver/windows setup and didn’t really think at BIOS level or
trying it on other machine. I should setup and try it on different machine
now.

I was not sure what was happening and thought this behaviour was due to
heavy system use by the application. I assumed that an interrupt or
notification was getting lost in some level. Therefore I came here to ask
for help but parsed my question on blaming windows. I understand now and
stand corrected.

Now, I need to narrow down and locate the issue. As suggested I am going to
try it on other machine (but same hardware configuration). Removing video
card and trying without the application running. I will report back with the
outcome.

Thank you for your valuable help,

Bala

Jake,

Thank you for your help. I am still struggling with this issue and find it
hard to locate. I have updated the BIOS but no success. I can reproduce it
on other machine but both are identical machines. Unfortunately, I don’t
have different system to check it. It may take some time to source a
different hardware.

Regards
Bala

On Fri, Jan 14, 2011 at 10:50 PM, Jake Oshins
wrote:

> Power button events percolate up through the ACPI interrupt hardware logic.
> So does the ACPI PM timer. Chipsets have an option in the ACPI spec to
> implement either a 24 bit timer or a 32 bit timer. The interrupt period on
> the 32 bit timer is about 7 minutes.
>
> I’m sure that debugging your machine would be quite interesting. I suspect
> that after the first PM timer interrupt, no more are delivered. Of course,
> there’s a lot of conjecture behind that statement. You’d have to get the
> people who built the motherboard to debug it.
>
> Jake Oshins
> Hyper-V I/O Architect
> Windows Kernel Group
>
> This post implies no warranties and confers no rights.
>
> --------------------------------------------------------------
> wrote in message news:xxxxx@ntdev…
>
>
> Peter G,
>
> I didn’t try it on the other machine as the application is linked to the
> video card. I thought it was some thing wrong with the
> application/driver/windows setup and didn’t really think at BIOS level or
> trying it on other machine. I should setup and try it on different machine
> now.
>
> I was not sure what was happening and thought this behaviour was due to
> heavy system use by the application. I assumed that an interrupt or
> notification was getting lost in some level. Therefore I came here to ask
> for help but parsed my question on blaming windows. I understand now and
> stand corrected.
>
> Now, I need to narrow down and locate the issue. As suggested I am going to
> try it on other machine (but same hardware configuration). Removing video
> card and trying without the application running. I will report back with the
> outcome.
>
> Thank you for your valuable help,
>
> Bala
>
>
>
> —
> 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
>