Jump to content

DMA with hdparm for DVD drive


Guest arise
 Share

Recommended Posts

I am running Redhat 8, but that shouldn't be an issue :)

I installed Xine, Ogle and Mplayer, but I get choppy DVD playback, it stalls every 2-3 seconds, both audio and video.

 

My DVD drive (Artec 16x) supports true UDMA2 (not multiword DMA2), but when I try to enable it with "hdparm -d1 /dev/dvd" it says it cannot do it. Yes I am doing it as root...

 

Any ideas, anyone?

 

PS: error msg is ** HDIO_SET_DMA failed: Operation not permitted **

Link to comment
Share on other sites

Guest alan.hughes

This is probably a function of Redhat's kernel which is not the same as Mandrake's (different patches, etc). I really suggest you go ask one of the Redhat newsgroups - they can give you information specific to your distro, we can't.

Link to comment
Share on other sites

here http://www.dtek.chalmers.se/groups/dvd/faq.shtml I found this

31. Playback is choppy. What can I do?

 

NOTE RedHat 8.0:

In all their wisdom, the people at redhat decided to turn off DMA for CD and DVD devices

in an even "more reliable" way than before.

To be able to turn on DMA _at all_ you have to add the following line in /etc/modules.conf :

options ide-cd dma=1

You can also download and compile your own kernel (not a redhat kernel) to be able to turn on dma.

Keep reading to see what else you need to do to turn on dma.

end NOTE RedHat 8.0

 

Check with hdparm (hdparm -d <device name>) if you have enabled DMA on the DVD drive.

hdparm -d 1 <device name> to turn dma on. The link above will explain n more detail.

If you have enabled DMA and it still is choppy and you have an nVidia card see also FAQ 38.

If you have enabled DMA and it still is choppy or dma keeps turning off and you have a VIA chipset (mostly amd users) try with hdparm -d 1 -X34 <device name> to use another dma mode.

NOTE: In redhat7.3 DMA is default OFF for cd/dvd drives

The official way to turn change this is to create a file named /etc/sysconfig/harddiskhdc (the hdc at the end should be replaced with the device name for you DVD). Use the contents of /etc/sysconfig/harddisks as a template. The rc.sysinit script will apply the contents of /etc/sysconfig/harddisks to hard drives only, but if it sees a file for a specific drive, it will apply it to that drive even if it is not a hard drive.

NOTE: If you run debian, make sure you use the ogle-mmx package if you are running on x86.

Also, this is in ML's /etc/rc.d/rc.sysinit
# Turn on harddisk optimization

# There is only one file /etc/sysconfig/harddisks for all disks

# after installing the hdparm-RPM. If you need different hdparm parameters

# for each of your disks, copy /etc/sysconfig/harddisks to

# /etc/sysconfig/harddiskhda (hdb, hdc...) and modify it.

# Each disk which has no special parameters will use the defaults.

# Each non-disk which has no special parameters will be ignored.

Link to comment
Share on other sites

Got it, edited the modules.conf and guess what? no more stuttering in playing DVDs :D Thanks for the tip again !!

 

By the way, i get around 40.5 MB/sec when benchmarking with hdparm...i have a 60GB Seagate ATAIV 7200rpm running in UDMA5 mode. What numbers did u guys get?

Link to comment
Share on other sites

bvc man, i got something else...i cannot take any desktop screenshots when im running Xine or Mplayer, Ogle too...I mean i can take shots, but the video screen remains blue, even if the video was running or paused.

 

How can i take a desktop snapshot with video running?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...