View previous topic :: View next topic |
Author |
Message |
niben_s n00b
Joined: 16 Jul 2003 Posts: 36 Location: Minneapolis, USA
|
Posted: Tue Jul 22, 2003 2:43 pm Post subject: I cannot turn DMA on in my harddrive |
|
|
Hi,
I am having problem with turning on DMA on my harddrive. I tried explictly setting it on using hdparm and it does not work.
I have AMD k6-2 533 MHz processor and VIA (VT8501??) chipset . I have the following configuration in kernel config settings:
Quote: |
ATA/IDE/MFM/RLL Support --->
IDE,ATA and ATAPI Block Devices --->
<*> Enhanced IDE/MFM/RLL disk/cdrom/type/floppy
<*> Include IDE/ATA-2 Disk Support
<*> Use multi-mode by default
<*> Include IDE/ATAPI CDROM Support
<*> SCSI Emulation Support
<*> CMD60 Chipset bugfix/support
<*> RZ1000 Chipset bugfix/support
<*> Generic PCI IDE Chipset Support
<*> Sharing PCI IDE Interrupts Support
<*> Use PCI-DMA by default when await
<*> AMD and nVidia IDE Support
<*> Intel PIIXn Chipset Support
<*> PIIXn Tuning Support
<*> VIA82CXXX Chipset Support
|
When I try to hdpram i get following:
Code: |
# hdparm -d1 /dev/hda3
/dev/hda3:
Setting Using_dma to 1 (on)
HDIO_SET_DMA failed: Invalid Argument
Using_dma = 0 (Off)
# hdparm -i /dev/hda3
/dev/hda3:
HDIO_GET_IDENTITY failed: Invalid Argument
|
Currently my hard drive speed on /dev/hda1 is 2.19 Mb/set and /dev/hda3 is 4.34.Mb/set which is very slow indeed.
After looking into the bulletin board i see that some people are saying to turn on the kernel option "automatically have your drives use DMA", but I never saw the option.
Please let me know if i needed to do anything. |
|
Back to top |
|
|
Unne l33t
Joined: 21 Jul 2003 Posts: 616
|
Posted: Tue Jul 22, 2003 2:56 pm Post subject: |
|
|
After googling a bit, the answer I found is "hdparm is for drives, not partitions". Try using /dev/hda instead of /dev/hda3. I get the same errors as you if I try to hdparm a partition instead of a drive. |
|
Back to top |
|
|
pYrania Retired Dev
Joined: 27 Oct 2002 Posts: 650 Location: Cologne - Germany
|
Posted: Tue Jul 22, 2003 3:13 pm Post subject: |
|
|
in addition to the false execution of hdparm, it needs to be said, that not all harddisk support it.
you may check this with
$ cat /proc/ide/hda/settings _________________ Markus Nigbur |
|
Back to top |
|
|
niben_s n00b
Joined: 16 Jul 2003 Posts: 36 Location: Minneapolis, USA
|
Posted: Tue Jul 22, 2003 3:19 pm Post subject: |
|
|
Unne wrote: | After googling a bit, the answer I found is "hdparm is for drives, not partitions". Try using /dev/hda instead of /dev/hda3. I get the same errors as you if I try to hdparm a partition instead of a drive. |
You just made me sound like a dumb ass. That was too easy.
Thanks mate!
ps: How can i auto enable DMA after rebooting? |
|
Back to top |
|
|
Unne l33t
Joined: 21 Jul 2003 Posts: 616
|
Posted: Tue Jul 22, 2003 3:25 pm Post subject: |
|
|
I don't know the best way to do it, but I added a line to the end of /etc/conf.d/local.start . If there's a better way to do it, I'd love to know too. |
|
Back to top |
|
|
lazarusrat Guru
Joined: 17 Jul 2002 Posts: 305 Location: Lafayette, IN
|
Posted: Tue Jul 22, 2003 3:27 pm Post subject: |
|
|
rc-update add hdparm boot
I think it only turns on DMA, so if there are other hdparm settings you want, just edit the /etc/init.d/hdparm script. |
|
Back to top |
|
|
Unne l33t
Joined: 21 Jul 2003 Posts: 616
|
Posted: Tue Jul 22, 2003 3:30 pm Post subject: |
|
|
Oh, nice. Can't believe I missed that. |
|
Back to top |
|
|
niben_s n00b
Joined: 16 Jul 2003 Posts: 36 Location: Minneapolis, USA
|
Posted: Tue Jul 22, 2003 3:47 pm Post subject: |
|
|
lazarusrat wrote: | rc-update add hdparm boot
I think it only turns on DMA, so if there are other hdparm settings you want, just edit the /etc/init.d/hdparm script. |
Thanks lazarusrat! I just tried that and it works. I also checked /etc/init.d/hdparm script and set dma to turn on for all drives.
The problem now is I still get the error message when i reboot the system saying ....cannot set DMA to on....fsck process will be delayed....something like that. Is there a way to get rid of that message?
Thanks |
|
Back to top |
|
|
pYrania Retired Dev
Joined: 27 Oct 2002 Posts: 650 Location: Cologne - Germany
|
Posted: Tue Jul 22, 2003 4:02 pm Post subject: |
|
|
i think you cannot. it's way before init parses your startup scripts
hm. you could modify /sbin/rc, but there's no need to do so _________________ Markus Nigbur |
|
Back to top |
|
|
lazarusrat Guru
Joined: 17 Jul 2002 Posts: 305 Location: Lafayette, IN
|
Posted: Tue Jul 22, 2003 4:10 pm Post subject: |
|
|
I think that would be the checkroot and/or checkfs scripts running before the hdparm script.
I've been wondering about that one myself.
You can't just rc-update del checkroot/checkfs, because they're depended on by other scripts. So possibly remove them from the "depend()" section of the scripts that depend on them (I think localmount is one)? This assumes you're okay not having fsck run on boot at all.
Or possibly add "need hdparm" to the "depends()" section of checkroot/checkfs?
I'm not really sure how well either of these solutions will work. I haven't had the chance to try either of them myself yet, because it's not an issue on my box (my chipset has automatic DMA support), but it is on my roomie's. |
|
Back to top |
|
|
lazarusrat Guru
Joined: 17 Jul 2002 Posts: 305 Location: Lafayette, IN
|
Posted: Tue Jul 22, 2003 4:20 pm Post subject: |
|
|
Oh, also there is apparently a /etc/conf.d/hdparm now? I don't think there was such an animal last time I messed with this stuff, so that's probably a better place to do the configuring.
I kind of skimmed over your kernel settings before. There's a setting in there somewhere for Enable DMA by default (or something like that). Have you got that compiled in? If not, give that a try, and if it works the whole init script thing won't be an issue anymore. |
|
Back to top |
|
|
niben_s n00b
Joined: 16 Jul 2003 Posts: 36 Location: Minneapolis, USA
|
Posted: Tue Jul 22, 2003 4:29 pm Post subject: |
|
|
Quote: |
I kind of skimmed over your kernel settings before. There's a setting in there somewhere for Enable DMA by default (or something like that). Have you got that compiled in? If not, give that a try, and if it works the whole init script thing won't be an issue anymore.
|
I was looking for that option....could not find it. |
|
Back to top |
|
|
lazarusrat Guru
Joined: 17 Jul 2002 Posts: 305 Location: Lafayette, IN
|
|
Back to top |
|
|
niben_s n00b
Joined: 16 Jul 2003 Posts: 36 Location: Minneapolis, USA
|
Posted: Tue Jul 22, 2003 4:58 pm Post subject: |
|
|
I am on the same as the guy in the thread. I do have those options enabled and compiled but still DMA is not set to on before fsck. |
|
Back to top |
|
|
lazarusrat Guru
Joined: 17 Jul 2002 Posts: 305 Location: Lafayette, IN
|
Posted: Tue Jul 22, 2003 7:00 pm Post subject: |
|
|
Hm.
My only other suggestion (besides fiddling with the init script dependencies which may or may not be a good idea) would be to pass hdparm the -k1 option. I think that's the right one. man hdparm, it's the "keep" flag that's supposed to tell your drive to keep settings across power cycles.
After this, it's basically EOF on my knowledge of the situation. |
|
Back to top |
|
|
marrs n00b
Joined: 08 Apr 2003 Posts: 10
|
Posted: Tue Jul 22, 2003 7:57 pm Post subject: |
|
|
After adding support for the correct chipset on my motherboard in the same area of the kernel's menuconfig, DMA was finally turned on automatically. |
|
Back to top |
|
|
niben_s n00b
Joined: 16 Jul 2003 Posts: 36 Location: Minneapolis, USA
|
Posted: Tue Jul 22, 2003 8:16 pm Post subject: |
|
|
marrs wrote: | After adding support for the correct chipset on my motherboard in the same area of the kernel's menuconfig, DMA was finally turned on automatically. |
What chipset do you have and what option did you select for your chipset??
I have VIAxxxxxx and I was hoping setting VIA82CXXX Chipset support would resolve the issue. |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Tue Jul 22, 2003 9:35 pm Post subject: |
|
|
Moving to Hardware & Laptops
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
|