# During boot it keeps saying dma is off....[solved]

## Geshtar

So during my install, I followed the guide and did the step where they tell you to do some hdparm command to turn on DMA.  I figured that would do it, but now that the system is built, everytime I boot up - on every filesystem/partition it gives a big warning message to the effect of: dma is off on this drive, it will greatly slow down the fsck process.

so i was in the irc channel and one person had a few suggestions but they have not seemd to help.....Here is what I have done so far per that other person's suggestion, but it has not fixed the problem.

emerge hdparm

edited /etc/conf.d/hdparm     here is what it looks like

  disc0_args="-c3 -d1 -m16 -u"

  cdrom0_args="d1"

lastly,

  rc-update add hdparm default

Also of note, I have done 

   hdparm -i /dev/hda

to see what it thinks the drive is at, interestingly enough it has an asterik next to udma6 saying that is what is currently enabled...

Personally I am more inclined to believe the warning messages, as I would say the disk performance seems sluggish and it was only like 3MB/s when i did a 

hdparm -t /dev/hda

Any ideas on what is going on here and more importantly, how to fix it?

Thanks in advance.Last edited by Geshtar on Sat Aug 28, 2004 10:55 pm; edited 1 time in total

----------

## placeholder

Could you give the exact outputs of the commands mentioned along with hdparm -d /dev/hda?

----------

## Geshtar

bash-2.05b# hdparm -t /dev/hda

/dev/hda:

 Timing buffered disk reads:   18 MB in  3.22 seconds =   5.59 MB/sec

bash-2.05b# hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 6Y200P0, FwRev=YAR41BW0, SerialNo=Y62MM4SE

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=7936kB, MaxMultSect=16, MultSect=16

 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=268435455

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null):

 * signifies the current active mode

bash-2.05b# hdparm -d /dev/hda

/dev/hda:

 using_dma    =  0 (off)

Well comparing the results from -d and -t certiainly seems contradictory me.......I hope this provides some useful information to help with this issue.

Thanks.

----------

## lwithers

Have you got the correct drivers for your IDE chipset compiled into the kernel? (and not as a module). If you have, then try removing the hdparm startup script and see if that makes a difference.

----------

## Geshtar

what exactly would be the correct drivers for my IDE chipset?  I've looked in the list and I cannot find a specific one that matches.   I have a VIA 8235CE southbridge I think, but in the device drivers section for ATA the only choice for VIA is VIA82CXXX chipset, which doesn't quite match up... I am hesitant to try it incase it screws up the system if it is way off.

Here is what is checked by default:

ATA/ATAPI/MFM/RLL support

Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support

Include IDE/ATA-2 Disk Support

Use multi-mode by default

Include IDE/ATAPI cdrom support

IDE taskfile IO (experimental)

generic/default IDE chipset support

CMD640 chipset bugfix support

PCI IDE chipset support

Sharing PCI IDE interrupts support

Generic PCI IDE chipset support

RZ1000 chipset bufix/support

Generic PCI bux-master DMA support

use PCI DMA by default when available

Intell PIIXn chipsets support

also if I do end up changing somethng in my kernel, I will have to recompile it right?

----------

## lwithers

This is almost definitely the problem. Turn off support for the CMD640, RZ1000 and Intel chipsets -- they're not doing any good, just wasting space. Turn on the VIA support, it should definitely be the right chipset.

You will need to recompile the kernel. Once it is done, install the image in /boot and set up your grub/lilo config to boot it (make sure you always keep the previous kernel handy when upgrading, just in case you need to revert).

When you reboot into the new kernel, you should have DMA support.

----------

## Geshtar

well i disabled the unneeded drivers and made the via driver part of the kernel (not a module), copied the stuff to /boot, but it still does the same thing.

As I was re-going through the steps in the handbook though, I did have a problem redo-ing the grub stuff.  Since this system boots fine and runs fine(albeit slow) I figured grub was still installed.  So when I went to check on the settings in /boot/grub/grub.conf, the whole directory was not there.  so I did and emerge grub, and then the directory appeared, as did the grub.conf file, with the changes I had put in it during my initial install.  Which is confusing to me atleast. 

So I figured alright, it was somehow quasi uninstalled, so I will continue with the install steps.  When I did

grub-install --root-directory=/boot /dev/hda

it gave an error saying it could not find a BIOS device or something.  At that point I rebooted just to see if the kernel changes were picked up.  They appear to be, but still the "dma is off" messages appear.  The /boot/grub directory is also gone again I would like to add.  I'm a bit confused as to why that is as well.

Also one thing that I have since noticed is that when it is booting and listing lots of stuff, there is a line that says something to the effect of:

"Assuming ide0 to be 33mhz for PIO modes, override with idebus=xx"

could that be part of the problem?

----------

## dalek

When you said the directory was gone, you did mount /boot right?  If you followed the guide, it is not mounted when booting up.  Anytime you do something that needs to add files to or change files in /boot, you need to mount it first.  Usually a mount /boot will do.

Just checking.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

edit: clarifying a bit.

----------

## Geshtar

you sir are correct....I had not mounted /boot before I did an ls...that explains the disappearing grub directory/files

but still no clue on how to fix the dma problem....

----------

## dalek

It sounds to me like a kernel issue or a config file somewhere.  I must admit, mine worked first time so I have never had to kick it around.  I would use hdparm to cut on DMA manually, see if that works.  If it does then most likely the kernel is OK.  If it don't work, maybe it will give a error message that explains why.

man hdparm will tell what commands to give.  I can't recall them all at the moment.  It is pretty easy.  hdparm <option> <setting> /dev/hd* is usually the way.

Is weird though.    :Confused: 

Later

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## Geshtar

Well, I already had hdparm options in the hdparm script and had added it to the default runlevel, but I decided to try it manually and see what happened.  Here is what I got:

hdparm -d1  /dev/hda

the result was the following:

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

Does this mean something is messed in the kernel?  If so what?  For reference I've listed what is checked in the ATA section for the kernel config in an ealier post.   I have added VIA82CXXX support and removed CMD640, RZ1000, and Intel PIIXn chipset supports since that last post though.

Also I'm running a Maxtor 200GB 8MB PATA133 drive.  I have used it on other distro's with the same hardware and have had DMA working before.  Unfortunately they were Suse and Mandrake where everything is done for you, so I have no idea how those distro's made it work.

As always thanks.

----------

## Geshtar

One other observation.  When booting the computer tries to load a whole bunch of the modules I configured.  Then it checks the file system.  Then it seems to reload all or most of them again before I get the login prompt.

When it tries to load dpt_i2o the first time it fails, when it tries the second time, it succeeds.  I wonder if this is in anyway related to the problems.  I have no idea what that modules does.

Also any thoughts on that line when booting that says: "Assuming 33mhz for ide0 for PIO modes: override with idebus=xx"

----------

## dalek

It sounds like a kernel issue, or hardware, to me.  You may want to copy the config over, do a make mrproper clean and all that then copy config back over and redo it.  Maybe something is messed up somewhere.

This is what the screen looks like for mine, less the chipset specific stuff:

```
  │ │               <*> ATA/ATAPI/MFM/RLL support                                                           │ │

  │ │               <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support                               │ │

  │ │               ---     Please see Documentation/ide.txt for help/info on IDE drives                    │ │

  │ │               [ ]     Use old disk-only driver on primary interface                                   │ │

  │ │               <*>     Include IDE/ATA-2 DISK support                                                  │ │

  │ │               [*]       Use multi-mode by default                                                     │ │

  │ │               <*>     Include IDE/ATAPI CDROM support                                                 │ │

  │ │               < >     Include IDE/ATAPI TAPE support (EXPERIMENTAL)                                   │ │

  │ │               < >     Include IDE/ATAPI FLOPPY support                                                │ │

  │ │               < >     SCSI emulation support                                                          │ │

  │ │               [ ]     IDE Taskfile Access                                                             │ │

  │ │               [*]     IDE Taskfile IO (EXPERIMENTAL)                                                  │ │

  │ │               ---     IDE chipset support/bugfixes                                                    │ │

  │ │               <*>     generic/default IDE chipset support                                             │ │

  │ │               [ ]     CMD640 chipset bugfix/support                                                   │ │

  │ │               [ ]     PNP EIDE support                                                                │ │

  │ │               [*]     PCI IDE chipset support                                                         │ │

  │ │               [*]       Sharing PCI IDE interrupts support                                            │ │

  │ │               [ ]       Boot off-board chipsets first support                                         │ │

  │ │               <*>       Generic PCI IDE Chipset Support                                               │ │

  │ │               < >       OPTi 82C621 chipset enhanced support (EXPERIMENTAL)                           │ │

  │ │               <*>       RZ1000 chipset bugfix/support                                                 │ │

  │ │               [*]       Generic PCI bus-master DMA support                                            │ │

  │ │               [ ]         Force enable legacy 2.0.X HOSTS to use DMA                                  │ │

  │ │               [*]         Use PCI DMA by default when available                                       │ │

  │ │               [ ]           Enable DMA only for disks                                                 │ │

```

That may help.  I also have this line in my grub boot line:

```
kernel (hd0,0)/bzImage-gen-2.6.7test4 root=/dev/hda9 ide0=ata66 ide1=ata66
```

I'm not sure if that helps or not with the IDE speed and DMA stuff.

Later

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## Geshtar

well, I don't know how I fixed it exactly, but it is fixed.  My hd perfomance is up to 57.76 MB/s which is damn good.  I can already feel the difference in load times.  I think I might have not actually been copying over the recompiled kernel, earlier since I was not explicitly mounting /boot (which is a separate filesystem).

Anyways I'm very pleased, now on to the other problems...but thats another thread.

Thanks for all the help guys

-Geshtar

----------

## dalek

That is a LOT better for sure.  Most likely you where copying that kernel over to neverland, since /boot was not mounted.  I can't tell you how many people have done that, including me.  I actually made /boot mount at boot up.  If I get DSL or something instead of dial-up, then I'll worry more about security.

Glad you got it going.  Post a link to other threads, may can help there to.    :Shocked:    Once you get it working and stable, Gentoo is THE BEST.

Later

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## ailurus

I had the exact same problems with the same warning message at start-up.

After reading this topic I looked at menuconfig, all the dma support options, etc had been automatically selected, options as per specified in daleks kindly supplied config.

The only thing I changed was the chipset support setting from Intel to VIA (the chipset I have) Ooops *smacks own head for having compiled with wrong chipset.

No more error message  :Smile: 

I haven't noticed a marked difference in mozilla apps startup time tho

Hope this helps anyway

----------

## elBoB

i'm not quite sure if i have a problem.

hdparm without dma is 3.5 MB/sec

with -d1A1m16u1a64 I get 11.5 MB/sec

not much, but it's on an old laptop so it seems to be working.

when i reboot I still get the error message. but checking hdparm -tT shows that I'm still on 11.5

is the error message before hdparm is startet?

----------

## dalek

What exactly is the error message?  You can hit the scroll lock key to stop it and write it down or it may be in dmesg.

Might help if we have this message.

Later

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## gnolreve

I've been having trouble getting dma working, and i just wanted to say thank you for this forum cause now its working and im getting twice the rate on my hd  :Smile: 

----------

## dalek

Well post it so we can see.    :Shocked:   :Shocked: 

Glad you got it going though.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## cruelnovember

I also have the DMA problem. Seems to be a chipset problem. But how do I find out what chipset i am using? 

Thanks for help,

Paul

----------

## dalek

If you are booted from the CD, and maybe the OS itself, this should work:

```
cdimage root # lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 03)

00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP]

00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)

00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)

00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)

00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

00:0f.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)

01:00.0 VGA compatible controller: Intel Corp. i740 (rev 21)

cdimage root #

```

That is off a machine that I'm doing a install on.  I think this:

```
Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
```

is the important part.  I just try to match up the chip numbers.  It has worked for me so far.

Hope that helps.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## cruelnovember

ok, i compiled the VIA82CXXX module in the kernel. Hope it works. I'll report tomorrow, at the moment the endless openoffice emerge is running. How do i turn on DMA after rebooting? Do i have to add a hdparm initscript or does it work by default?

greets and thanks,

Paul

----------

## dalek

As a general rule it will automatically.  It always has on mine anyway.  It loads the driver, which should be part of the kernel, and it knows what the chipset supports.  There is a option in the kernel for using DMA though.  Looks something like this:

```
Use PCI DMA by default when available
```

Make sure it is IN the kernel too.  When you reboot, type in hdparm -i /dev/hd<whatever your drive is>  It should say something like "UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6".  The one with the * by it is the one it is using.

That help??

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## cruelnovember

ok some further information:

```

speedy linux # lspci 

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266] (rev 01)

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]

0000:00:08.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07)

0000:00:08.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 07)

0000:00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0000:00:0b.0 VGA compatible controller: ATI Technologies Inc 215CT [Mach64 CT] (rev 0a)

0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8233 PCI to ISA Bridge

0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

0000:00:11.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 18)

0000:00:11.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 18)

0000:00:11.4 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 18)

```

```

speedy linux # hdparm -i /dev/hda

/dev/hda:

 Model=WDC AC28400R, FwRev=17.01J17, SerialNo=WD-WT6280162188

 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }

 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40

 BuffType=DualPortCache, BuffSize=512kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=16514064

 IORDY=on/off, tPIO={min:160,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4 

 DMA modes:  mdma0 mdma1 mdma2 

 UDMA modes: udma0 udma1 *udma2 udma3 udma4 

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: device does not report version:  1 2 3 4

 * signifies the current active mode

```

```

speedy linux # hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   688 MB in  2.01 seconds = 342.00 MB/sec

 Timing buffered disk reads:    6 MB in  3.52 seconds =   1.70 MB/sec

```

```

speedy linux # hdparm -d /dev/hda

/dev/hda:

 using_dma    =  0 (off) 

```

```

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

# CONFIG_BLK_DEV_IDEPNP is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

CONFIG_BLK_DEV_ADMA=y

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

# CONFIG_BLK_DEV_AMD74XX is not set

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

# CONFIG_BLK_DEV_PIIX is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

CONFIG_BLK_DEV_VIA82CXXX=y

# CONFIG_IDE_ARM is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

```

I added the initscript to default runlevel, though you convinced me i would not need that. It tries to set DMA to 1 (on) whenm I boot but it fails with error: Operation not permitted. I think its the same as if i try:

```

bloedmann linux # hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

thanks for your help so far, hope we can fix it,

Paul

BTW: I'm using development-sources 2.6.8.1

----------

## cruelnovember

I solved my DMA Problem by setting Kernel Support for ATI Chipset.

```

speedy root # hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   708 MB in  2.00 seconds = 353.17 MB/sec

 Timing buffered disk reads:   40 MB in  3.07 seconds =  13.01 MB/sec

```

 :Wink: 

Thanks for your help,

Paul

----------

## dalek

Whew.  I'm glad you got it going.  I was running out of ideas.  Still slow but much better than what you had.

Now I got to go figure out why the puter setting on top of the deep freezer is !FULL! of water.    :Shocked:   :Shocked:   :Shocked: 

This is not good by the way.  I can't find a roof leak either.  One of you guys piss on my rig   :Question:   :Question:    I think it was dead anyway but I hope that hard drive and stuff is OK.

 :Crying or Very sad:   :Crying or Very sad:   :Confused:   :Confused: 

----------

