LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-30-2003, 07:28 PM   #1
MightyKC
Member
 
Registered: Feb 2003
Distribution: Ubuntu 7.10
Posts: 47

Rep: Reputation: 15
dma and dvd


I put in six solid hours yesterday attempting to configure xine in the most possible correct way. I started in a terminal with xine-check. The first major problem was dma not enabled for dvd device, which is hdd. So I learn quite a bit about hdparm. I used:

hdparm -d1 -X34 /dev/hdd

to sucessfully set dvd rom drive to multiword DMA mode 2

I tried xine-check again and still no dma

hdparm -d1 /dev/hdd

setting using -dma to 1 (on)
HDIO set dma failed: operation not permitted
using dma = 0 (off)

At some point in here I used -Tt to next hda and hdd

I got 28.30 MB/sec for hda
I got 13.36 MB/sec for hdd

Pretty good numbers, right?

xine-check told me I still needed to do something about this dma problem.
so i searched around until I discovered that, because I have RH8 I need to
edit /etc/module.conf with the line

options hdc-cd dma=1

and reboot. I had never edited a conf file before but I read up some more and used xdit from the terminel to add the line.
easier than I thought it would be. I rebooted and tested again and got

1.67 MB/sec for hdd

I don't know where I went wrong after that but I went to bed and went to work and now I can't get a -Tt score because it says input output error and I still have crummy playback in xine.

Why can't I get the 13.36 MB or better and have DMA enabled?
 
Old 07-01-2003, 05:38 AM   #2
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
You probably meant to pass
Code:
options ide-cd dma=1
, am I right? There is no such module as hdc-cd. What drive is it BTW?

I don't know what you're using xine for, but mplayer is highly recommended over xine.
 
Old 07-01-2003, 05:24 PM   #3
MightyKC
Member
 
Registered: Feb 2003
Distribution: Ubuntu 7.10
Posts: 47

Original Poster
Rep: Reputation: 15
I have been trying on and off for a year to get xine to work. Its sort of a reflection of my learning curve. When I first started I didn't have a clue how to install anything. Now it is in there but I can't get it configure to work properly.
Anyway, this is the thing. The line is:
options ide-cd dma=1

The drive in question is the dvd drive, hdd on my box.



I tried taking the line out and re-saving and re-booting and still INPUT/OUTPUT error. I tried watching a dvd and it still plays (poorly) which I don't understand considering I can't get hdparm to read from the drive. I don't know what else to say about this problem.......
 
Old 07-01-2003, 07:08 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
What I meant to ask about the drive was what the brand/model was.

Were you using hdpart from a root prompt or as yourself?
 
Old 07-02-2003, 05:21 AM   #5
MightyKC
Member
 
Registered: Feb 2003
Distribution: Ubuntu 7.10
Posts: 47

Original Poster
Rep: Reputation: 15
I logged out as myself and logged in as root. The drive is a Pioneer DVD-ROM (16x max I think) It came stock on this HP xt878, which is only about 2 years old. Are you asking because it might not have dma? Once I found out a step to take to try to improve it I didn't really dig in and find out what dma was or whether the drive is capable of it. I didn't see anyone else when I searched these forums or the xine site so I just guessed it would be o.k.


Also, I took a look at MPlayer, like you said. I found RH8/i686 RPMs to try.
But they were downloading very very slowly so I haven't gotten to try that yet.


I got the info for the dvd-rom from the hp parts site
An xt878 also has:

AMD T-Bird 1.3 Ghz
256 MB ddr
80 GB Maxtor hd
 
Old 07-02-2003, 07:24 PM   #6
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
You dont have to logout and log yourself in as root everytime you want to be root. Just use command 'su -' and supply the root password and until you hit exit/Ctrl-D you will be in a root shell. If you use X, then you could have an xterm with a root shell on it as well. See man su.

Sounds like your device is something like this one. If it was this one indeed, it would support UDMA mode 2 & 4 which should be sufficient for any DVD.

http://www.pioneeraus.com.au/multime...d-106s_116.htm

So, on a root prompt type
Code:
hdparm -i /dev/hdd 
hdparm /dev/hdd
and post the results. The first command will usually tell you what all modes your device supports for real.

Try ultraDMA mode4( if it is supported) using hdparm -d1 -X68 /dev/hdd . 68 = 64 (udma) + 4 (mode4) Or substitute with the highest supported UDMA mode. See man page of hdparm.

Do hdparm -tT /dev/hdd before and after if you want to compare speeds. HTH
 
Old 07-02-2003, 07:28 PM   #7
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Oh, I forgot to add.

Mplayer is the swiss army knife of linux media players. There is not anything I'd want that it can't do, really.

If you just want to watch DVDs, get yourself the OGLE DVD Players from http://www.dtek.chalmers.se/groups/dvd/ . Very simple interface and works really well.

Stay away from xine as long as you can
 
Old 07-03-2003, 05:52 AM   #8
MightyKC
Member
 
Registered: Feb 2003
Distribution: Ubuntu 7.10
Posts: 47

Original Poster
Rep: Reputation: 15
The drive is a model 116 pioneer tray loader

I re-checked the conf file

I entered:

hdparm -d1 -X66 /dev/hdd

xine is working perfectly now

I still cannot get a test though, I still get input/output error when I try to -tT the drive.
I would have posted the results, but I am embarresed to admit I do not know how. I will try to figure out how to do that tonight. Copy,Paste, something, I don't know

BTW, thank you very much for your help. I posted about this in about six different spots and you are the only one who has been walking me through it.
Yes, there have been dozens of threads about enabling dma, but none of them mention an input output error.
 
Old 07-03-2003, 01:31 PM   #9
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
You chose UDMA mode2 then.

I'm trying to find out what is causing i/o errors in hdparm. Do you know if you have scsi-emulation going on? ( If you do, you should have a module called ide-scsi in the output to /sbin/lsmod ) . Another way to find out would be to check your kernel commandline (use cat /proc/cmdline at prompt) to see if you're passing it hdd=ide-scsi or similar.

Instructions to copy-paste in X is available in the following thread
http://www.linuxquestions.org/questi...threadid=65896

Glad to be of help.
 
Old 07-03-2003, 08:59 PM   #10
MightyKC
Member
 
Registered: Feb 2003
Distribution: Ubuntu 7.10
Posts: 47

Original Poster
Rep: Reputation: 15
[root@localhost root]# /sbin/hdparm -Tt /dev/hdd

/dev/hdd:
Timing buffer-cache reads: 128 MB in 0.67 seconds =192.18 MB/sec
Timing buffered disk reads: 64 MB in 15.38 seconds = 4.16 MB/sec
[root@localhost root]# /sbin/hdparm -tT /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.68 seconds =187.26 MB/sec
Timing buffered disk reads: 64 MB in 2.26 seconds = 28.27 MB/sec


OHHHH yeah! my first copy paste!http://www.linuxquestions.org/questions/

yes, I see that now I have a score for hdd. I swear, I wasn't making it up about the i/o error. Could it be that when I played a DVD for a few minutes it hashed inself out? The first time I tried -tT I got 13.36 MB/sec for buffered disk read on hdd. How come it dropped to a 4.16?


root@localhost root]# /sbin/hdparm -i /dev/hdd

/dev/hdd:

Model=PIONEER DVD-ROM DVD-116 ATAPI Model 010, FwRev=E1.06, SerialNo=
Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=13395, BuffSize=64kB, MaxMultSect=0
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
AdvancedPM=no
Drive conforms to: device does not report version: 1 2 3 4

I saw the udma2 and presummed that meant that I could only go up to mode 2, right?

When I was using cdrecord I set up scsi emulation for the other drive, my burner:

[root@localhost root]# cdrecord --scanbus
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 J?rg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
scsibus0:
0,0,0 0) 'MITSUMI ' 'CR-48X5TE ' '1.4A' Removable CD-ROM
0,1,0 1) *


[root@localhost root]# /sbin/lsmod
ide-scsi 10512 0
scsi_mod 107176 3 [sg sr_mod ide-scsi]
ide-cd 33608 1
cdrom 33696 0 [sr_mod ide-cd]

Is this what you meant? I have the 0 and ide-scsi so that is not a problem right?

[root@localhost root]# whereis cat
cat: /bin/cat /usr/share/man/man1/cat.1.gz
[root@localhost root]# /bin/cat /proc/cmdline
ro root=LABEL=/ hdc=ide-scsi


O.K. I am impressed with myself today. I managed to find and figure out all that stuff.

hdc is the burner, right? So that should be no problem? right?




udma2 scsibus0:
 
Old 07-04-2003, 04:09 AM   #11
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
There has to be a disk in the drive so that hdparm can read and calculate the read speeds. Maybe it didn't find the disk in there last time. Around 4 Megs/Second for buffered disk reads sounds about right.

Looks great. hdc is the burner indeed.
 
Old 07-04-2003, 08:29 AM   #12
MightyKC
Member
 
Registered: Feb 2003
Distribution: Ubuntu 7.10
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you again for all your help. I think I improved alot while we tackled this problem
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enable DMA for my DVD jbasement Debian 2 10-14-2004 07:55 PM
DVD DMA Won't Stay On crayiii Mandriva 4 10-04-2003 12:33 PM
Suse 8.2 change my DMA setting on my DVD-R drive to off & IDE DMA MODE NOT SHOWING IT maximalred Linux - General 0 08-23-2003 04:58 AM
DVD DMA Dillema bennyp Linux - Software 2 05-01-2003 09:33 AM
DMA for a DVD Drive? Morpheusman Linux - Newbie 3 08-02-2002 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:34 PM.

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