Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Normally, pressing the power button once initiates a shut-down in Windows 7.

If any programs are still running that will not quit (e.g. waiting for a dialogue response), Windows overlays the screen with a dialogue allowing the user to cancel the shut-down.

I've just noticed that on two different systems here, using this cancel option disables the shut-down via power button. The power button can still be used to kill the system by holding it for a few seconds, using the Start menu button to shut the PC down still works as well.

Steps to reproduce:

  1. Open Notepad, type a few characters. Do not save.
  2. Press the computer's power button.
  3. Wait until the dark screen appears.
  4. Press cancel.
  5. Press the power button again. Notice how nothing happens.

What is the reason for this behaviour, and can it be disabled to always try and shut down the PC when the power button is pressed?

share|improve this question
1  
Do you want to not show that screen which appear to ask Force Shutdown and Cancel or just you want to use the power button to shut it down again? –  avirk Jun 8 '12 at 16:53
    
Are the systems the same make and model? –  Ramhound Jun 8 '12 at 17:21
2  
@Avrik: I'd like the power button to be able to shut the system down again. –  Jens Jun 8 '12 at 19:48
    
@Ramhound: No, not at all. I don't have their hardware specs here at the moment, but one system was a recent core i3 system, while the other was a rather aged Pentium based system. –  Jens Jun 8 '12 at 19:49
add comment

3 Answers

up vote 12 down vote accepted
+50

This is a known issue: http://support.microsoft.com/kb/2719667/en-us?sd=rss&spid=14498 (funny enough I just happened to see it show up recently in the knowledge base RSS feed)

If an application is preventing Windows from shutting down (ex. unsaved work), Windows will wait a period of 60 seconds at the force shut down dialog before forcing the application to close so shut down can continue. If the user cancels out of the force shutdown dialog, Windows still retains the 60 second timeout value. As a result, the next time a shut down occurs, even if there are no blocking applications, shut down will be delayed until the timeout value expires.

This behavior only occurs when configuring the power button to shut down the machine. When shutting down Windows through the Start Menu, the problem does not occur as the timeout value is not retained when cancelling out of the forced shutdown dialog.

Unfortunately the work-around is:

To work around this issue, use the shut down option from the Windows Start Menu instead.

share|improve this answer
    
Shouldn't waiting a minute before pressing the button again also work? –  Synetech Jun 12 '12 at 18:45
    
Thanks for your answer! The link to the knowledge base article is quite helpful. –  Jens Jun 13 '12 at 9:10
add comment

I managed to reproduce this behavior on my HP DV7 (with and without SP1). Everything happened exactly as you said, until the computer suddenly shut itself down.

Further investigation showed that canceling the shutdown doesn't disable the power button. It just gets delayed.

Example of how the delay operates

  1. Open Notepad, type in a few characters. Do not save.

  2. Press the computer's power button.

  3. Wait until the dark screen appears.

  4. Click Cancel.

  5. Try either of the following:

    • Press the power button immediately.

      Nothing will happen right away, but the computer will attempt to shut itself down exactly 90 seconds after pressing the power button for the first time.

    • Wait until 90 seconds have passed after pressing the power button for the first time.

      If you press the power button now, the computer will attempt to shut itself down immediately.

Rationale

Windows prevents the power button from attempting to shut the computer down more than once in 90 seconds. I can only take an educated guess here, but I suppose this is to prevent multiple shutdown attempts due to a malfunctioning power button or pressing it accidentally.

[C]an it be disabled to always try and shut down the PC when the power button is pressed?

I couldn't find any documentation regarding this behavior, let alone a way to modify it.

But to shut the computer down after a failed attempt, just close the application preventing the shutdown and do either of the following:

  • Press the power button again. The computer will shut itself down automatically.

  • Click Start -> Shut down. There's no delay if you do it this way.

share|improve this answer
1  
Hmm, the KB article that Mark linked to indicates the timeout is 60 seconds, not 90. –  Synetech Jun 12 '12 at 18:46
    
I timed it twice. It was exactly 90 seconds. –  Dennis Jun 12 '12 at 19:22
    
I wonder if there is a setting that affects this, like WaitToKillAppTimeout on XP (I cannot find conclusive evidence of whether or not this one actually works in Windows 7. If not, then maybe it's because it is hard-coded or stored elsewhere in relation to KB2719667; which then would beg the question why yours differs from the KB article). –  Synetech Jun 12 '12 at 19:30
    
I timed it again, just to be sure: It's 90 seconds after pressing the power button for the first time, not 60 seconds after the "force shutdown" dialogue appears. –  Dennis Jun 12 '12 at 22:26
    
Yes, but why? Is it configurable? –  Synetech Jun 13 '12 at 1:01
show 1 more comment

When you press the power button, Windows starts a shutdown transition and starts closing all the User Session applications ( the system is then in a shutdown_in_progress state ) but when some work needs to be saved first, the transition is then pending until that application is properly closed.

enter image description here

Starting another shutdown sequence will be discarded since there is an ongoing one, if you save that file you'll see that the shutdown transition will then continue by itself.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.