Recent issue - long shutdown time

#1
I've read about this but never experienced it until the last several weeks. I am seeing very long shutdown times on my Win7 x64 Ultimate system. I'm not quite sure when it started because I rarely reboot and my system is on 24/7 (gotta say I love the stability!). I saw one thread where someone suggested it might have something to do with the Right Click Menu option in Malwarebyte's Anti Malware, so I disabled that. I thought that did the trick, but it just happened on my last reboot which I did about an hour ago. Took about 10 minutes to get through the Shutdown screen to where the PC rebooted.

Is there a way to see how long various things took to complete during the Shutdown process like in the Event viewer?
 


Joe S

Excellent Member
#2
Do you have any type of automatic backup software running? What else are you running for anti virus and security?
Joe
 


Elmer

Extraordinary Member
#3
Have you set up, maybe without realising, to clear the PageFile at shutdown?

1. Type regedit in run or start menu search.
2. GoTo HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management.
3. Look for the DWORD value ClearPageFileAtShutdown in the right hand side.
4. If the DWORD value is 1 then it is set to on and the PageFile will be cleared every shutdown.
5. To turn off PageFile clearing set the value to 0.


(BTW Malwarebytes' context entry has never caused me an issue. Well, apart from the name makes the context menu 3 foot wide!)
 


Last edited:
#4
Do you have any type of automatic backup software running? What else are you running for anti virus and security?
Joe
Joe, no automatic backup running. Running AVG9 which I have running in the same configuration on other Win7 and Win XP disks. Neither of those (in the same system) show long shutdown times.

Have you set up, maybe without realising, to clear the PageFile at shutdown?
Thanks Elmer. I'll check this when I'm back at the machine. Any idea how this could have been set, if it has been? What I mean to say is, is it possible this could have been set accidentally somehow?
 


Elmer

Extraordinary Member
#5
Any idea how this could have been set, if it has been? What I mean to say is, is it possible this could have been set accidentally somehow?
Only accidentally if you've done it deliberately without realising. E.G. Multi-entry registry tweaking files. System enhancing (ahem!) software.
Many people set it as part of hiding all tracks of what they've been doing. I'm not that paranoid.
Yet.
(it's me medication that keeps me straight, you know!)
 


#6
Hmm. This option is not Enabled. So there is something else that is slowing down Shutdown in my case.
 


#7
Hoping to get any additional guidance on this.
 


Elmer

Extraordinary Member
#8
OK. Copy and Save this code as a .reg file then merge it into your registry.
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"ClearPageFileAtShutdown"=dword:00000000
Even though VM Pagefile clearing isn't "on", let's definitely turn it "off".

You should also see what system services are running -- for example if you have ACRONIS / ADOBE etc. etc. they all add (needless) running services.

Look in MSConfig and check to see which programs run at start-up. If they run at start-up there's a good chance they'll still be running at shutdown!!

I've read some threads were people have un-installed their graphic card drivers and after a clean up with Driver Sweeper, re-installed them to resolve this issue. I don't have a graphics card at the moment and I have relatively quick shutdowns. That neither proves or disproves this theory!!

It might be helpful if you downloaded the SF Diagnostics Tool, run it and attached the files in a zip to a post. May be able to spot some obvious things that otherwise might take years of guessing!!
 


Last edited:

Elmer

Extraordinary Member
#9
Found something out for you!!

Open Event Viewer by typing eventvwr in the start menu search box or use the run... window.

In the left hand panel of Event Viewer GoTo Applications and Services Logs > Microsoft > Windows > Diagnostics-Performance > Operational

In the centre panel click on the Event ID column header to arrange all entries numerically.

Now, every entry that has an Event ID of 200 is a shutdown and 100's are Start ups.

By double clicking an entry you open a details window which tells you (in milliseconds) how long it took for a program to close.

Example from one of mine:
Code:
This service caused a delay in the system shutdown process: 
     File Name           : ekrn
     Friendly Name     
     Version               
     Total Time          : 8474ms
     Degradation Time : 6061ms
     Incident Time (UTC)    :    ‎2010‎-‎12‎-‎23T16:33:31.687197100Z
Enjoy!!
 


Last edited:
#10
OK. Copy and Save this code as a .reg file then merge it into your registry.
Code:
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"ClearPageFileAtShutdown"=dword:00000000
Even though VM Pagefile clearing isn't "on", let's definitely turn it "off".
The Registry already had this set correctly, but I ran it anyway.

You should also see what system services are running -- for example if you have ACRONIS / ADOBE etc. etc. they all add (needless) running services.

Look in MSConfig and check to see which programs run at start-up. If they run at start-up there's a good chance they'll still be running at shutdown!!

I've read some threads were people have un-installed their graphic card drivers and after a clean up with Driver Sweeper, re-installed them to resolve this issue. I don't have a graphics card at the moment and I have relatively quick shutdowns. That neither proves or disproves this theory!!
I do have a bunch of stuff running, but there's been no change to this (both programs and services) for months, well before this started happening. And I'm convinced now this has to be related to a program that I run after Win7 and all of my load-time stuff starts up, as I've seen now that it is intermittent. So something that I run (or maybe a USB device that I happened to have turned on?) is either leaving some junk behind that causing this slowdown or something else related to a selected program is part of this.

It might be helpful if you downloaded the SF Diagnostics Tool, run it and attached the files in a zip to a post. May be able to spot some obvious things that otherwise might take years of guessing!!
I tried running this but got errors for a number of the buttons. Something about a necessary file related to a given button not being in C:\.


Found something out for you!!

Open Event Viewer by typing eventvwr in the start menu search box or use the run... window.

In the left hand panel of Event Viewer GoTo Applications and Services Logs > Microsoft > Windows > Diagnostics-Performance > Operational

In the centre panel click on the Event ID column header to arrange all entries numerically.

Now, every entry that has an Event ID of 200 is a shutdown and 100's are Start ups.

By double clicking an entry you open a details window which tells you (in milliseconds) how long it took for a program to close.

Example from one of mine:
Code:
This service caused a delay in the system shutdown process: 
File Name : ekrn
Friendly Name 
Version 
Total Time : 8474ms
Degradation Time : 6061ms
Incident Time (UTC) : ‎2010‎-‎12‎-‎23T16:33:31.687197100Z
Enjoy!!
Ah, that's the tidbit I was trying to remember. I knew there were code categories but couldn't remember how to access them. Thanks. Unfortunately for me when I checked the 200 series codes for the last time I had a long shutdown (1/4/11 at around 7:30 PM), there were only two entries and neither one had any kind of extended time associated with it.

A real :confused:
 


Elmer

Extraordinary Member
#11
It obviously sounds like you know what your doing, so you may like to ignore this comment!!

Have you done an AV scan? Downloaded Malwarebytes, updated and scanned?

Cleared all your Temp Files? Disk Defrag?

Have you got Bonjour in your list of Services, sometimes (?) a long string of numbers like a CLSID?







(Elmer runs quickly out of rock throwing range!)
 


Last edited:
#12
It obviously sounds like you know what your doing, so you may like to ignore this comment!!

Have you done an AV scan? Downloaded Malwarebytes, updated and scanned?

Cleared all your Temp Files? Disk Defrag?
I've been around the block a few times :wink:, but that doesn't mean I won't take help from a forum friend! I've covered the list except for the temp files. I'll give that a try.

Have you got Bonjour in your list of Services, sometimes (?) a long string of numbers like a CLSID?
Funny thing about that Bounjour service. I've disabled it more than once. I haven't looked at it long enough to figure out how it turns itself back on.

And what do you know. It's on again. Back to the Services list to disable it. Not sure if that's it but I agree it's annoying on its own.
 


Joe S

Excellent Member
#13
Where did you disable it just in startup? If so go into services and disable it there. I had that problem with Windows firewall in XP kept turning itself back on until I killed it there. Bounjour in the past was a trouble maker on Windows 7.
Joe
 


#14
Bonjour is used by Quicktime, Itunes, and Ipod, Iphones and Ipads, If you turn it off you won't be able to use any of that stuff.
 


Elmer

Extraordinary Member
#15
You're right. It is a real :confused: !!

This is a reg file I always run after I've installed Windows to close everything in up to 2.5 seconds:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"WaitToKillAppTimeout"="2500"
"AutoEndTasks"="1"
"HungAppTimeout"="1000"
"LowLevelHooksTimeout"="1000"
 
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control]
"WaitToKillServiceTimeout"="2500"
 
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control]
"WaitToKillServiceTimeout"="2500"
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="2500"

[HKEY_USERS\S-1-5-19\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="1000"
"WaitToKillAppTimeout"="2500"

[HKEY_USERS\S-1-5-20\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="2500"
"WaitToKillAppTimeout"="2500"
I've also been hunting around and its obvious you are not alone. I came across a way to do Shutdown traces etc..
It involves downloading a few Windows Performance Tools and at a quick glance looks a bit involved initially.

I don't think that will put you off though, as I'm sure you'd quite happily sell your soul to the devil, put your Granny on the streets and sell the rest of your family into a life of servitude to resolve this issue by now!

BTW, You missed me with the rocks!!

I suppose you're waiting for a link to that post about shutdown traces I found aren't you?

Aah, go on then, here it is!

@Firecracker
Thanks for pointing that out. I use none of them but I do use Adobe stuff and when I've installed it I go straight to Services and disable Bonjour. I forget that other people might have a need for it though!
 


Last edited:
#16
You're right. It is a real :confused: !!

This is a reg file I always run after I've installed Windows to close everything in up to 2.5 seconds:
Code:
Windows Registry Editor Version 5.00
 
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WaitToKillAppTimeout"="2500"
"AutoEndTasks"="1"
"HungAppTimeout"="1000"
"LowLevelHooksTimeout"="1000"
 
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control]
"WaitToKillServiceTimeout"="2500"
 
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control]
"WaitToKillServiceTimeout"="2500"
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="2500"
 
[HKEY_USERS\S-1-5-19\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="1000"
"WaitToKillAppTimeout"="2500"
 
[HKEY_USERS\S-1-5-20\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="2500"
"WaitToKillAppTimeout"="2500"
That's a nice little routine Elmer. I guess I could use something along these lines

Windows shutdown script.

to link that so that it runs every time a shutdown is done.

I suppose you're waiting for a link to that post about shutdown traces I found aren't you?

Aah, go on then, here it is!
Suh-weet! That's a great tip Doesn't look complicated at all.

@Firecracker
Thanks for pointing that out. I use none of them but I do use Adobe stuff and when I've installed it I go straight to Services and disable Bonjour. I forget that other people might have a need for it though!
@Firecracker, yep I occasionally use iTunes. I have disabled it in System Services in the past but I think launching iTunes forces it to be reset to start.
 


Elmer

Extraordinary Member
#17
That looks interesting but being a mere pauper I have Home Premium and therefore no GPEdit (Grrrrr!).

But once that reg file is merged, that's it until manually altered or removed.

I have disabled it in System Services in the past but I think launching iTunes forces it to be reset to start.
Things like that, yeah I can wait the 0.5 to 1 sec it takes to re-set or re-start its service, don't need it running all the time though, as it tries to.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top