xp is *NOT* flushing disk cache before shutdown

S

Shutdown

What patch etc. do I need so that XP-pro sp1 will delay
shutdown until the drive completely writes everything.

I've noticed many times that during shutdown, it gets to
the shutdown screen and there's a long pause by XP
(presumably the delay to allow the disk caches to flush),
then a lot of frantic disk head movement and then the
drives shut down the instant that's done, or perhaps even
before it's down.

And occasionally when I boot up later, it says it didn't
shutdown properly and checks my drive. Proof that XP
isn't waiting for the drive to flush its cache.

And sometimes it wont boot at all. I have to boot in safe
mode, then shutdown, and then when it starts up it works
okay.

I know W98, W98se and Wme used to need a patch to delay
shutdown until their cache & and the hard drive cache was
flushed.

XP shouldn't need that.

But apparently it does.

Is there a patch? Is there a registry entry I can modify
to increase the shutdown flush delay?

Is there any way I can manually force everything to flush
before I shutdown XP?

I asked this question in here a few days ago and didn't
get an answer, so I figured I should repost.
 
M

Michael Solomon \(MS-MVP Windows Shell/User\)

First, be sure your antivirus software has the latest definitions and run a
virus scan.

Second, download, install and run Ad Aware:
www.lavasoftusa.com
Note: you should always be well backed up before running an application of
this type.

If your system is clear of viruses, open Control Panel, open System, go to
the Advanced tab, click Settings under Startup and Recovery, remove the
check from "Automatically Restart" under System Failure. This will cause
the system to blue screen instead of restarting on errors and the
information on the blue screen may give a clue as to the source of the
issue.

Open Control Panel, open Administrative Tools, open Event Viewer, look for
errors corresponding to the crash, double click the error, the information
contained within may give a clue as to the
source of the problem. If you don't understand the information inside, the
third button down in that dialog box will copy the information,
you can then paste it into a message and post it here and maybe we can
figure out what is going on.

Assuming you have an XP CD and not a recovery CD, place the XP CD in the
drive, when the setup screen appears, select "Check System Compatibility,"
the report it generates may point to problem hardware or software on your
system. If you do not have an XP CD, you can download this application
known as the Upgrade Advisor from the following site:
http://www.microsoft.com/windowsxp/pro/howtobuy/upgrading/advisor.asp
Note: If you have access to a broadband connection it might be best to
download using that as this is a rather large download.

Check for the latest drivers for your hardware, especially your graphics
card and soundcard and all peripherals connected to your system. Do not use
Windows Update for this, go to the device manufacturer's web sites and if
you install updated drivers, ignore the message about drivers being unsigned
by Microsoft. *Before installing any drivers, be sure you are well backed
up and it's probably a good idea to manually create a restore point in
System Restore in case you have problems as a result of the driver update
and note, System Restore is not a substitute for a backup. Start\All
Programs\Accessories\System Tools\System Restore
 
S

Shutdown

No, it doesn't help.

The problem isn't that tasks aren't shutting down, it's
just that, for whatever reason, XP doesn't seem to be
waiting long enough for the disk I/O to finish before
shutting the power off.

XP is (or should!) shutting everything down, and saving my
current settings. Then it pauses to wait for the disk I/O
to finish before turning the power off.

But for some reason, it isn't finished by the time XP
decides it has waited long enough.

XP hard codes the delay time and if that's not enough,
you're screwed.


Thanks for the effort though.
 
S

Shutdown

No viruses, and I have both Adaware & Spybot Search &
Destroy.

I've tried a couple different versions of my chipset
drivers and video drivers (for different reasons) and the
problem exist regardless.

I have already removed the 'reboot after error' setting
because I dislike that on priciple. And the problem I'm
having isn't that xp is rebooting, but that it's not
shutting down properly (or rather, it is shutting down
properly but before all the disk I/O is completed before
XP turns off the power.) (And because of that, sometimes
has problems booting.)

I did look through the event viewer and I didn't see
anything related to shutdown. I do see an ACPI problem at
boot though, although it's not fatal. (I've checked
Micrsoft's link and it's not fatal.) I didn't know that
issue existed, although there's nothing that can be done.

Since this is a used computer, I did download the "XP
compatability" program from microsoft before I even put xp
onto it, and it said it was okay. And since then, I
haven't had any other issues.

So, unfortunately, none of your suggestions helped, but I
do appreciate the effort.

It just seems that after XP shuts down all the tasks, and
then it saves my current settings, that it doesn't wait
long enough for the disk I/O to complete before turning
off the power. It almost waits long enough, but not
quite. Sometimes there's enough disk writes and head
movements that it's not quite done when XP turns off the
power. And that last little bit of data gets corrupted
and occasionally is important enough to cause boot
problems at the next boot.

That is a hardwired value, and maybe this system is just
odd enough to slightly exceed that built in time delay.
Back when they issued the Win98 patches for this, they
clearly said that the issue applied to all OS's and that
it's not windows specific. So maybe when they increased
the delay for XP, they didn't do it quite long enough.

I've run disk scans and surface scans, and there aren't
any disk errors causing delays or such.

I dunno... Maybe at some point some program changed some
registry value and that's what is causing problems. Maybe
I should try re-installing, but that's a lot of trouble to
fix a Microsoft problem.


Thanks anyway.
 
M

Michael Solomon \(MS-MVP Windows Shell/User\)

When you run the compatibility wizard, aside from XP, was everything that
you have installed on the system now, hardware and software, installed on
the system then? Just trying to cover all possibilities.:)
 
G

Guest

No. At the time, I had Win98 on there and was using it
for basic web surfing. I had very little installed.

The only things the compatability wizard complained about
were drivers (video, etc.) I did a fresh installation of
XP with freshly downloaded drivers (and have updated
since.) So other than a few minor programs (winamp, etc.)
there are no programs that were installed on both W98 and
XP on this system.

Since installing XP, it's become my main machine (it's not
fast enough to run the kid's games, so they took over the
fast one.)

So I do have a lot of stuff on here now that I didn't have
before.

I guess the only thing I can think of (since nobody seems
to know how to extend the shutdown flush cache delay) is
to wipe the C: partition, install XP fresh, re-activate,
and install one or two things at a time.

A lot of trouble. And I can't do it too many times
because of the activation. (I had heard that if you save
the wpa files, you can simply restore those if you re-
install, but a friend says he's tried that repeatedly and
they unequivocally do not work with sp1. They always get
rejected.)

I guess I can run it for a while without activating it,
but it's still going to be a lot of trouble tracking it
down. Especially if it turns out to not be an install
program causing the problem but just some quirk of my
hardware.

Thanks for the effort though. Oh well.
 
M

Michael Solomon \(MS-MVP Windows Shell/User\)

First, you might try running the compatibility wizard again, it's easier
than formatting and it might just turn something up.

Saving wpa generally will not work to get around activation and it isn't
necessary. You can activate as often as you want as long as it is the same
machine.
 
B

Bill Drake

This is a known problem, both in W2K and in WXP. The
shutdown handling in WXP was specifically rewritten to
improve the reliability of the disk-cache-flush process, but
as in all things there are "gotchas". See the following...

Background Info:

1. The shutdown process is *initiated* by Windows. It
is *finalized* by a combination of BIOS, hardware and
firmware routines. As a result, your problem can
occur in *any* of five areas.

a) BIOS (specifically, the power-management routines)

b) Disk controller hardware

c) Disk drive firmware

d) Disk controller drivers

e) OS


Things to try:

1. Ensure your motherboard BIOS is up-to-date. The power
management routines in the BIOS are *intimately* tied to
how the shutdown process is managed. Lots of bugfixes
here that are undocumented...

2. Ensure your motherboard chipset drivers are up to date.
Again, there are bugfixes here that interface to the BIOS
updates -- many undocumented items here as well.

3. Try both the Microsoft Hard Disk drivers and the chipset
drivers. Use whichever set gives you *reliable* operation.

There are known problems with some chipset driver sets
which are fixed by using the Microsoft drivers. (Some of
the "go fast" routines in the chipset hard disk drivers give
increased speed at the cost of stability...)

Note: The Highpoint HPT366 driver set Version 1.25.1 is
known as the most stable version under both W2K
and WXP. The Version 1.30 set is known to fix
problems with some IBM drives -- but the usual
recommendation here is to change the drive to a
make, model and firmware revision which works
properly with the 1.25.1 drivers.

4. Ensure you have completely updated your OS. Both W2K
and WXP have specific hard disk controller and OS
interface-control updates to address this problem. Do *not*
assume that because this issue is poorly documented there
is no reason to update -- many of the fixes for this problem
have been rolled into other what-look-to-be-unrelated updates.

5. Hard Disk Drive Firmware is the final item in this mix. I have
documented the following:

a. Fujitsu IDE Hard Disk drives have stability problems with
the Highpoint HPT366 controller under W2K and WXP that
do not appear under W9x. Upgrading to XP will probably
require Hard Disk replacement.

Note: Fujitsu IDE Hard Disks are known to fail catastrophically
under W2K and/or WXP without warning. (The drives
run much hotter under W2K/WXP than under W9x -- the
extra heat causes one of the chips on the drive's PC
board to fail unpredictably and catastrophically). I have
seen this happen personally with two of my clients -- in
both cases they had off-disk backup (tape), otherwise
they would have lost everything.

b. Maxtor 6Y-series Hard Disks have problems with early firmware
revisions which cause the drive to *fail* to properly disable the
hard drive internal disk cache at the beginning of the shutdown
process -- if the drive is connected to a Highpoint HPT366 IDE
controller chip. Later drives have firmware revisions to address
this problem.


See the following URLs for more info on this subject:

http://support.microsoft.com/?kbid=259716

http://support.microsoft.com/?kbid=281672

http://support.microsoft.com/?kbid=290757

http://support.microsoft.com/default.aspx?scid=kb;en-us;811392


Best I can do for now. <tm>


Bill
 
G

Guest

My computer isn't shutting down. When I try shutting it down it only restarts. Can you help me???
 
B

Bill Drake

Hi, Kelly. The following are the results of my latest investigations
regarding the HPT366 Controller Chip problems with both W2K
and WXP -- where the OS is unable to flush the hard disk cache
before shutdown.

This text is taken from an email I sent to Highpoint in regards to
this issue:

----------------------------------begin email text--------------------------

I have three different clients using the Abit BE6-2 motherboard.

In each case, when I have upgraded the user to Windows 2000
or Windows XP, the system has become unstable on shutdown.

I have upgraded each machine to the latest version of the Abit
Motherboard BIOS available for this motherboard. I have also
manually added the latest Version 1.28b BIOS insert in place of
the 1.25 insert found in the latest version of the Abit BIOS.

The 1.28b BIOS solves the problem of an invalid disk size display
for drives larger than 64GB. (I am using 80GB or 120GB drives
in the three machines under test).


However, the disk-controller driver used under both Windows 2000
and Windows XP is Version 1.25.1. As far as I am aware, this is
the latest driver available. I am using the 1.25.1 drivers, as the info
in the 1.25.1 archive has later filedates and newer info than the files
in the 1.28b driver archive.


The 1.25.1 driver -- as well as the various beta drivers -- are unable
to communicate between Windows 2000 or Windows XP and the
hardware cache on the Hard Disk. As a result, at Windows shutdown
the machine shuts off while there is still info in the drive's hard disk
cache. This leads to Windows 2000 or Windows XP's scandisk
running on the first restart after shutdown. Scandisk then identifies
lost clusters on the hard disk which were not properly flushed from
the hardware disk cache to the hard disk platters before the
preceding shutdown.

I have confirmed the problem occurs due to a communication error
in the driver. The Windows 2000/XP dskcache tool identifies the
problem as follows:


Error getting Write Cache value.
(1117) The request could not be performed because of an
I/O device error.


According to the Microsoft Knowledge Base Article 811392, the
above error occurs because of a flaw in the hard disk controller
driver -- which does not properly pass cache-control and status
info between the OS and the Hard Disk.

The Microsoft Information for the above error is as follows:

This error message indicates that the disk device does not
return information about its write caching status in response
to the appropriate SCSI or ATAPI command. This error
message is simply an indication of the capabilities (or lack
thereof) of the device or its driver, and it typically implies
that either the device does not support write caching or that
the device driver does not support the commands that are
required to query and set the device's write cache setting.

To resolve this issue, contact the vendor of the disk device.


For further info on the disk tool and the results from queries
and commands to the Hard Disk through the dskcache tool,
please see the following Microsoft Knowledge Base article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;811392



The four different Hard Disk drives I have tried are:

a) Maxtor 6Y080L0 - 80GB, 7200RPM,
2MB onboard hardware disk cache,
firmware version YAR41BW0

b) Seagate Barracuda 7200.7 - ST380011A - 80GB, 7200RPM,
2MB onboard hardware disk
cache, firmware version 3.06

c) Seagate Barracuda 7200.7 - ST312022A - 120GB, 7200RPM,
2MB onboard hardware disk
cache, firmware version 3.06

d: Samsung SpinPoint P80 Series - SP8004H - 80GB, 7200RPM,
2MB onboard hardware
disk cache, firmware
version TK10



I observed the following deficiencies:

a) Both Seagate drives stalled during write operations when
moving large files or large numbers of small files under
Windows XP. In some cases, Windows XP recovered after
about 5 seconds and continued operation. In other cases,
Windows XP stalled completely and required a hardware
power-off-reset to regain control of the OS.

Upon restart after a complete stall, Windows ran chkdsk on
startup and found a large number of lost clusters.

b) The Maxtor hard disk was able to reliably complete disk
write operations when moving large files or large numbers
of small files under both Windows XP and Windows 2000.
However, the Maxtor hard disk would intermittently fail to
write all its files to disk before shutdown, leading Windows
2000 or Windows XP to run chkdsk on startup and find
small numbers of lost clusters.

The disk-cache-commit failures would cause the OS to
gradually degrade, as in some cases the info in-cache at
shutdown was Registry updates made as a result of the
installation of software patches from Windows Update.
In some cases, this would result in substantial damage
to Windows 2000 or Windows XP which required full OS
reinstallation to resolve.

c) The Samsung disk drive was the most reliable of the
three brands tested. This drive was able to reliably
complete disk write operations when moving large
files or large numbers of small files under Windows
XP. However, the disk-cache-commit failure would
occasionally leave the Windows XP disk-dirty-flag
set on shutdown, leading Windows XP to run chkdsk
on the next startup. Chkdsk would run, find no errors
and Windows XP would then start up normally.

d) With both the Maxtor and Samsung drives, instructing
Windows 2000 or Windows XP to perform a restart
rather than a shutdown -- and then manually shutting
down the machine using the power button at the BIOS
startup screen -- allowed the Hard Disk to reliably
flush its cache buffers. Windows started normally
on any subsequent restart if this procedure was
performed -- which confirms the need for functional
cache-control so Windows 2000 or Windows XP can
shut down safely.



For now, I am running the Samsung disk drive in one of
the affected machines, as this client is a Doctor who
requires a working machine. The other two machines
are awaiting further developments. Please advise if disk
drivers capable of working reliably with Windows XP
and/or Windows 2000 will be made available for the
HPT366 Controller Chip.


----------------------------------end email text--------------------

Highpoint Technologies sent me a return email where they
told me they will not be supplying any updated drivers for
Windows 2000 or Windows XP for this controller chip.

The above leaves users with these chips as "orphans".
There is nothing particularly wrong with the hardware,
all that is required is a rewrite of the driver to properly
communicate the cache-flush and status commands
between the OS and the Hard Disk firmware.


If you could forward this info into the appropriate hands
for the Microsoft Driver Development team -- they may
be able to either make the necessary changes and add
an updated driver to XP SP-2 -- or they could talk to
Highpoint in regards to getting this problem fixed.



Thanks for any help you can provide.


Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top