LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-19-2004, 07:24 PM   #1
quartertone
LQ Newbie
 
Registered: Jun 2003
Distribution: Gentoo (and Fedora Core 1, Fedora Core 2)
Posts: 26

Rep: Reputation: 15
hdaparm -d1 /dev/hda :: HDIO_SET_DMA failed


Hi all,
I recently performed a complete system reinstall, backing up my files/settings/etc from my RH9.0 and freshly installed Fedora Core 1. Since i saved my old gnome settings, my userinterface is still the same, but i'm experiencing some strangeness.. Here's the most annoying:

First, some specs:
Asus P4C800 Deluxe
P4 3.0 GHz
512 DDR x2
Seagate SATA drives x2 (in RAID)
OEM drive 120GB ATA 100 (?)
Fedora Core 1, kernel: 2.4.22-1.2174.nptl

I've noticed (it's hard not to notice) that when I copy files from my SATA drives to the p-ata drive, the cpu gets extremely bogged down. Cpu monitor (gkrellm) shows 99-100% usage, except when file read takes place, where it shows 80-85% usage. GNOME becomes entirely unresponsive except for brief instances when the system is reading the file from the s-ata drives. Even without X running, the result is the same. It's most noticeable when copying large files, of course, but i still notice a slight catch/hang (about 0.5 - 1 second) after copying a file of 5MB. There is invariably a delay after the file is done copying while the system seems to try to catch up. As far as i've observed, it's been somewhat proportional to the file size. Copying a 600MB disk image, for eg, results in a post-copy hang of about 10 seconds.

Copying from one partition to another on my s-ata drive is seamless. No hangs/delays. I just tested copying from p-ata to p-ata, same partition, and the hanging annoyance came back. So it's definitely something to do with that.

I had no such problem in RH9, so I imagine this has something to do with Fedora's kernel modules or some other hardware-affecting configuration setting.

Some readings:
Code:
# hdparm /dev/hda	<-- this is my p-ata drive
/dev/hda:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 14593/255/63, sectors = 234441648, start = 0
---
# hdparm -i /dev/hda
/dev/hda:
 Model=OEM120-72A 120GB 7200RPM, FwRev=3.31, SerialNo=0BROKER0
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234441648
 IORDY=on/off, tPIO={min:240,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
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:

 * signifies the current active mode
---
# hdparm -tT /dev/hda
/dev/hda:
 Timing buffer-cache reads:   3476 MB in  2.00 seconds = 1738.00 MB/sec
 Timing buffered disk reads:   12 MB in  3.40 seconds =   3.53 MB/sec
---
# hdparm -d1 /dev/hda
/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
---
I'm not sure what else to post. Is there something I need to enable in the kernel config? I did (being lazy) a full "everything" install of Fedora, so I imagine most of the required modules/etc would have been built and installed.

I've seen this asked many times in many places, but all without a clear solution, if any. It seems there is a BIOS setting for this, but i'm not yet sure (about to find out).. anyway, I'd appreciate any help!! I will try to post a clear definition of the solution, if i find one.

thanks
q
 
Old 02-19-2004, 07:55 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
add that command for dma to a startup script and restart and see if it takes effect ...
if it doesn't then your chipset is probably not compiled into the kernel, and that will have to be your next step ...
 
Old 02-19-2004, 10:24 PM   #3
quartertone
LQ Newbie
 
Registered: Jun 2003
Distribution: Gentoo (and Fedora Core 1, Fedora Core 2)
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks DrOzz,

I wasn't sure if it would make any difference when the command was run. I installed a script in /etc/rc3.d/S99hdparmthing, with the hdparm command as its contents. Checked /var/log/messages, and the same error message was there.

The chipset on my mobo is Intel 875P MCH or Intel ICH5. I'm not sure which one controls the IDE or SATA interfaces. I tried grepping for the names inside the kernel source directory, to see if the required module description or something might come up, but there was none. I'm confused as to why i would need to recompile my kernel for this to work, since it ran fine in RH9. But then, things do change.

I haven't been able to find out what kernel module i need to enable.. can someone point me in the right direction?

Thanks!
q
 
Old 02-19-2004, 10:45 PM   #4
AlteZza2k2
Member
 
Registered: Sep 2003
Posts: 39

Rep: Reputation: 15
i had the same problem. what fixed it for me was enabling CONFIG_BLK_DEV_PIIX=y. now everything works great.
 
Old 02-19-2004, 10:52 PM   #5
quartertone
LQ Newbie
 
Registered: Jun 2003
Distribution: Gentoo (and Fedora Core 1, Fedora Core 2)
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by AlteZza2k2
i had the same problem. what fixed it for me was enabling CONFIG_BLK_DEV_PIIX=y. now everything works great.
That's what i thought, but:
Code:
# grep CONFIG_BLK_DEV_PIIX configs/*

configs/kernel-2.4.22-i686-bigmem.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-athlon-smp.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-athlon.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-i386-BOOT.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-i386.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-i586-smp.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-i586.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-i686-smp.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-i686.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-x86_64-smp.config:CONFIG_BLK_DEV_PIIX=y
configs/kernel-2.4.22-x86_64.config:CONFIG_BLK_DEV_PIIX=y
This is the kernel source as updated through yum/up2date on Fedora. All the default configs have this set to "y", so I don't know why it's not working. Is there a way to find out if the kernel I'm running is actually compiled with this?
 
Old 02-20-2004, 02:37 AM   #6
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
I have four Seagate 80gb SATA drives....and so far two of them have failed and been replaced under warranty, needless to say my main drive is now a WD200gb SATA.
 
Old 02-22-2004, 10:20 PM   #7
quartertone
LQ Newbie
 
Registered: Jun 2003
Distribution: Gentoo (and Fedora Core 1, Fedora Core 2)
Posts: 26

Original Poster
Rep: Reputation: 15
Well, I finally got my drives to work with DMA. I think I know why there is never any clear answer online anywhere. Or maybe there is, but I couldnt' find them. Anyway, I decided to go the route of compiling a kernel, which seemed to be the only way to get this to work. I rolled up a 2.4.25 kernel. I figured since it's the most stable version to date, I can't lose. So after way too many reboots, I finally had everything compiled or module-ed. Now my drives work great, like they should have in the first place.
Code:
# hdparm -dt /dev/hda
                                                                                                     
/dev/hda:
 using_dma    =  1 (on)
 Timing buffered disk reads:  104 MB in  3.12 seconds =  33.33 MB/sec
Yeehaw. I just don't get why this didn't work with the base Fedora install as it did with RedHat 9 (Shrike?).
 
Old 01-01-2005, 07:22 PM   #8
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Just a question. I have two drives in a RAID 1 set and the third drive is stand alone. When I try and enable DMS for /dev/hda I get this error:


Code:
foo root # hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
Apart from the above error, how can I enable DMS with two drives which currently reside in a RAID set, /dev/sda?
 
Old 01-18-2005, 12:48 PM   #9
The_Sock
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
I've run into this under certain chipsets when they were compiled as modules. Compiling them directly into the kernel and rebooting with said new kernel solved it for me, allowing me to turn on dma.. Hope this works for you.


Regards,

Eric Andry
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HDIO_SET_DMA failed: Operation not permitted new.thing Slackware 21 09-15-2007 05:46 PM
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 03:49 AM
HDIO_SET_DMA failed: Operation not permitted kernel 2.6.4 Gaghiel Slackware 4 03-31-2004 06:18 PM
HDIO_SET_DMA failed: Operation not permitted acjt Linux - Hardware 4 05-02-2003 10:52 PM
HDIO_SET_DMA failed: Operation not permitted markus1982 Linux - General 2 10-28-2002 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration