Problem solve Get help with specific problems with your technologies, process and projects.

How to troubleshoot a Windows system that won't shut down

Tracking down what's keeping a Windows desktop from sleeping requires looking at power management. Our expert helps you tackle the problem.

My Windows system refuses to sleep or hibernate. What could be wrong?

A Windows computer that won't sleep, hibernate or shut down correctly is typically experiencing a problem with Windows power management.

Power management problems can be tough to track down since they spring from how various system components (including the operating system) depend on each other. A single device that doesn't support sleep modes, a buggy BIOS or a badly written program could be the culprit. And sometimes there's not one culprit but a whole collection of elements interfering with sleep.

Symptom 1: The system fails to sleep at all.

The most common symptom is a system that attempts to go into sleep mode, but then immediately wakes up for no apparent reason. (Or it may simply fail to sleep at all -- or the sleep option just isn't present in the shut down menu.)

In this case, the first step is to diagnose the components of the computer -- including the PC itself, its BIOS and power-management subsystems -- that might be blocking sleep mode.

Windows Vista and Windows 7 have several tools that allow detailed debugging, the most powerful and significant being powercfg command-line utility. Running powercfg from a command prompt -- preferably one where you have admin privileges -- will give you details about what happens when your system tries to sleep.

The first command you'll want to run is powercfg -a, which dumps out a list of sleep states available to the system. If some of the sleep states are not available, powercfg will attempt to report why they can't be used. Sometimes the system's BIOS needs to be updated to support those modes; other times the BIOS supports sleep states, but its current settings have disabled those functions. Note that if, for example, the system supports S1 and S3 but not S2, this generally isn't a problem. Many systems don't support S2 but can still sleep and hibernate without issues.

More advice from our Windows expert

What to look for when switching from 32-bit to 64-bit Windows

Assigning the right drive letter for a USB drive

Steps for solving the reboot loop problem

In addition, there may be a given device that is preventing the system from entering sleep mode. Sometimes the system alerts you of this and names the device if the system fails to sleep. The device in question often sports an out-of-date driver, and a simple update may solve the problem. Sometimes the problem is a cross-interaction between other software, although these can be difficult to debug without feedback from other users.

One way to garner data about what might be keeping the system from sleeping is powercfg -requests, which lists all the current system requests being made by various programs that could prevent the computer from sleeping. For example, I had music playing when I ran that command, which produced a list of requests including a reference to my "USB audio device" with the notation "An audio stream is currently in use." Many of these requests can be overridden by the system if the program making them has been written to honor sleep mode correctly. So if something shows up on this list, that doesn't make it a surefire culprit -- it's just something to investigate further.

Symptom 2: The system wakes up for no apparent reason.
This one is almost as frustrating: The system does sleep, but it wakes up either almost immediately or at random times. A good way to tease this out is with the powercfg -lastwake command, which names the last device to wake the system.

If you run powercfg -devicequery wake_armed, you can obtain a list of the devices that are "armed" to allow the system to be awakened. Most of the time, the list will look like this:

Microsoft USB IntelliMouse Optical (001)
HID Keyboard Device (006)
HID-compliant mouse (004)
HID Keyboard Device (012)

If you see something that you don't want to wake the system -- like a network connection -- you can disarm it with the command powercfg -devicedisablewake , where is the name of the device in quotes. For example, to disable the device "Intel(R) 82566DC-2 Gigabit Network Connection (002)" in the powercfg -devicequery listing, type:

powercfg -devicedisablewake "Intel(R) 82566DC-2 Gigabit Network Connection (002)"

The quotes allow powercfg to properly understand the full name of the device. Any number in parentheses after the device name should also be included.

I mention the network device here as a specific example because one of the most common culprits for this problem is "wake on LAN," a feature where a computer can be roused out of sleep mode by a certain network signal. Sometimes it works a little too well, and the computer wakes up when it receives almost any random network traffic.

Furthermore, the system could be waking up randomly because it has been timed to do so by a scheduled task. Again, powercfg comes to the rescue: Use powercfg -waketimers to see if the system is scheduled to wake up at any particular time by a given task. You can disarm the items through the Task Scheduler, but note that some of those tasks may have been set up for a reason like system or administrative maintenance.

For further details, powercfg -energy can be run to generate a detailed report in the form of an HTML file (energy-report.html) in the current directory. The "Errors" and "Warnings" sections contain details about devices that may be preventing sleep mode. Make sure to close all programs before running this commend so you don't receive false warnings.

Symptom 3: The system sleeps, but does not hibernate.

The most common reason a system can't hibernate is because the hibernation file -- the file on disk where the contents of memory are written when the system hibernates -- has been deleted or hibernation has been explicitly disabled. It can be turned it back on with powercfg -h on. This command should also provide feedback if hibernation can't be re-enabled.

Windows can also fail to hibernate if the system was set up to dual or multiboot with another operating system. Since Windows tends to be finicky about being the primary OS installed on a computer, it will not hibernate if it detects that the partition marked for startup on the first hard disk is not itself a bootable Windows drive.

Side note: Hibernation is not always available as an option in the Windows 7 shutdown menu. This is partly because by default Windows 7 sets up "hybrid sleep" in which the system is suspended but a hibernation file is also written out to disk as a backup in case of a power failure. The system stays in this mode for the length of time dictated by the power plan, found in Advanced Settings under Sleep | Hibernate after.

While this isn't as problematic for a desktop, many notebook users find it annoying. To disable hybrid sleep entirely -- and make hibernate an explicit option in the shutdown menu -- edit the power plan's advanced options and set Sleep | Allow hybrid sleep to Off. Another option is to have the computer's power button enable hibernation while closing the lid or selecting Sleep from the power menu. You can set this behavior from the Power buttons and lid options in the power plan's advanced options.

Symptom 4: The system crashes on resume.

If a system crashes on resume for no apparent reason, the hibernation file itself may be corrupt. I once had this happen when a disk error damaged the hibernation file. When I deleted and recreated the hibernation file, the issue was resolved. The Powercfg command can do this through a variant of the tip mentioned in Symptom 3: First run powercfg -h off to turn hibernation off, and then run powercfg -h on to restore it.

If that doesn't work, you're likely dealing with a flaky device driver. Use a tool like BlueScreenView to retrieve information about the crash, and see if there's an updated version of the offending device driver. Check if a hotfix is available or make sure you have the most recent service pack for the operating system. If everything checks out, it may simply be buggy and might have to be disabled entirely for the system to work.


Serdar Yegulalp is editor of the "Windows Power Users Newsletter." Check it out for the latest advice and musings on the world of Windows network administrators..

Dig Deeper on Microsoft Windows 7 operating system

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

I was hopeful to come across a solution for my particular problem in your article. It is however good advice none the less.

My issue is with shutting down my desktop as well it not being able to wake up once in sleep mode (which it has no problem going to sleep). I have done countless things to resolve both issues which I suspect are connected. All drivers are up to date, all windows updates are to date. It is also a fairly new computer as well.

More details: 1. Upon shutdown; PC follows proper shutdown procedures. However it does not complete the action once initiated. It gets stuck on the "loading icon for shutdown" and does not shut down at all and I mean for hours it will be stuck the blue shutdown screen. The loading icon will work at first and get frozen. I thought the first few times I came across this problem it might be installing windows updates, or maybe the background programs were still shutting down. However, I come across this problem on every shutdown. At some point I just stopped shutting down the PC and let it go on Sleep mode. Which is when I found out that I was having my second problem.

Upon "Sleep Mode" everything goes to sleep properly. Only problem is I cannot wake up the PC from moving the mouse or using the keyboard or even touching the power button on the tower. I did make sure that all of these methods enabled the PC to wake up of course.

As I am not sure what else I need to talk about here I will post my PC specs. Thank you in advance from any advice/guidance you are able to provide.

- D.

PC specs;
Machine name: OWNER-PC
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144)
System Manufacturer: Gigabyte Technology Co., Ltd.
System Model: To be filled by O.E.M.
BIOS: BIOS Date: 01/22/13 11:49:51 Ver: 04.06.05
Processor: AMD FX(tm)-8350 Eight-Core Processor (8 CPUs), ~4.0GHz
Memory: 8192MB RAM
Available OS Memory: 8152MB RAM
Page File: 2108MB used, 14194MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7601.17514 64bit Unicode
Card name: AMD Radeon HD 7900 Series
Manufacturer: Advanced Micro Devices, Inc.
Chip type: AMD Radeon Graphics Processor (0x6798)
DAC type: Internal DAC(400MHz)
Display Memory: 2771 MB
Dedicated Memory: 3047 MB
Shared Memory: 3820 MB
Current Mode: 1920 x 1080 (32 bit) (60Hz)
What if your computer is very slow at shut down
Read complete 10 steps to speed up the shut down process on

1. Page File Problems causing very slow shut down

When Clear paging file at shut down option is enabled for security reason, it causes the system pagefile to be cleared upon clean shutdown. This takes considerable time of the Operating System to flush-out the pagefile, thus causing the slow shut down.

Disable the clearing Pagefile at shut down option to increase the shut down speed.

Open regedit.exe and go to the following directory:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

Now, Find the registry entry named ClearPageFileAtShutdown in the right pane. If it is set to 1 it is enabled, and may delay the shut down process. Right-click it, select Modify, and change the value to 0.

it could also be very slow because of hard drive issue you need to run check disk to find any issue and fix them.

Type CHKDSK /F /R at command prompt to schedule check disk on windows root drive C:
Hi, my laptop is able to shutdown and restart but is doing only hibernate and sleep. What should I do?