Why does my computer take an abnormally long time to shut down?

58,521

Solution 1

TL;WR: The problem was the size of the page file. By disabling clearing of the page file at shut-down, the time for shut-down went from over 5 minutes to just 9 seconds. If I kept this enabled, but decreased the size of the page file, I was able to reduce the shut-down time down to 41 s at 4583 MB.


The first thing the led me to think that the problem might be caused by the page file was this article. I did as they suggested and changed the registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown from 1 to 0. After doing this and restarting, the shut-down time clocked in at 9 seconds (down from over 5 minutes). This made it clear that the problem was the page file itself.

After checking, I found that Windows had set the page file to be about 20 GB. I thus decided to reenable clearing of the page file and reduced the size of the page file to about 5 GB (oddly enough, 4853 MB was the size that Windows recommended, even though the "System managed" size was around 20 GB). After doing this, the shut-down time clocked in at 41 seconds. I've decided that I will just leave the clearing of the page file disabled.

Solution 2

I would suggest you to track the processes running in the background. May be a background application or any process is the reason behind delay in shutdown.

Go to Task Manager

Click on Process Tabs

You need to verify your processes individually. End a process and Shutdown (See if it resolves)

Note - Be clear you are aware of default process list. Verify these essential processes needed to run Windows 8, http://www.technibble.com/essential-processes-needed-to-run-windows/

If you Shutdown it while on a network...Try the same after disconnecting.

You may also close the programs shown in notification area, before shutting down.. If it doesn't take much time... Its verified that a process is leading to slow down shutdown.

Share:
58,521

Related videos on Youtube

Jonathan Gleason
Author by

Jonathan Gleason

Currently a graduate student in mathematics at the University of California - Berkeley. Previously obtained a MASt. in Applied Mathematics from the University of Cambridge (2013), and a B.S. in Mathematics and a B.A. in Physics from the University of Chicago (2012).

Updated on September 18, 2022

Comments

  • Jonathan Gleason
    Jonathan Gleason over 1 year

    I am booting Windows 8.1 Professional 64-bit off an SSD (specifically, a 128GB ADATA SP900), and while it boots up incredibly fast, it also takes an obscenely long time to shut-down. The time to go from shut-off to log-in screen is less than 20 seconds (perhaps even as low as 10), whereas it takes minutes and minutes to shut down (perhaps even as long as 10 minutes; I'm afraid I haven't had the patience to time it).

    Any idea as to why the shut-down time would be abnormally long even though the start-up time is quite fast (as one expects with an SSD)?

    Unfortunately, for a problem such as this, I'm not quite sure what information will be relevant to troubleshooting the problem, so please let me know anything that might be useful and I will respond in the comments. Here, however, are my specs.

    EDIT: I found a partial solution. I opened the command prompt with administrator privileges and ran the command powercfg /hibernate on. Then, under Control Panel\Hardware and Sound\Power Options\System Settings in the Control Panel, under the heading "Shutdown settings", I now saw a check-box labeled "Turn on fast startup (recommended)".

    I tested both shutting-down and restarting with this box checked and unchecked. Qualitatively anyways, I experienced the same behavior as before when the box was unchecked. However, when the box was checked, the problem was partially solved: the shut-down time was reduced from over 5 minutes down to a mere 12 seconds, and in fact, the start-up time was also reduced from about 16 seconds to 10 seconds; however, when I restarted the computer, as opposed to shutting it down, I found the exact same behavior as before. Thus, after checking this box, there is now no longer any problem with the computer shutting-down, but only when restarting.

    • magicandre1981
      magicandre1981 almost 10 years
      capture a shutdown trace and give it to me: pastebin.com/RFRkuc81
    • Jonathan Gleason
      Jonathan Gleason almost 10 years
      @magicandre1981 Here is the link: drive.google.com/file/d/0B6xfgYpCM4U3dVpId3F2dTZfUGs Thanks in advance!
    • magicandre1981
      magicandre1981 almost 10 years
      according to the trace, Windows takes 8.8s to shutdown <timing shutdownTime="8845" servicesShutdownDuration="2517">
    • magicandre1981
      magicandre1981 almost 10 years
      looks like Hardware issues.
    • Jonathan Gleason
      Jonathan Gleason almost 10 years
      @magicandre1981 I tried capturing a trace again, this time using -trace rebootCycle along with the rest of your command line options. Curiously, this produced a shutdown trace of less than 30 seconds, whereas the boot trace took a couple of minutes. Of course, as I timed it myself, it appears the exact opposite: booting takes less than 20 seconds but shutting down takes several minutes. Do you think the boot trace would contain relevant information? It's quite large this time, but here is the link: drive.google.com/file/d/0B6xfgYpCM4U3NGpfaEFpZ21rcGM
    • Jonathan Gleason
      Jonathan Gleason almost 10 years
      Also, for what it's worth, these traces were made after the change contained in the edit to my original post. That is, these traces were made with "fast startup" enabled (the first trace I created was not).
    • Jonathan Gleason
      Jonathan Gleason almost 10 years
      I just realized that two minutes of the boot trace is only because the default parameter for the command line option -postBootDelay is 120. When I reran the trace with -postBootDelay 1, the boot trace time went down to 38.4 seconds (the shutdown trace time remained about the same at about 26 seconds). I can upload these new traces if you like, but I imagine it will not be useful. In particular, it doesn't seem as if the abnormally long restart times I'm observing are recorded in either of the traces.
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    I shutdown every nonessential (according to your link) process I could (though there are some that would not let me, e.g. dwm.exe), disconnected from the network, and then shut-down. This time I timed it, and the shut-down time clocked in at 5 minutes and 45 seconds. Thus, it seems as if this was not the problem.
  • Stephen
    Stephen almost 10 years
    Did you update your windows version ?
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    For what it's worth, here is a complete list of nonessential processes that did not let me shut them down (including processes that shut-down and them later restarted): BTHSAmpPalService.exe, BTHSSecurityMgr.exe, ChsIME.exe, dasHost.exe, dwm.exe, HeciServer.exe, livecomm.exe, LMS.exe, MsMpEng.exe, NisSrv.exe, vpnagent.exe, wininit.exe (this one just warned that ending it would make Windows unstable), WUDFHost.exe.
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    I just ran Windows Update (is this even what you were referring to?). It installed two optional updates. Afterwards, Windows Update says "No updates are available.". I then tried to restart my computer, and it still look way too long.
  • Stephen
    Stephen almost 10 years
    Windows 8 encountered issue in shutdown after 8.1 rolled out. Its often a reason behind the slow shutdown
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    Yup. Same problem.
  • Stephen
    Stephen almost 10 years
    Which Antivirus is installed in your Machine?, did you try shutting down after closing it ?
  • Stephen
    Stephen almost 10 years
    Please give me your System Specs as well
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    Antivirus is Windows Defender.
  • Stephen
    Stephen almost 10 years
    Please provide your hardware configuration as well, as same problem was resolved at my work place by updating drivers. refer this article too ... keyliner.blogspot.com/2014/01/… i am sorry i am giving you too much links to go through.
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    For specs, see original post (I added the link there).
  • Stephen
    Stephen almost 10 years
    I am checking the specs, meanwhile you go through the article
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    Also, take a look at the partial solution I found in my edit to the original post. Maybe this gives you an idea of what is wrong and/or how to fix the 'remaining' problem?
  • Jonathan Gleason
    Jonathan Gleason almost 10 years
    I don't have a Qualcomm Atheros wireless card, so I skipped Solution 1. I proceeded with Solution 2 as they described (in particular, my Intel Management Engine Components was out of date). For Solution 3, their description of the Bluetooth entries that should be in Device Manager did not match what was in mine (though it was very similar), so here I just disabled all Bluetooth entries in Device Manager. After all this, the problem remains.
  • magicandre1981
    magicandre1981 almost 10 years
    yes, I can see this in the last reboot trace you gave me (<interval name="ZeroHiberFile" startTime="5533" endTime="25168" duration="19635" />), but not in the fist one