#StandWithUkraine

Fixing Windows XP shutdown problems

shutdown_icon I had recently encountered interesting problem of Windows XP freezing on shutdown. It was new PC with narrow function (video surveillance workstation) so it makes good example on how obscure shutdown issues in Windows can be and how to save time solving them.

shutdown_zoom

shutdown_zoom

Nature of problem

  • Windows was completely freezing on reaching “Windows is shutting down message” on either shutdown or reboot;
  • computer had simple hardware and was only running antivirus and video surveillance software – not many things to go wrong.

Tracing

When developing Windows Microsoft paid a lot of attention to startup – it has numerous options, logs and capable utilities such as Process Monitor.

Shutdown has none of that.

So aside from enabling verbose status messages for startup and shutdown (which isn’t really much more verbose) I had no insight in shutdown process and what exactly goes wrong.

Possible causes

On top of tracing limited to elimination and guesswork there are numerous possible causes for shutdown issues:

  • software that freezes or otherwise interferes with process;
  • third party system services;
  • hardware errors and resource conflicts;
  • low quality drivers;
  • corrupted files on disk;
  • wrong ACPI configuration in BIOS or Windows installation.

Narrowing it down

  • Windows safe mode – shutdown fails – eliminates software;
  • disabling third party services – shutdown fails – eliminates services;
  • checking hard drive – no errors – probably eliminates corrupt files;
  • booting from LiveCD – shutdown works – eliminates BIOS and hardware.

Fixing

I was left with drivers as possible cause. PCI card that handled video capture from security cameras was most likely suspect so I started with disabling its driver in Device Manager.

Shutdown problem disappeared. At cost of making PC useless for work. :)

Reinstalling driver didn’t help so I had to arrange contact with support that provided latest driver version which solved issue completely.

Lessons learned

There is no good utility or smart trick to figure out shutdown problem. It boils down to list of possible causes and eliminating them in fast and efficient manner.

It may sound fast in post but with additional circumstances it took me two days to go through everything in this case.

Microsoft Support articles on topic http://support.microsoft.com/kb/308029

Related Posts

17 Comments

  • Lyndi #

    I am not experiencing this problem. I must say however that I enjoyed reading how you implemented the process of elimination to solve the problem. Doing things this way is always the quickest way to find a solution. This was a good lesson for all of us.
  • Rarst #

    @Lyndi It's kinda rare of an issue. I encountered shutdown problems only two or three times overall. And quickest way to solution is using utility or reading log that tells exactly what is wrong. :) Elimination is last resort - for cases like this.
  • Transcontinental #

    I've had similar XP shutdown problems resolved with a Microsoft application that installa as a service, "User Profile Hive Cleanup Service". Quote: "UPHClean is a service that once and for all gets rid of problems with user profile not unloading. You are having profile unload problems if you experience slow logoff (with Saving Settings for most of the time while logging off), roaming profiles that do not reconcile, or the registry size limit is reached." Never had any problem since.
  • Rarst #

    @Transcontinental Sounds like solution for quite specific cases. Roaming profiles or stuffing registry full are not mainstream (yet?). :) Thanks for info, who knows when I'll be unfortunate to run into more of completely unlogged bug goodness.
  • deano fabaza #

    Everyone with XP should install UPHClean. I've not had a shutdown problem since(3 years). Vista has this feature built in. Don't know why they did not add this to a XP service pack it's that good. I don't think it's that specific. Install it anyway Rarst to reduce the chances of ever having to figure out whats causing a slow shutdown. It's 1,080K Mem Usage and 732K VM Size on my system. Microsoft has created a tool, UPHCLEAN (User Profile Hive Cleanup Service), that allows the system to monitor applications that access the user registry hives, and determine if an application has left keys open at logoff. If this happens, UPHCLEAN will log the application name and the keys in question, release the keys in question and complete the logoff process. This will not only allow users to log off cleanly, but also allow the problem application to be flagged. UPHCLEAN has an option to only report the problem applications without forcing open handles to close. To do this, edit the registry and add two keys at HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUPHCleanParameters. The keys, both DWORD, should be named REPORT_ONLY and CALLSTACK_LOG, and set to a hex or decimal value of 1.
  • Rarst #

    @deano fabaza Thanks for extensive comment and suggestion! I have no experience with that utility. Still with frequency of shutdown problems it may take a while before I have a chance to play with it (yes, I am writing this so next week starts with PC, or five, unable to shutdown on my table at work). :)
  • Schedule or prevent Windows shutdown | Rarst.net #

    [...] had posted how much fun dealing with Windows shutdown problems is. There is another common issue about Windows shutdown – no obvious way to turn it of other [...]
  • paul martin #

    uphclean solved my problem [ xp would freeze on saving your settings] thanks
  • Rarst #

    @paul martin Glad comments were of use to you. At times they surpass post. :)
  • nanda kishore #

    i faced this problem and solved after replacement of new smps.
  • Rarst #

    @nanda kishore Replacing what? :) Closest I googled is some power supply related stuff.
  • prit #

    I am facing shut down problem with Windows XP Professional.It always show shutting down and never shut down untill i forceably shut it down.But interestingly when i connect an external hard drive with my computer and then after try to shut down, it shut down automatically.Kindly help me to get rid of this problem.
  • Rarst #

    @prit Hm, likely some Windows files were mapped to that drive or something. I had experience with opposite situation - swap file was placed on external drive and without that drive system could not boot. Not sure what exactly can prevent shutdown in that manner.
  • Monte dahl #

    I have a fairly new computer and a fresh install of windows XPsp2 I had problems with the shut down. I installed sp3 I still have a problem with shut down I alt del clear and no programs are running I tried to put the windows disk in to repair but did not work and had to re install the sp3 still to no avail. windows will not shut down I never tried drivers or experienced any problems with drivers. the only way to shut it down is to tern the computer off with the power button but this is hard in the c drive. Is there a way to fix this?
  • Rarst #

    @Monte dahl There is a link at end of post to Microsoft resources on topic. There are two many things that can go wrong to just make a guess what is the issue with your specific computer.
  • joshua #

    I have a problem in starting up and shutting down,when i start the PC after the boot window appear, it will produce a sound a loud beeping... What that's beeping mean? And when i shutdown it will hang up, appearing "windows is shutting down", How i can i solve it, please help me.It's Windows XP i'm having have
  • Rarst #

    @joshua Sorry, this is way too vague to guess anything. You need someone to properly come and look at your computer.