Windows 8.1 freezing on shutdown

xero99

Honorable
Aug 25, 2013
330
0
10,810
Hi, my PC has started to freeze when shutting down. It doesn't happen all the time, but a lot of the time. I have to turn it off manually by holding down the power button. It's getting really annoying and i have no idea what's causing it. Please can anyone advise how to fix this or find the cause of the problem? :)
Sytem specs:
FX8350
ASUS M5A97 R2.0
Corsair vengeance 2x4GB DDR3 @1600MHz
Gigabyte R9 270X
XFX PRO 550W PSU

All my drivers are up to date and i built the PC myself.
 
Solution
edit:
you can confirm the problem as being a particular service by
run cmd.exe as a admin, run
net.exe start
this will provide a list of the services running
then you can
net stop "the service you want to stop"
then see if your shutdown works as expected, use the quotes around the service name if there is a space in the friendly name.

if it is not that, I would block the card from the network by doing a ipconfig /release command and see if it will shutdown
(a service still may block the shutdown)

sounds like you have a service running that is sharing streaming media and tells the system not to sleep.
powercfg /energy
or the powercfg.exe /requests should show the name.

Streaming media often will block sleep so they can stream to...
First try System File Checker
Winkey plus 'X'
Choose Command Prompt (Admin)
Type sfc /scannow then Enter

It finds and fixes errors in Windows, but doesn't always report them. Run it and see if the fault disappears after re-booting your system.

If that fails, try turning off hibernate, W8 uses it to achieve faster boot times.
Winkey plus X
Choose CMD (admin)
Type powercfg -h off then Enter
 
The system file check finished and it says 'windows resource protection found corrupt files but was unable to fix some of them.' When i try to look in the CBS log it says access is denied.
 

Just did the same on this machine as it wasn't running too well. Guess scroll down the txt file to see what wasn't repaired?
Probably should run SFC again anyway. I had no joy with the DISM, but this one worked and did some repairs

Dism /Online /Cleanup-Image /RestoreHealth

Try it, then run SFC again to see if it runs clear
 

Could try clean boot, starts windows with minimal processes, see if shutdown works, then enable groups at a time to see which one is causing the hang.
After that there is Refresh and Reset, but that would require re-installing software and loss of data in the case of Reset...
http://support.microsoft.com/kb/929135

 


I'll try that, however reinstalling or resetting windows is a last resort.. i have really bad internet and downloading all my games and programs again will literally take weeks.
 
I ran a clean boot and it froze on shutdown again so i guess it's likely that it isn't a third party software conflict causing the issue.

I know refresh leaves your files alone but i wasn't sure if it deleted any programs like Photoshop CC or Battlefield 4... so will it leave my program files alone and all programs will stay installed or will i have to download them again? Unfortunately i don't have access to a second storage device at the moment.
 

Sadly it does uninstall everything normally, though some have been surprised with programmes left intact.
However, it is still possible to perform what is known as 'Repair Install' which will preserve your 3rd party apps...
http://www.eightforums.com/tutorials/26095-repair-install-windows-8-a.html


 
The operating system will try to block a shut down of your system in certain conditions that would result in data loss. By forcing the shutdown you cause the lost of the data. A very common failure like this is caused by a disk drive that has lazy writes turned on. Basically that setting allows the system to just throw data at the drive and have the drive later confirm the write. Problem is some of the drives have bugs and never confirm the write so when you try to shutdown the system the system tells the device to flush its memory buffers on the disk to the drive and tell it that the data has been saved. (the drive does not respond and the system hangs)

you can also get this for other reasons, for example the shutdown event will ask running programs if to shutdown but some programs have the rights to block a shutdown and do so. These are often media sharing programs such as windows media center, or media extenders for the Xbox.
you have to make special settings in the control panel power management to have the system ignore their refusal to shut down.

There are other causes of the same behavior but those are the most common on a home network.

if you force the shutdown you will want to resolve the issue because your data that should be written to disk is being lost.
the sfc.exe /scannow command will scan only your core windows files for corruption if it finds a corrupted file, it looks in its local copy of the driver store (backup protected copy ) and restores it. If it can not fix the problem that means that both copies has been corrupted.

the dism.exe /online /check-image /restore-health command goes and gets a trusted online copy of the file to fix both of your local copies. Now you need to reboot and run the sfc.exe /scannow command again to make sure that you don't have a virus or malware just corrupting your files again. (if so, you have to virus and malwarebytes scan and go through the prococess again with the sfc.exe and dism.exe commands to get a clean system)
 
to turn off lazy writes on a hard drive. start control panel, administrative tools, select create and format hard disk partitions,
this will bring up the disk management. select a drive, right mouse click and select properties,select the hardware tab, select properties, select the policies tab. Unselect the check box for enable write caching on the device. This will disable a suspected broken hardware cache on a disk drive.

note: you can also have the same issue on a redirected drive, it can block the shutdown of a computer when the correct notification is not sent thru the network that the file has been commited to disk.


- there are also ways to turn on special logs for the logoff process that will tell you what it is waiting on.
regedit find
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ System
add the key verbosestatus as a dword with a value of 1 to enable the feature and 0 to disable it (or remove the key)
This will make windows tell you what it is doing as it works on its shutdown

- you can also querry the power management system to see if something is blocking shutdown
powercfg.exe /requests (if I remember correctly will list shutdown blocking requests)
powercfg.exe /requestsoverride command can be use to ignore drivers that block your shutdown requests
but you only want to do that if you don't care about the data stream being lost (audio or video)
 

Interesting stuff. Could a malfunctioning hardware cache also affect hibernate/sleep etcetera?
 
@dodger 46
I already tried a clean boot yesterday and with everything disabled it still froze

@johnbl
Thanks, i've just turned off lazy writes and added the key you suggested to regedit. It still froze with after turning off lazy writes. After running powercfg.exe /requests this is what it said.

SYSTEM:
[DRIVER] \FileSystem\srvnet
An active remote client has recently sent requests to this machine


Does that mean a driver is preventing the shut-down to finish properly, so if i override it what would be the disadvantages of the data stream being lost?