LinuxQuestions.org
Help answer threads with 0 replies.
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 10-08-2002, 01:23 AM   #1
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
ogle & mplayer intermitternt freezing frames


Has anybody had any trouble with frames getting frozen every 1-2 seconds for a fraction of a second while playing DVDs? I have a 2.0G processor, 512M of RAM and 16x DVD drive. Since both players have the same problem, I was checking to see it was the CPU not being capable of decoding the frames, but the load never exceeded 50% at any point of time.

When I look at the dvd drive LED, it lights up exactly at the instant the frame freezes ( audio does not break at this point ) and it keeps on doing it every couple of seconds. What looks like the reason is a disk-read-wait here. Can I increase the 'read-buffer-size' or 'read-block-size' or something of the sort, so the software doesnt have to wait to get some more data from the drive before it can decode & render it?
 
Old 10-08-2002, 09:58 AM   #2
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 47
Yeah i had the same problem. I turned on DMA for my DVD drive and it solved the problem.
man hdparm
hdparm -d 1 /dev/hdc
As root..
HTH
-NSKL
 
Old 10-08-2002, 04:23 PM   #3
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

Original Poster
Rep: Reputation: 30
Thanks NSKL. DMA did it!!

Could you run hdparm -tT on your dvd drive and post it? My buffered disk reads seem to be on the slow side, so I want to compare it with someone else's to see if there's some tuning left to be done. Are you using UltraDMA?

/dev/dvd:
Timing buffer-cache reads: 128 MB in 0.54 seconds =237.04 MB/sec
Timing buffered disk reads: 64 MB in 17.72 seconds = 3.61 MB/sec
 
Old 10-08-2002, 05:45 PM   #4
Amerist
Member
 
Registered: Apr 2002
Location: Germany
Distribution: RedHat & SuSE
Posts: 106

Rep: Reputation: 15
I also had the same problem. My problem now is that I can not get DMA to stay on after rebooting. How does one do that?
 
Old 10-08-2002, 07:04 PM   #5
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

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Amerist
I also had the same problem. My problem now is that I can not get DMA to stay on after rebooting. How does one do that?
Adding the -k1 option to hdparm preserves state over 'soft' boots.

For Redhat, add
hdparm -d1 -k1 /dev/cdrom
line in /etc/rc.d/rc.local to preserve state over 'hard' boots.
 
Old 10-09-2002, 02:52 PM   #6
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 47
--(Wed Oct 9, 21:48:21)--(root@SlackBox:/home/nskl)# hdparm -Tt /dev/dvd

/dev/dvd:
Timing buffer-cache reads: 128 MB in 0.52 seconds =246.15 MB/sec
Timing buffered disk reads: 64 MB in 22.48 seconds = 2.85 MB/sec

Slower than yours, still works fine tho...
-NSKL
 
Old 10-09-2002, 03:00 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally posted by nxny
Adding the -k1 option to hdparm preserves state over 'soft' boots.

For Redhat, add
hdparm -d1 -k1 /dev/cdrom
line in /etc/rc.d/rc.local to preserve state over 'hard' boots.
well setting k in rc.local seems a bit bizarre seeing as the whole point of the k flag means you don't need to load them in rc.local.... the k flag stores it's settings in /etc/sysconfig/harddisks which is read by rc.sysinit on each boot, hard or soft.

unless i'm wrong that is...
 
Old 10-09-2002, 04:22 PM   #8
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

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by acid_kewpie
well setting k in rc.local seems a bit bizarre seeing as the whole point of the k flag means you don't need to load them in rc.local.... the k flag stores it's settings in /etc/sysconfig/harddisks which is read by rc.sysinit on each boot, hard or soft.
I would like to see them stored somewhere, but dont know where. BTW, the following in an except from the hdparm man page

---------------------------------------------------------------------------

-k Get/set the keep_settings_over_reset flag for the drive. When this flag is set, the driver will preserve the -dmu options over a soft reset, (as done during the error recovery sequence). This flag defaults to off, to prevent drive reset loops which could be caused by combinations of -dmu settings. The -k flag should therefore only be set after one has achieved confidence in correct system operation with a chosen set of configuration settings. In practice, all that is typically necessary to test a configuration (prior to using -k) is to verify that the drive can be read/written, and that no error logs (kernel messages) are generated in the process (look in /var/adm/messages on most systems).

-K Set the drive's keep_features_over_reset flag. Setting this enables the drive to retain the settings for -APSWXZ over a soft reset (as done during the error recovery sequence). Not all drives support this feature.

------------------------------------------------------------------------

And my /etc/sysconfig/hardisks ( Redhat Stock ) is practically empty - all lines commented out. No trace of the changes I made to the DVD drive. Which makes me wonder if hdparm identifies my DVD drive as a non-fixed disk and treats in differently. Do you think?
 
Old 10-09-2002, 04:25 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

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by NSKL
--(Wed Oct 9, 21:48:21)--(root@SlackBox:/home/nskl)# hdparm -Tt /dev/dvd

/dev/dvd:
Timing buffer-cache reads: 128 MB in 0.52 seconds =246.15 MB/sec
Timing buffered disk reads: 64 MB in 22.48 seconds = 2.85 MB/sec

Slower than yours, still works fine tho...
-NSKL
Thanks again, NSKL.
 
Old 11-18-2002, 02:15 AM   #10
glennp
LQ Newbie
 
Registered: Oct 2002
Location: NY
Distribution: Redhat 8.0
Posts: 20

Rep: Reputation: 0
whenever I run hdparm I get command not found. I have the man pages for it so I assume that I have it. What is the command in RH 8.0?
thanks for the help
 
Old 11-18-2002, 05:20 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
look for /sbin/hdparm you're presuambly screwing up your path when you su to root. that's assuming you are root of course.
 
Old 11-18-2002, 11:05 AM   #12
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

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by acid_kewpie
look for /sbin/hdparm you're presuambly screwing up your path when you su to root. that's assuming you are root of course.
yeah, try
su -
That should execute /etc/profile inside the su shell and change the path to root's.
 
Old 11-24-2002, 07:57 PM   #13
gbrad
Member
 
Registered: Sep 2002
Location: St. Louis, MO
Distribution: Red Hat 8
Posts: 89

Rep: Reputation: 15
When I try to set the DMA of my dvd-rom by using hdpram -d 1 /dev/hdc I get the following message:

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

Does anyone know how to fix this? Thanks in advance.
 
Old 11-25-2002, 06:15 AM   #14
Amerist
Member
 
Registered: Apr 2002
Location: Germany
Distribution: RedHat & SuSE
Posts: 106

Rep: Reputation: 15
Have you tried this?

hdparm -d1 -k1 /dev/cdrom

What do you get?
 
Old 11-25-2002, 09:14 AM   #15
gbrad
Member
 
Registered: Sep 2002
Location: St. Louis, MO
Distribution: Red Hat 8
Posts: 89

Rep: Reputation: 15
Nevermind. I talked to some guy at Red Hat. He gave me a line to enter into etc/modules.conf. It's what you have to do to assign DMA in RH 8.0. The line for anyone curious is: options ide-cdrom dma=1
 
  


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
tried Xine, Mplayer,Ogle. bbates Linux - Software 5 10-02-2005 10:19 AM
Full screen on Mplayer or Ogle saklay Linux - General 12 06-25-2004 10:04 PM
Mplayer and OGLE in SuSE 8.2 sergeantroach Linux - Software 2 12-15-2003 08:00 AM
mplayer / ogle nightmare!!! morfy50 Linux - Newbie 2 09-23-2002 07:08 AM
Mplayer & Ogle aspect ratio Johng Linux - Software 0 09-21-2002 05:24 AM

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

All times are GMT -5. The time now is 05:29 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