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

2

1

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.

Jonathan Gleason

Posted 2014-07-25T04:05:37.037

Reputation: 178

capture a shutdown trace and give it to me: http://pastebin.com/RFRkuc81

– magicandre1981 – 2014-07-25T04:08:21.737

@magicandre1981 Here is the link: https://drive.google.com/file/d/0B6xfgYpCM4U3dVpId3F2dTZfUGs/

Thanks in advance!

– Jonathan Gleason – 2014-07-25T04:33:06.577

according to the trace, Windows takes 8.8s to shutdown <timing shutdownTime="8845" servicesShutdownDuration="2517"> – magicandre1981 – 2014-07-25T18:58:16.850

@magicandre1981 So I wasn't just misreading that then . . . Any idea why it would report just 8.8s but take over 5 minutes? – Jonathan Gleason – 2014-07-25T19:56:23.920

looks like Hardware issues. – magicandre1981 – 2014-07-26T06:41:11.513

@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: https://drive.google.com/file/d/0B6xfgYpCM4U3NGpfaEFpZ21rcGM/

– Jonathan Gleason – 2014-07-26T16:24:53.860

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 – 2014-07-26T16:26:36.577

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 – 2014-07-26T17:19:15.720

Answers

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.

Jonathan Gleason

Posted 2014-07-25T04:05:37.037

Reputation: 178

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 – magicandre1981 – 2014-07-27T05:47:55.643

1

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.

Stephen

Posted 2014-07-25T04:05:37.037

Reputation: 81

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. – Jonathan Gleason – 2014-07-25T06:05:12.653

Did you update your windows version ? – Stephen – 2014-07-25T06:09:46.397

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 – 2014-07-25T06:13:34.327

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. – Jonathan Gleason – 2014-07-25T06:28:47.760

Windows 8 encountered issue in shutdown after 8.1 rolled out. Its often a reason behind the slow shutdown – Stephen – 2014-07-25T06:31:36.043

0

Go Start>Run , type in: msconfig

Click OK .

Click on Startup tab.

NOTE - Make sure you disable service that are not necessary for startup, otherwise your computer might not start after reboot.

Click Disable all

IMPORTANT! In case of laptop, make sure, you do NOT disable any keyboard, or touchpad entries.

Click Services tab.

Put checkmark in Hide all Microsoft services

Click Disable all.

Click OK.

Restart computer in Normal Mode.

NOTE. If you use different firewall, than Windows firewall, turn Windows firewall on, just for this test, since your regular firewall won't be running.

If you use Windows firewall, you're fine.

Try to shut it down now.

Same problem?

Stephen

Posted 2014-07-25T04:05:37.037

Reputation: 81

Yup. Same problem. – Jonathan Gleason – 2014-07-25T06:44:02.490

Which Antivirus is installed in your Machine?, did you try shutting down after closing it ? – Stephen – 2014-07-25T06:46:17.913

Please give me your System Specs as well – Stephen – 2014-07-25T06:48:38.647

Antivirus is Windows Defender. – Jonathan Gleason – 2014-07-25T07:07:47.450

Please provide your hardware configuration as well, as same problem was resolved at my work place by updating drivers. refer this article too ... http://keyliner.blogspot.com/2014/01/windows-81-slow-to-shutdown-and-restart.html i am sorry i am giving you too much links to go through.

– Stephen – 2014-07-25T07:12:54.167

For specs, see original post (I added the link there). – Jonathan Gleason – 2014-07-25T07:13:14.787

I am checking the specs, meanwhile you go through the article – Stephen – 2014-07-25T07:14:26.667

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 – 2014-07-25T07:24:08.720

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. – Jonathan Gleason – 2014-07-25T08:15:01.557