LinHES Forums
http://forum.linhes.org/

Can't enable DMA on my DVD drive
http://forum.linhes.org/viewtopic.php?f=2&t=6817
Page 1 of 1

Author:  Red5 [ Mon Nov 07, 2005 11:08 am ]
Post subject:  Can't enable DMA on my DVD drive

I was getting the stuttering playback problem from my DVDs, so I followed some suggestions here about checking and enabling DMA. Sure enough, DMA is not enabled for the DVD drive. When I try

hdparm -d1 /dev/hdb

I get this error:
Code:
root@dozer:/home/mythtv# hdparm -d1 /dev/hdb

/dev/hdb:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)

Here is some other info:
Quote:
root@dozer:/home/mythtv# hdparm -i /dev/hdb
/dev/hdb:
Model=SONY DVD RW DW-D22A, FwRev=BYS2, SerialNo=
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:227,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
Drive conforms to: device does not report version:

* signifies the current active mode

and...
Quote:
root@dozer:/home/mythtv# hdparm /dev/hdb
/dev/hdb:
HDIO_GET_MULTCOUNT failed: Invalid argument
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
keepsettings = 1 (on)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument


Anyone know what is going on with the "HDIO_SET_DMA failed: Operation not permitted" error?

I am thinking it is probably related to the fact that I am using a SATA hard drive. I did a manual install with the "ide=reverse ide=nodma" boot settings. I also have ide set to "compatibility" mode in the BIOS. These settings seem like the likely problem.

-----------------------
ASUS P4C800-E Deluxe
P4 3.0GHz
Maxtor 300GB SATA HDD
pcHDTV HD-3000
1GB RAM

Author:  Liv2Cod [ Mon Nov 07, 2005 11:40 am ]
Post subject: 

I'm pretty sure that DMA is NOT required on the DVD or CDROM device itself, only on the HARD drives in the system. Streaming content off of a DVD drive isn't very demanding and polling works fine. If you really wanted DMA on your DVD drive, the drive has to support it and I think you need an 80-pin cable instead of the typical 40-pin one used to hook up the drive to the motherboard.

Author:  ceenvee703 [ Mon Nov 07, 2005 11:50 am ]
Post subject: 

liv2cod: I'm not sure that's correct. Even the xine-check program checks to see if DMA is enabled for the DVD drive.

http://xinehq.de/index.php/faq#SPEEDUP

I'm pretty sure I've seen choppy DVD playback if I don't enable DMA.

Author:  Red5 [ Mon Nov 07, 2005 12:58 pm ]
Post subject: 

I think I have a better question. What I really want to know is whether I can even enable DMA at this point, because I used the "ide=nodma" option during install.

Does using "ide=nodma" at install prevent me from enabling DMA after install?

I am no Linux expert, but I am wondering if that switch makes it so that DMA doesn't get compiled into the install or something.

Author:  Liv2Cod [ Mon Nov 07, 2005 2:12 pm ]
Post subject: 

Do you have a 40- or 80-conductor cable on the DVD drive? The 80-conductor cables are usually stiffer and are also (usually) cable-select capable (i.e. they have blue, grey, and black connectors on them).

Author:  Red5 [ Mon Nov 07, 2005 8:00 pm ]
Post subject: 

It has an 80-pin cable. It is on an UltraDMA 100 IDE port. Right now it is connected to the middle(slave) connector and nothing is connected to the connector at the end of the cable. I know it is not recommended to leave the end floating. I forgot that I used to have a drive out there.

I don't see how this would be the problem in this case. I get a very clear error message when I try to enable DMA (HDIO_SET_DMA failed: Operation not permitted).

If it were a cabling issue, I would expect it not to work well, but it should at least let me change the setting???

Thanks for the help so far.

Author:  tjc [ Mon Nov 07, 2005 8:36 pm ]
Post subject: 

Is the drive even DMA capable? What does this command show?
Code:
hdparm -I /dev/dvd

If you don't see a list of supported DMA modes in the "Capabilities" section then you obviously can't enable it...
Code:
root@black2:~# hdparm -I /dev/dvd

/dev/dvd:

ATAPI CD-ROM, with removable media
        Model Number:       _NEC DVD_RW ND-3520A
        Serial Number:
        Firmware Revision:  1.04
Standards:
        Likely used CD-ROM ATAPI-1
Configuration:
        DRQ response: 3ms.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(cannot be disabled)
        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns

Author:  Red5 [ Tue Nov 08, 2005 11:31 am ]
Post subject: 

I posted the results of "hdparm -i /dev/hdb" in my original post.

Here is what you asked for:

Code:
ATAPI CD-ROM, with removable media
        Model Number:       SONY    DVD RW DW-D22A
        Serial Number:
        Firmware Revision:  BYS2
Standards:
        Used: ATAPI for CD-ROMs, SFF-8020i, r2.5
        Supported: CD-ROM ATAPI-2
Configuration:
        DRQ response: 50us.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(cannot be disabled)
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=227ns  IORDY flow control=120ns


This is interesting. I think the asterisk indicates that it is currently running in udma4. The results of hdparm -i seemed to show that it only supports up to udma2. Also, a simple hdparm shows that "using_dma = 0"

Hmmmm...

Author:  EvilTwin [ Tue Nov 08, 2005 5:35 pm ]
Post subject: 

Red5 wrote:
I think I have a better question. What I really want to know is whether I can even enable DMA at this point, because I used the "ide=nodma" option during install.

Does using "ide=nodma" at install prevent me from enabling DMA after install?

I am no Linux expert, but I am wondering if that switch makes it so that DMA doesn't get compiled into the install or something.

Try looking in your /etc/lilo.conf where the kernel boot options generally live...

Author:  Red5 [ Sun Nov 20, 2005 3:44 pm ]
Post subject: 

I solved this.

In the BIOS, the IDE setting for DMA on the DVD drive was set to "AUTO" .

I changed set it to the highest DMA setting supported by my drive (UDMA4).

Now my DVDs play back smoothly!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/