Terms of Use For FixedByVonnie

By proceeding to access fixedByVonnie.com, you expressly acknowledge, and agree to, all of the following:

fixedByVonnie.com is a personal website and blog owned by Security Plus Pro LLC, which is being presented for informational purposes only. The views on this website are solely those of the website owner (and not those of any employer or of any professional associations affiliated with the website owner).  Any views expressed in this website and any information presented on this website, or in any of its blog entries, should not be relied on for any purpose whatsoever other than as the personal opinions of the website owner.  The website owner expressly disclaims any and all liability for any information presented on this site.  The owner of this website and its blog posts shall not be held liable, and shall be held harmless, for any errors or omissions in any information or representations contained in this website, or in any of its blog entries.  The website owner also expressly disclaims any liability for the current or future availability of any such information. The website owner makes no representations as to the accuracy or completeness of any information on this website or which may be found by following any link on this website. The website owner shall not be held liable for any losses, injuries, damages, claims, or causes of action, from the display or use of any information on this website or in any of its blog entries. If you use the information on this website, or on any of its blog entries, you do so solely at your own risk.

Why does my Windows 8.1 PC take forever to shutdown? - fixedByVonnie

Why does my Windows 8.1 PC take forever to shutdown?

Which of these scenarios is worse?  A computer that takes an inordinate amount of time to:

  • Start up or
  • Shut down?

Okay, I guess that’s like asking which is worse: a slow computer or a capricious computer?  In other words, both equally suck and one isn’t really any less annoying than the other.

But this is the thing: When my computer takes ages to shutdown it tempts me to my hold in the power button to force off the power.

I don’t want to wait for the computer to turn off – when I’m done with my PC for the day it shouldn’t merely acquiesce to my shutdown request; no on the contrary it should execute my commands with alacrity and turn itself off in a matter of seconds.

If your PC chronically founders when you tell it to power down then we need to find out why it founders. Is there an easy way to identify the programs or processes that are making a speedy shutdown futile?

Identifying the culprit

One of the most reliable means of identifying aberrant processes is using a free toolkit from Microsoft called the Windows Performance Toolkit which is part of a large software package known as the Windows Software Developer’s Kit (SDK).

I know “Software Developer’s Kit” may sound grandiloquent or even daunting, especially if you’re not a software developer; however, we’re not going to touch a single bit of code.

While it’s true that Windows developers use the SDK to compile and test code;  today we’re only going to analyze some data values so we can figure out what’s bothering your hapless computer.

Installing the SDK

First we need to download the right SDK.

There are different versions for Windows 7, Windows 8 and Windows 8.1 so make sure you grab version that matches your operating system.

Since I’m running Windows 8.1, I’ll demonstration how I got this thing going my OS. Click open the executable named sdksetup.exe and keep the default installation location.

You might notice the setup wizard requires a glut of space; at one and a half gigs this thing looks like a beast.

Fortunately on the third setup screen you’ll have the option to disable superfluous items.  I’ll show you that a little later.

Windows 8.1 Software Development Kit

On the next screen, opt out of the Customer Experience Improvement Program.

Microsoft has enough information about me, anonymous or not, thus I don’t feel compelled to give up anything else.

Windows 8.1 Customer Experience Improvement Program

Accept the license agreement…

Windows Software Development Kit License Agreement

The Software Development Kit comes chock full with a bunch of software libraries that aren’t really germane to what we’re trying to do; therefore, go ahead and un-check everything except the Windows Performance Toolkit.

Windows Software Development Kit for Windows 8.1

In the right pane you’ll see it includes:

  • Windows Performance Recorder
  • Windows Performance Analyzer
  • Xperf

That second guy there, Windows Performance Analyzer (WPA), is our ticket to shutdown speediness.  I’m going to show you how to use WPA, and his cousin Xbootmgr, to get to the bottom of the problem.

Click Install and you’ll be finished in 60 seconds.

Windows 8.1 Software Development Kit

Alright, now we’re done with the boring stuff.

Press Windows Key + x + a to open a Command prompt with Administrative privileges and navigate to the Windows Performance Toolkit folder.

Type this in:

cd \
cd  "Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit"

change directory to the Windows Performance Toolkit

Alright now save the changes from any documents, spreadsheets or projects you were working on and paste in the following cryptic command:

xbootmgr -trace shutdown -traceFlags BASE+DIAG+LATENCY -noPrepReboot

This tells Windows to trace the shutdown process and to do it immediately after you press the Enter key.

You should see a starting trace dialog box flash on the screen for an instant before your computer reboots itself.

Windows Development Kit Starting Trace

When it returns you’ll see something like this:

The trace you are capturing "C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\shutdown_BASE+DIAG+LATENCY_1.etl" may contain personally identifiable information

Windows Development Kit Shutdown

That’s good as it denotes the trace completed successfully.

Go ahead and open the Windows Performance Toolkit folder and then drag the trace file, which should be named shutdown_BASE+DIAG+LATENCY_1.etl, over the Windows Performance Analyzer file named wpa.exe.

Drag etl over wpa

This slick move forces the Windows Performance Analyzer to load all the trace data from the .ETL capture.

When it loads you should see a few items in the Graph Explorer sitting in the left pane:

  • System Activity
  • Computation analytics
  • Storage statistics
  • Memory facts
  • Power data points

Windows Performance Toolkit

I know this sounds crazy but you don’t need a Masters in Statistics to analyze the data here.

Let me walk you through how easy it is to find the processes that could be slowing down your shutdowns…

In the Graph Explorer, click open Storage, expand Disk Usage and double-click Service Time by Process, Path Name, Stack.

Windows Performance Toolkit

A bunch of data will take over your screen.  Let me break it down a little:

We can divide the right pane into two sections:

The top half lists your system processes and displays a graph that lists each process by how long it took to close (the horizontal axis) and how much memory was consumed at each time interval (the vertical axis).

The bottom half shows all your processes, the file path to the process file and the all important Disk Service Time column.

I want you to focus on this bottom pane.

The Disk Service Time column shows time values in millionths of a second, Microseconds.

So to see how long a particular process took to terminate just divide it by 1 million… just kick over the decimal point 6 places to the left to get seconds.

Since the column is Disk Service Time column is sorted with the longest close times listed first, I can start marching down the list to see the slowest processes.

Windows Performance Analyzer Process Path

In my example, I can see something called MsMpEng.exe took 257,250 microseconds to close.  That comes out to .2 seconds, which is paltry I know – but that’s besides the point.  I just wanted you to see where to go when you need to hunt down those slow processes.

If you click the little drop down arrow under the process name you’ll see even more data such as the human friendly name of the process in the file path.  Here, it looks like Windows Defender was nibbling on 56,254 microseconds of close time.

When you locate the offending process you can Google around to see if you need it and can then disable or uninstall it.

The Bottom Line

If your computer takes forever to shutdown then we use a broad stroke and start indiscriminately removing software or we can try a focused approach using the Windows Performance Analyzer.

It takes a little more work than uninstalling random files you think are responsible for the problem but it’ll give you value insights and empirical data to support your assumptions and justify your actions.

The Windows Performance Analyzer isn’t perfect and can be hard to decipher; however, if you give it a chance and it’ll reward you by helping you identify processes which are slowing down your shutdowns.

If you have any questions please share in the comments!


Connect with Vonnie on Twitter

Posted in Windows, Windows 7, Windows 8, Windows 8.1 Tagged with:
  • icabodmudd

    change rando to random

  • DesertRat

    Thanks for this tutorial. Of course my computer restarted like greased lightning when I did it via the command line. Sometimes it takes 15 minutes to shut down under normal circumstances. I have read that Windows 8 and beyond doesn’t do a true shut down, it caches certain aspects of the session so that startup times are faster. Is there any truth to this?

  • Jack Owens

    Just my two cents here. I first noticed this problem with my PC after installing a program called “Advanced Systemcare Ultimate” from iobit. HerdProtect identified everything about ASU being malware on it’s next scheduled scan. Digging through my computer, I deleted everything iobit related but still have this same problem. Hence, me being here. Aside from “System 4” my next thing taking a long time to shut down was Avast! antivirus. I’m not removing it and I don’t trust Microsoft Security Essentials to take care of my computer.

  • Toolmaker

    Live saver i was facing this problems whit months i did not want to preinstall my windows and finaly found a solution the hibarnate was causing my problem 🙂 thanks for sharing this stuff whit us 🙂 nice work