Discussion:
hdparm Operation Not Permitted for DMA
(too old to reply)
Brian Whiting
2005-11-22 18:38:26 UTC
Permalink
I finally got my DVDs (writer and separate reader) to be able to recognize
regular movies under xine. I run 2k5 LE for AMD64. The video playback is
jerky though. I found references that say to ensure the DVD DMA is on
using hdparm -d1 command. I run the command and get this result:
[***@pavilion dev]# hdparm -d1 /dev/hdd

/dev/hdd:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
[***@pavilion dev]#

Am I using the command correctly? Why is it failing? The full dir listing
for the DVD device is:
[***@pavilion dev]# ls -l dvd1
lrwxrwxrwx 1 root root 3 Nov 22 08:29 dvd1 -> hdd
[***@pavilion dev]#
Proteus
2005-11-22 20:44:35 UTC
Permalink
Post by Brian Whiting
I finally got my DVDs (writer and separate reader) to be able to recognize
regular movies under xine. I run 2k5 LE for AMD64. The video playback is
jerky though. I found references that say to ensure the DVD DMA is on
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
...

Perhaps useful (or not?):
http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html
Brian Whiting
2005-11-22 23:06:43 UTC
Permalink
Post by Proteus
Post by Brian Whiting
I finally got my DVDs (writer and separate reader) to be able to
recognize regular movies under xine. I run 2k5 LE for AMD64. The video
playback is jerky though. I found references that say to ensure the DVD
Post by Proteus
Post by Brian Whiting
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
...
http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html
My system is SATA. The DVDs show up as IDE CDROMs, but apparently you can't
adjust the parameters. The hard disk configurations are all fully
automatic. The hdparm stuff does not appear to work at all, even the test
routine will not work. I guess I'm screwed until there is more thorough
SATA support in the future. I hate to admit it, but the stuff works fine
under WinXP Media Center edition. It probably has full SATA support in the
drivers.
Wes Newell
2005-11-23 05:42:48 UTC
Permalink
Post by Brian Whiting
Post by Brian Whiting
I finally got my DVDs (writer and separate reader) to be able to
recognize regular movies under xine. I run 2k5 LE for AMD64. The
video playback is jerky though. I found references that say to ensure
the DVD DMA is on using hdparm -d1 command. I run the command and get
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted using_dma = 0 (off)
My system is SATA. The DVDs show up as IDE CDROMs, but apparently you
can't adjust the parameters. The hard disk configurations are all fully
automatic. The hdparm stuff does not appear to work at all, even the
test routine will not work. I guess I'm screwed until there is more
thorough SATA support in the future. I hate to admit it, but the stuff
works fine under WinXP Media Center edition. It probably has full SATA
support in the drivers.
SATA support is still under heavy developement and there's lot's of
discussion on it and hdparm in the linux-ide mailing list. Might check
there.

http://vger.kernel.org/vger-lists.html
--
KT133 MB, CPU @2400MHz (24x100): SIS755 MB CPU @2330MHz (10x233)
Need good help? Provide all system info with question.
My server http://wesnewell.no-ip.com/cpu.php
Verizon server http://mysite.verizon.net/res0exft/cpu.htm
Kenton Groombridge
2005-11-23 20:55:38 UTC
Permalink
You might try blktool at:

http://sourceforge.net/projects/gkernel/

From what I understand, it will eventually replace hdparm, but it
hasn't seen much activity lately.

Ken
Post by Wes Newell
SATA support is still under heavy developement and there's lot's of
discussion on it and hdparm in the linux-ide mailing list. Might check
there.
http://vger.kernel.org/vger-lists.html
Wes Newell
2005-11-22 23:07:02 UTC
Permalink
Post by Brian Whiting
I finally got my DVDs (writer and separate reader) to be able to recognize
regular movies under xine. I run 2k5 LE for AMD64. The video playback is
jerky though. I found references that say to ensure the DVD DMA is on
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted using_dma = 0 (off)
Am I using the command correctly? Why is it failing? The full dir
First check the device to see what it supports.

My dvd writer;
[***@wes2 wes]# hdparm -i /dev/hdc

/dev/hdc:

Model=_NEC DVD_RW ND-3500AG, FwRev=2.16, SerialNo=
Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=yes, 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
AdvancedPM=no

* signifies the current active mode

OK, mine supports udma2 (ATA33) and is running at that speed. . Now if
your device supports the mode but it's not using DMA, check your bios to
see if it's allowed for that device.
--
KT133 MB, CPU @2400MHz (24x100): SIS755 MB CPU @2330MHz (10x233)
Need good help? Provide all system info with question.
My server http://wesnewell.no-ip.com/cpu.php
Verizon server http://mysite.verizon.net/res0exft/cpu.htm
Brian Whiting
2005-11-24 16:33:27 UTC
Permalink
Post by Wes Newell
Post by Brian Whiting
I finally got my DVDs (writer and separate reader) to be able to
recognize regular movies under xine. I run 2k5 LE for AMD64. The video
playback is jerky though. I found references that say to ensure the DVD
DMA is on using hdparm -d1 command. <snip>
Post by Wes Newell
First check the device to see what it supports.
My dvd writer;
<snip>
Post by Wes Newell
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
AdvancedPM=no
* signifies the current active mode
OK, mine supports udma2 (ATA33) and is running at that speed. . Now if
your device supports the mode but it's not using DMA, check your bios to
see if it's allowed for that device
Here is the same output for my DVD Writer:
[***@pavilion ~]# hdparm -i /dev/hdc

/dev/hdc:

Model=HP DVD Writer 640, FwRev=ES04, SerialNo=CNLQ12924C
Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=yes, 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
AdvancedPM=no

* signifies the current active mode
Does this not seem to indicate that ultra DMA mode is in effect? I thought
that was a newer variation on DMA that should be faster than regular DMA.
The DVD writer has the same jerky video output as the DVD Reader though.
It is the device that's causing it. When I run the progress bar back a few
seconds to get DVD video in cache, it's very smooth. It's only jerky when
it's reading the DVD from either the reader or writer.
Wes Newell
2005-11-24 17:11:39 UTC
Permalink
Post by Wes Newell
/dev/hdc
Model=HP DVD Writer 640, FwRev=ES04, SerialNo=CNLQ12924C Config={ Fixed
Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic } RawCHS=0/0/0, TrkSize=0,
SectSize=0, ECCbytes=0 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0 IORDY=yes,
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
AdvancedPM=no
* signifies the current active mode
Does this not seem to indicate that ultra DMA mode is in effect? I
thought that was a newer variation on DMA that should be faster than
regular DMA. The DVD writer has the same jerky video output as the DVD
Reader though. It is the device that's causing it. When I run the
progress bar back a few seconds to get DVD video in cache, it's very
smooth. It's only jerky when it's reading the DVD from either the reader
or writer.
It sure appears the drive is set to udma2 (ata33). Test the dma setting
and the speed. The problem with your playback may have nothing to do with
the drive itself.

[***@wes2 wes]# hdparm -d /dev/hdc

/dev/hdc:
using_dma = 1 (on)
[***@wes2 wes]# hdparm -tT /dev/hdc

/dev/hdc:
Timing cached reads: 2076 MB in 2.00 seconds = 1037.94 MB/sec
Timing buffered disk reads: 8 MB in 3.04 seconds = 2.63 MB/sec

I don't watch many dvd's.but testing one here works fine. If you're having
a problem with dma, you might try changing to pio 4 and see if the helps.
But if your timings and settings are about the same as the above, I'd look
elsewhere for the problem.
--
KT133 MB, CPU @2400MHz (24x100): SIS755 MB CPU @2330MHz (10x233)
Need good help? Provide all system info with question.
My server http://wesnewell.no-ip.com/cpu.php
Verizon server http://mysite.verizon.net/res0exft/cpu.htm
Brian Whiting
2005-11-24 17:18:14 UTC
Permalink
Wes Newell wrote:

<snip>
Post by Wes Newell
It sure appears the drive is set to udma2 (ata33). Test the dma setting
and the speed. The problem with your playback may have nothing to do with
the drive itself.
using_dma = 1 (on)
Timing cached reads: 2076 MB in 2.00 seconds = 1037.94 MB/sec
Timing buffered disk reads: 8 MB in 3.04 seconds = 2.63 MB/sec
I don't watch many dvd's.but testing one here works fine. If you're having
a problem with dma, you might try changing to pio 4 and see if the helps.
But if your timings and settings are about the same as the above, I'd look
elsewhere for the problem.
Here is what I get when I try to run hdparm test:
[***@pavilion ~]# hdparm -tT /dev/hdc

/dev/hdc:
read() failed: Input/output error
Timing buffered disk reads: read() failed: Input/output error
I get the same results on both drives. That's why I thought I was at the
end of the road as far as dealing with the SATA hardware was concerned. I
can try to set pio 4, but I don't understand the syntax of the command to
do it. The man page doesn't have any really good examples.
Wes Newell
2005-11-25 06:15:52 UTC
Permalink
Post by Brian Whiting
<snip>
Post by Wes Newell
It sure appears the drive is set to udma2 (ata33). Test the dma setting
and the speed. The problem with your playback may have nothing to do
with the drive itself.
using_dma = 1 (on)
Timing cached reads: 2076 MB in 2.00 seconds = 1037.94 MB/sec Timing
buffered disk reads: 8 MB in 3.04 seconds = 2.63 MB/sec
I don't watch many dvd's.but testing one here works fine. If you're
having a problem with dma, you might try changing to pio 4 and see if
the helps. But if your timings and settings are about the same as the
above, I'd look elsewhere for the problem.
hdparm -tT /dev/hdc
read() failed: Input/output error
Timing buffered disk reads: read() failed: Input/output error
I get the same results on both drives. That's why I thought I was at the
end of the road as far as dealing with the SATA hardware was concerned. I
can try to set pio 4, but I don't understand the syntax of the command to
do it. The man page doesn't have any really good examples.
You have to have a cd in the drive to test it. Any cd will work as long as
it is readable. The command for setting pio mode 4 would be;

hdparm -X12 /dev/<drive>

For the PIO (Programmed Input/Output) transfer modes
used by Linux, this value is simply the desired PIO mode number
plus 8. Thus, a value of 09 sets PIO mode1, 10 enables PIO
mode2, and 11 selects PIO mode3. Setting 00 restores the
drive's "default" PIO mode, and 01 disables IORDY. For multi-
word DMA, the value used is the desired DMA mode number plus 32.
for UltraDMA, the value is the desired UltraDMA mode number plus
64.

pio4+8=12
mdma2+32=34
udma2+64=66
--
KT133 MB, CPU @2400MHz (24x100): SIS755 MB CPU @2330MHz (10x233)
Need good help? Provide all system info with question.
My server http://wesnewell.no-ip.com/cpu.php
Verizon server http://mysite.verizon.net/res0exft/cpu.htm
Brian Whiting
2005-11-26 15:01:14 UTC
Permalink
Wes Newell wrote:

<snip>
Post by Wes Newell
You have to have a cd in the drive to test it.
Here is what I get with a data cd in the drive:
[***@pavilion dev]# hdparm /dev/hdc

/dev/hdc:
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument
[***@pavilion dev]# hdparm -tT /dev/hdc

/dev/hdc:
Timing cached reads: 2764 MB in 2.00 seconds = 1381.52 MB/sec
Timing buffered disk reads: 2 MB in 3.20 seconds = 639.10 kB/sec

[***@pavilion ~]# hdparm -i /dev/hdc

/dev/hdc:

Model=HP DVD Writer 640, FwRev=ES04, SerialNo=CNLQ12924C
Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=yes, 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
AdvancedPM=no
The buffered reads are clearly the problem. Do you know if udma2 is not
applicable to cd/dvd type readers?
Wes Newell
2005-11-27 04:55:23 UTC
Permalink
Post by Brian Whiting
<snip>
Post by Wes Newell
You have to have a cd in the drive to test it.
hdparm /dev/hdc
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument
Timing cached reads: 2764 MB in 2.00 seconds = 1381.52 MB/sec Timing
buffered disk reads: 2 MB in 3.20 seconds = 639.10 kB/sec
Model=HP DVD Writer 640, FwRev=ES04, SerialNo=CNLQ12924C Config={ Fixed
Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic } RawCHS=0/0/0, TrkSize=0,
SectSize=0, ECCbytes=0 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0 IORDY=yes,
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
AdvancedPM=no
The buffered reads are clearly the problem. Do you know if udma2 is not
applicable to cd/dvd type readers?
udma2 should work. It does here, but I'm not using sata dvd drives. I
suspect that the sata driver isn't working properly yet. You might want to
try a newer kernel or present this problem in the linux-ide mailing list
and see if you can get some help from the people that write the drivers.
Or as an easier fix, just switch to non sata cd/dvd drives. udma2 has been
working on mine for years.

[***@wes2 wes]# hdparm /dev/hdc

/dev/hdc:
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument
[***@wes2 wes]# hdparm -tT /dev/hdc

/dev/hdc:
Timing cached reads: 2292 MB in 2.00 seconds = 1145.93 MB/sec
Timing buffered disk reads: 8 MB in 3.04 seconds = 2.63 MB/sec
[***@wes2 wes]# hdparm -i /dev/hdc

/dev/hdc:

Model=_NEC DVD_RW ND-3500AG, FwRev=2.16, SerialNo=
Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=yes, 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
AdvancedPM=no

* signifies the current active mode
--
KT133 MB, CPU @2400MHz (24x100): SIS755 MB CPU @2330MHz (10x233)
Need good help? Provide all system info with question.
My server http://wesnewell.no-ip.com/cpu.php
Verizon server http://mysite.verizon.net/res0exft/cpu.htm
Peter D.
2005-11-28 10:59:16 UTC
Permalink
Post by Brian Whiting
<snip>
Post by Wes Newell
You have to have a cd in the drive to test it.
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
[snip]

Try "hdparm -d1 /dev/hdc"
Post by Brian Whiting
Timing cached reads: 2764 MB in 2.00 seconds = 1381.52 MB/sec
Timing buffered disk reads: 2 MB in 3.20 seconds = 639.10 kB/sec
[snip]

Now try "hdparm /dev/hdc" and "hdparm -tT /dev/hdc" again.
--
Peter D.
Sig goes here...
Loading...