# change pio transfer mode to UDMA



## utsav (May 12, 2007)

most of us using optical drives and hard drives sometime or the other have to bear the problem of the transfer mode being changed from UDMA to pio.It is very irritating because the cpu usage shoots up to almost 100% and no multi tasking is possible. 


So have no fear because UTSAV is here.

I will give a step by step tutorial to change the transfer mode to UDMA from pio without reinstalling windows.

There are also some registry hacks so use them at your own risk.

to open registry editor goto start then click on run and type in 'regedit' except the quotes. press enter.

For optimum transfer efficiency, the IDE channels should be using UDMA (Ultra Direct Memory Access) and not PIO Mode (Programmed Input/Output).  But Windows frequently decides on many systems to use the latter.



So what’s the diff between the major transfer mode groupings?  It’s most importantly about what hardware in your system is providing the grunt for data transfers:
Mode	
Explanation

PIO	
Programmed Input / Output

The CPU manages the transfer of data between system memory and the storage device.  Supports bus speeds up to 16MB/sec, if your processor can keep up.  Nothing built this century should be using PIO.

DMA	
Direct Memory Access

The bus-mastering system controller (a.k.a. DMA controller) is programmed to manage the transfer, freeing the CPU to do other stuff while the DMA controller does its thing.  It’ll also support bus speeds up to about 16MB/sec.

UDMA	
Ultra Direct Memory Access

A modern (I think 64-bit?) version of the DMA method.  It’s the current standard for high speed storage devices with bus speeds up to 100MB/sec.




A maddeningly understated problem arises with how Windows locks down what it thinks is the best transfer mode for each of your IDE devices.  After the initial hardware detection, XP keeps a running tally of the number of times a drive fails access attempts.  When this cummulative number reaches six, it reduces the compatibility mode and tries again.  At first XP will try downgrading within the same transfer method, eg: from UDMA Mode 4 to UDMA Mode 3, but when these sublevels run out it will assume DMA is no longer available and permanently fail back to PIO Mode, because the transfer mode tweaking is one way (downwards)


SYMPTOMS:



When should you be sus that PIO Mode has become your permanent transfer method on one or all of your IDE devices?
Symptom	
Explanation

PIO Mode is specified in the Device Manager and refuses to switch back to UDMA Mode.

(IF YOU DON’T HAVE THIS SYMPTOM, DON’T BOTHER WITH MY FIX, DINGLEBERRY)	
Well yeah, that’s a giveaway.  There are settings in the Device Manager’s IDE/ATAPI Configuration that are supposed to let you select between “PIO” (why!) and “DMA if available.”  “PIO” is automatically specified here after a transfer mode failback.  You can’t change it back to “DMA if available” though: according to the system, DMA is now not available so the “Current Transfer Mode” will permanently & infuriatingly say “PIO”.  

Explorer.exe locks up and/or crashes during file transfers. Desktop icons & Taskbar crash & vanish for ½ min. Some Sys Tray icons don’t reappear.	
I frequently move files from an incoming drive to an archive drive prior to burning, as this performs a quick defrag of the highly segmented files that have been downloading.  With large files this incapacitates Explorer for six or seven minutes at a time (based on a 200MB file) if PIO is engaged.  Even refreshing the views of other apps is a supreme test of patience with non-CPU intensive programs bowing before the lumbering efforts of Explorer, redrawing the screen line by painstaking line.

All tasks (not just Explorer) accessing the drives seem highly CPU intensive.	
Explorer is a good example again, using 90-95% of my main CPU during file transfers instead of 3-5%.  Nero tends to use about the same instead of about 10-15% during DVD burns.  MediaPlayer frequently hit 99% when trying to play back video files situated on a PIO drive.  (Also, before killing the Windoze “Prefetch” - more on that issue which can also trigger a failback later - certain file types the cursor touched in Explorer stayed file-locked for about 30-60 seconds before they could be moved / deleted / renamed.  The Prefetch and PIO issues seem to inflame each other.)

Buffer under-run failures during burns, or the buffer continually runs dry on burnproof drives.	
When the hard drives fail to PIO mode, my 25MB/sec drive is reduced to 2½MB/sec and my 16MB/sec drive is reduced to 1½MB/sec.  (Nero was used to benchmark the drives.)  Since DVD 1x spin is 1.3MB/sec this was causing all sorts of malarkey during burns, with burning programs locking up, or the resultant disc being damaged.  It was taking 1½ hours to burn 4.7GB and another hour to verify, and heaven help me if I wanted to use the PC for anything else in the meantime!  1x spin burn should only take 54 minutes to write and 12 mins to verify on my system, and the PC can do most other things besides videos and high-end computer games at the same time.

Severely reduced video-DVD playback quality.	
choppy images and seeking almost impossible

 Go to..

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi\Scsi Port 0]

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi\Scsi Port 1]

Notes:  These keys are called SCSI solely for historic reasons; SCSI Port 0 is actually IDE1 and SCSI Port 1 is IDE2.



Modify..

DMAEnabled = 1 (DWORD value) note(select decimal)

Notes:  This is usually set to zero after a PIO failback.  Some systems may change your “1” to a “3” after a reboot - it seems to depend on how heavy your computer is already with DMA-enabled hardware.  One of my machines’ drives default to DMA3 and doesn’t seem to act any differently,


Go to..

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0001]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\0002]

Notes:  0001 is the key for IDE2 and 0002 is the key for IDE1, go figure.  The string associated to MatchingDeviceId will tell you for sure what you’re looking at (ie: “primary_ide_channel” or “secondary_ide_channel”.  If you don’t know what those basic nuts & bolts terms are, I really really really think you should stop what you’re doing RIGHT NOW.)  Also, you don’t need to remember that entire long-winded numbered key, 4D36-etc… I just scan the fourth octet of the first dozen Class keys for “6A”  (as underlined in the blue text above).



Delete..

MasterIdDataCheckSum

SlaveIdDataCheckSum

Notes:  If you don’t see a checksums associated with a particular slot, then there’s no device detected.  If you can’t work out which slot goes with which drive, well, that gives me misgivings about you messing about in RegEdit, but it doesn’t matter if you simply delete all the checksums in the 0001 and 0002 keys (there can be a max of two devices for IDE1, two for IDE2).  At the next login, WinXP will notice something is up when the detected devices don’t match the checksum flags and the device’s capabilities will be re-examined.



Delete..

MasterDeviceDetectionTimeout

SlaveDeviceDetectionTimeout

Notes:  Delete these keys if present, if you have a device that is not detecting or doesn’t already have a checksum associated with it.  If there’s a timeout=1 flag, Windoze doesn’t bother detecting for a device in that slot at login.  Again, this is just a detection flag, so it doesn’t matter if you delete them willy-nilly; if there truly is no device there, the timeout key will simply be recreated at next login.  If you still have access to a hard drive that has a timeout flag like this, chances are it’s running in the crippled “Dos Compatibility Mode” where XP is basically fudging your connection to it in real time.  I think you are told this under Device Manager > Disk Drives > (appropriate device) > General Properties tab, and also with a warning message at login.  If it is a newly installed device, you may have also forgotten to assign a partition and/or drive letter to it using the Microsoft Management Console: Start > right-click My Computer > Manage > Storage folder > Disk Management console.  Not recommended for n00bs! Very dangerous!



Create..

ResetErrorCountersOnSuccess = 1 (DWORD value)

Notes:  If this flag is present, the running tally of device access failures is reset to zero after every successful access.  (I mentioned earlier that a transfer mode downgrade is triggered after a sixth cummulative failure.)  Hopefully, this will lengthen the time before your next PIO failback as you’ll need six consecutive failures to trigger it.

ADDENDUM – Microsoft finally released a "patch" for the failback behaviour.  However, after minimal scrutiny all this atapi.sys upgrade really does is change the trigger requirement of six cummulative fails to six consecutive, which is what we've been doing for ages with this reseterrorcounters flag anyway.  *sigh*  /



Reboot..

Notes: After you’ve rebooted, go back into the IDE settings and see if DMA is available now.  If the Current Transfer Mode is still PIO, then I wash my hands of you.

 I am attaching a screenshot of the registry editor which might help you.I am giving the link.
*www.thinkdigit.com/forum/attachment.php?attachmentid=842&stc=1&d=1178949891

please rate my tutorial if its of any good to you.


----------



## REY619 (May 12, 2007)

Whoa!! Great!! Well Done.


----------



## hemant_mathur (May 12, 2007)

Put an option for 'A Few times'. I'll vote for that.


----------



## entrana (Aug 19, 2007)

umm this is too hard ill tell an easy way wihtout doing any registry stuff
1.right click on mycomputer- device manager u know
2. find the ide/atapi driver thingee that is ur burning drive usually its primary
3. if its says pio uninstall the driver
4. restart windows and its gonna reinstall drivers under udma there 
as easy as 1-2-3-4


----------



## phreak0ut (Aug 20, 2007)

Where do you check if it's PIO or not??  In the Drivers tab? I didn't find anything related to it. A screenshot please?


----------



## infra_red_dude (Aug 20, 2007)

device manager> ide/atapi controllers> primary/secondary> properties > advanced tab.

*www.thg.ru/storage/20020410/images/lideprop.jpg


----------



## Rollercoaster (Aug 22, 2007)

if the PIO mode has been reverted to by windows it will not be reset upon uninstall/reinstall of the device as the checksum remains in the registry..

there are tools available to do this for u.. i had one but lost it.. u can try google tho

see this thread.. good one.. the discussion here is around 4 years long!

if u want even more see MS's help on - *IDE ATA and ATAPI disks use PIO mode after multiple time-out or CRC errors occur*


----------



## utsav (Aug 22, 2007)

a tool to delete the checksum will be good but the registry editing also does the same work although it takes some more time.


----------



## entrana (Aug 27, 2007)

really i had this problem 3 DIFFERENT TIMES i just uninstalled the driver of my burner restarted and boom there was found new hardware with udma dum u shud try this before saying stuff einstein i am sure this works because i tried this 3 DIFFERENT times now if  u tried it and then it doesnt work then im sorry


----------



## utsav (Aug 28, 2007)

why to take a risk of reinstalling xp again.if removing the driver doen't work then u will be stuck with a handicapped ODD until u reinstall xp again


----------



## entrana (Aug 28, 2007)

im NOT saying REINSTALLING XP dude im saying reinstalling the DRIVER of the DVD DRIVE
get it? of course once u uninstall the pio mode drive and restart the os it would come up that new hardware found and ittl be udma no risk at all at its alot easier than registry stuff


----------



## utsav (Aug 28, 2007)

^^ doood i am saying that i hav tried uninstalling the driver of the dvd writer
and ended up with a undetected drive and all i had to do is reinstall xp to get my drive detected. although it is a veery rare case and it may happen.

now i think u got it entrana(ayush-gupta)


----------



## entrana (Aug 28, 2007)

ooooooooooooooooooooooooooo sorry
wait wait wait u WHAT u had to reinstall xp? wow i never thought that was possible sorry dudes but it worked with me 3 times and i read it somewhere in the net so i thought it shud have work sorry utsav really really sorry hope all ur files and stuff are fine


----------



## utsav (Aug 28, 2007)

it happened to me a long time back.from then on i delete the checksum from the registry and stay fine. and 1 important thing.i never store any imortant file on my c drive.


----------



## phreak0ut (Aug 28, 2007)

@Infra-Thanks for that. I was checking under the CD drive section. My bad


----------



## utsav (Aug 30, 2007)

always check in the device manager first and if it does not works then go for registry editing


----------



## kaliopa (Nov 21, 2007)

I registered here because I simply had to thank you on this tutorial. It's fantastic, worked like a charm, everything is normal again. It's not difficult to understand and it doesn' t take too much time. I agree that it's better to do it this way than to risk reinstalling OS just so you can spare a few minutes. Thank you so much!!!!!!!


----------



## praka123 (Nov 21, 2007)

there is "resetdma.vbs" na!try that!
*svp.co.uk/helpdesk/index.php?_m=downloads&_a=viewdownload&downloaditemid=15


----------



## utsav (Nov 21, 2007)

kaliopa said:
			
		

> I registered here because I simply had to thank you on this tutorial. It's fantastic, worked like a charm, everything is normal again. It's not difficult to understand and it doesn' t take too much time. I agree that it's better to do it this way than to risk reinstalling OS just so you can spare a few minutes. Thank you so much!!!!!!!



thanx very much dear.i am very happy that my tutorial helped u


----------



## trupson (Nov 23, 2007)

I created a small program in Delphi that modifies all the registry entries like this tutorial says. If anyone's interested, I could upload it here.


----------



## kayos (Jan 6, 2008)

entrana said:


> umm this is too hard ill tell an easy way wihtout doing any registry stuff
> 1.right click on mycomputer- device manager u know
> 2. find the ide/atapi driver thingee that is ur burning drive usually its primary
> 3. if its says pio uninstall the driver
> ...



sorry mate .. as u have re-re-re-re repeated but it didnt work for me .. everytime it reinstalled in PIO only...utsav maybe right abt CHECKSUM thingy...



utsav said:


> always check in the device manager first and if it does not works then go for registry editing


yes .. i just did that ,, changed it manually from PIO to DMA and restarted .. it changed to ULTRA DMA 4


thnaks alot utsav.. nbut really it was a lill tuff for me doing all that .. the only tuff part was how to locate which port my drive is installed into .. 
but overall a very very useful post .
thanks alot


----------



## bigdaddy486 (Jan 6, 2008)

What is Multi-Word Dma?


----------



## utsav (Jan 6, 2008)

@kayos thanks for ur compliments
.


----------

