Author Topic: DVD choppy. DMA keeps getting disabled.  (Read 10735 times)

Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
DVD choppy. DMA keeps getting disabled.
« on: January 04, 2008, 06:32:15 am »
Not sure if this is the right area to post this so please let me know if there's another place that's more appropriate.
I have a Hybrid system (specs are in my sig). I'm working through some of my issues since downloading LinuxMCE and going through the install process.
I am currently using 0710 beta2 since I had quite a few problems getting the audio and video to sync up during DVD playback on 0704.

My current issue is getting playback on DVD's to smooth out. They are very choppy. After doing some research, I see that DMA is getting disabled after I put a DVD in the system. Below are the related messages from /var/log/messages.

Jan  3 21:45:08 dcerouter kernel: [  233.728000] hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
Jan  3 21:45:08 dcerouter kernel: [  233.728000] hdc: cdrom_decode_status: error=0x40 { LastFailedSense=0x04 }
Jan  3 21:45:08 dcerouter kernel: [  233.728000] ide: failed opcode was: unknown
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: cdrom_decode_status: error=0x40 { LastFailedSense=0x04 }
Jan  3 21:45:08 dcerouter kernel: [  233.732000] ide: failed opcode was: unknown
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: cdrom_decode_status: error=0x40 { LastFailedSense=0x04 }
Jan  3 21:45:08 dcerouter kernel: [  233.732000] ide: failed opcode was: unknown
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: cdrom_decode_status: error=0x40 { LastFailedSense=0x04 }
Jan  3 21:45:08 dcerouter kernel: [  233.732000] ide: failed opcode was: unknown
Jan  3 21:45:08 dcerouter kernel: [  233.732000] hdc: DMA disabled
Jan  3 21:45:08 dcerouter kernel: [  233.780000] hdc: ATAPI reset complete
Jan  3 21:45:09 dcerouter kernel: [  235.000000] UDF-fs: Partition marked readonly; forcing readonly mount


This output is generated after putting a DVD in my DVD drive.

--I've checked the config of my drive with the hdparm command and below is some information that might be helpful.
linuxmce@dcerouter:~$ sudo hdparm -i /dev/hdc
[sudo] password for linuxmce:
/dev/hdc:
 Model=ATAPI DVD A DH20A4P, FwRev=9P54, 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:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4
 DMA modes:  sdma0 sdma1 sdma2 sdma? mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 *udma4
 AdvancedPM=no
 Drive conforms to: Unspecified:  ATA/ATAPI-4,5,6,7
 * signifies the current active mode

--Here are the specific paramaters after loading a DVD
linuxmce@dcerouter:~$ sudo hdparm /dev/hdc
/dev/hdc:
 IO_support    =  1 (32-bit)
 unmaskirq     =  1 (on)
 using_dma     =  0 (off)
 keepsettings  =  0 (off)
 readonly      =  0 (off)
 readahead     = 256 (on)
 HDIO_GETGEO failed: Inappropriate ioctl for device

--Notice that the using_dma parameter is set to off. I turn it on and tell it to keep the settings after reboot with the following command.
linuxmce@dcerouter:~$ sudo hdparm -d1 -k1 /dev/hdc
/dev/hdc:
 setting using_dma to 1 (on)
 setting keep_settings to 1 (on)
 using_dma     =  1 (on)
 keepsettings  =  1 (on)

--After running this command and rebooting, the settings are kept until I put in a DVD and then the drive is switched to using_dma = off again.
I have verified IDE cable is connected properly and have even switched out with another one to rule that out.

Does anyone have any ideas?
Are you experiencing this as well?

Thank you in advance for you help and suggestions.
Andy

My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

deepsin

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #1 on: January 04, 2008, 09:32:03 pm »
Hi,
I may not be able to help directly but would share my thoughts..

I have had some problems with my box, using other different distributions, same as you have explained here...

A) not sure if hdparam values are carried forward between reboots.

B) whats the kernel parameters you are using. Easiest to find it by using "cat /proc/cmdline".

If you have ide=nodma, then that will disable dma for all the ide bus. I am not sure, but that supersedes any another config you may want to do..

If ide=nodma does not exists in your /proc/cmdline then it means your motherboard/ide bus does not support dma. In that case, try rebooting your box with ide=nodma to see if that helps.. I have had better luck with ide=nodma specifically set when kernel boots up.

Hope this helps..

Thanks



Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #2 on: January 05, 2008, 02:03:43 am »
Thanks for the response.

A) It does seem that the hdparm values are carried between reboots because the dma is on when I first start up the machine without a DVD in the drive. However, dma turns off after putting the DVD in and the error messages in the OP are displayed in /var/log/messages. Running hdparm -i /dev/hdc after putting the DVD in the drive shows that it is turned off after loading the DVD.

B) Here's the output
linuxmce@dcerouter:~$ cat /proc/cmdline
root=/dev/sda1 ro quiet splash

I tried adding the ide=nodma using vi but it will not allow me to save the file.
I read something about the file cannot be modified directly using vi but can't quite figure out the syntax to get the info in the file and not loose the line that's already in there.
Here's what I tried:
linuxmce@dcerouter:~$ gksudo echo 'ide=nodma' >/proc/cmdline
-bash: /proc/cmdline: Permission denied

Bear with me as I am not too fluent in Linux...
:)
My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: DVD choppy. DMA keeps getting disabled.
« Reply #3 on: January 05, 2008, 02:14:25 am »
Thanks for the response.

A) It does seem that the hdparm values are carried between reboots because the dma is on when I first start up the machine without a DVD in the drive. However, dma turns off after putting the DVD in and the error messages in the OP are displayed in /var/log/messages. Running hdparm -i /dev/hdc after putting the DVD in the drive shows that it is turned off after loading the DVD.

B) Here's the output
linuxmce@dcerouter:~$ cat /proc/cmdline
root=/dev/sda1 ro quiet splash

I tried adding the ide=nodma using vi but it will not allow me to save the file.
I read something about the file cannot be modified directly using vi but can't quite figure out the syntax to get the info in the file and not loose the line that's already in there.
Here's what I tried:
linuxmce@dcerouter:~$ gksudo echo 'ide=nodma' >/proc/cmdline
-bash: /proc/cmdline: Permission denied

Bear with me as I am not too fluent in Linux...
:)


Hmmm... the problem with that line is that you need to enter it as below;

sudo echo 'ide=nodma' >/proc/cmdline

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #4 on: January 05, 2008, 02:16:11 am »
Still no go.
linuxmce@dcerouter:~$ sudo echo 'ide=nodma' >/proc/cmdline
-bash: /proc/cmdline: Permission denied

My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: DVD choppy. DMA keeps getting disabled.
« Reply #5 on: January 05, 2008, 02:24:15 am »
Still no go.
linuxmce@dcerouter:~$ sudo echo 'ide=nodma' >/proc/cmdline
-bash: /proc/cmdline: Permission denied



Hmmm... ok simple fix then is to use your favourite text editor to add the 'ide=nodma' as below;

(**I use 'joe' as my editor below**)

sudo joe /proc/cmdline

In 'joe' add the line 'ide=nodma'

Then in 'joe' hit Ctrl-K-X to save your changes 7 your done.

ps To install 'joe' do the following;

sudo apt-get update
sudo apt-get install joe
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #6 on: January 05, 2008, 03:59:49 am »
Well apart from the fact that /proc/cmdline is read-only it probably wouldn't do much good as those parameters were used by the kernel at boot time.

If you want to change them you can edit /boot/grub/menu.lst instead and reboot.  Extra options kan be added to the "kernel" lines.  You can also do this from GRUB itself (press escape when it tells you to during the boot) but then the settings aren't saved, which is handy when experimenting with boot parameters.
"Change is inevitable. Progress is optional."
-- Anonymous


Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #7 on: January 05, 2008, 08:00:47 am »
Thanks for the suggestions.
I went ahead and updated the /boot/grub/menu.lst file to add the ide=nodma. Here's the area of that file that I modified.
title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.22-14-generic root=/dev/sda1 ro quiet splash ide=nodma
initrd          /boot/initrd.img-2.6.22-14-generic
quiet

I rebooted after making the change and it seemed to make no difference. Video playback is still very choppy.

I decided that maybe it was the DVD drive so I swapped it out for another one. (Lite-On SHW-1635S) and I'm having the same issues.
On bootup, the hdparm /dev/hdc still shows;
 using_dma     =  0 (on)
However, after putting a DVD in the drive, it switches the output of the hdparm /dev/hdc command to:
 using_dma     =  0 (off)
It's still showing the same messages in the /var/log/messages file about disabling DMA. (see OP)

What's odd is that this is the same mobo used in the video if I'm not mistaken, I've had issues playing DVD's on both 0704 and 0710 now. Am I the only one experiencing this issue?

On 0704 I had the same issue as posted here http://forum.linuxmce.org/index.php?topic=2577.0
With 0710 things are choppy. I'm just wondering what I'm doing wrong....


I'm not even sure if DMA is the issue. Are there any other avenues that I might want to look into to improve the DVD playback experience?

Thanks again everyone!
My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: DVD choppy. DMA keeps getting disabled.
« Reply #8 on: January 05, 2008, 10:43:36 am »
Thanks for the suggestions.
I went ahead and updated the /boot/grub/menu.lst file to add the ide=nodma. Here's the area of that file that I modified.
title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.22-14-generic root=/dev/sda1 ro quiet splash ide=nodma
initrd          /boot/initrd.img-2.6.22-14-generic
quiet

I rebooted after making the change and it seemed to make no difference. Video playback is still very choppy.

I decided that maybe it was the DVD drive so I swapped it out for another one. (Lite-On SHW-1635S) and I'm having the same issues.
On bootup, the hdparm /dev/hdc still shows;
 using_dma     =  0 (on)
However, after putting a DVD in the drive, it switches the output of the hdparm /dev/hdc command to:
 using_dma     =  0 (off)
It's still showing the same messages in the /var/log/messages file about disabling DMA. (see OP)

What's odd is that this is the same mobo used in the video if I'm not mistaken, I've had issues playing DVD's on both 0704 and 0710 now. Am I the only one experiencing this issue?

On 0704 I had the same issue as posted here http://forum.linuxmce.org/index.php?topic=2577.0
With 0710 things are choppy. I'm just wondering what I'm doing wrong....


I'm not even sure if DMA is the issue. Are there any other avenues that I might want to look into to improve the DVD playback experience?

Thanks again everyone!


Hi again...

Zaerc's right /boot/grub/menu.lst is what you should be editing/updating to manage what Grub does at boot.

Sorry... i did not really read the thread properly and was too focussed on helping your edit /proc/cmdline !!

Now... as to your DMA problem... I would suggest getting yourself (or borrowing) another Optical drive and hooking that up to test whenther the choppiness and DMA problem goes away... I bet it will. My thinking is that it might well be your drive... we've seen this in the past at least.

Best of luck

Andrew

Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #9 on: January 05, 2008, 07:21:33 pm »
Thanks for the suggestion.
In my last post I mentioned swapping out the DVD drive and still having the same issues.
I'm wondering if I need to install 0704 again to see if DMA is turned off on that one as well. Possibly it's just something to do with this 0710 beta 2 build? I would think others would notice and would have complained of these choppy playback issues as well if it was a 0710 beta 2 issue.

I'm also wondering if I might be better off going with a SATA DVD drive?
It seems that there are quite a few using LinuxMCE with success. I'm going with the quote from "The Edge" on this one. "What one man can do, another can do!" http://www.youtube.com/watch?v=KZS14_yec3A
I just need to find the key to fixing this problem.

 :)
My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: DVD choppy. DMA keeps getting disabled.
« Reply #10 on: January 05, 2008, 07:53:19 pm »
Thanks for the suggestion.
In my last post I mentioned swapping out the DVD drive and still having the same issues.
I'm wondering if I need to install 0704 again to see if DMA is turned off on that one as well. Possibly it's just something to do with this 0710 beta 2 build? I would think others would notice and would have complained of these choppy playback issues as well if it was a 0710 beta 2 issue.

I'm also wondering if I might be better off going with a SATA DVD drive?
It seems that there are quite a few using LinuxMCE with success. I'm going with the quote from "The Edge" on this one. "What one man can do, another can do!" http://www.youtube.com/watch?v=KZS14_yec3A
I just need to find the key to fixing this problem.

 :)

Hmmm... I wonder if your current optical drive is suffering choppy playback because its sharing an IDE channel with another of your drives. Thats possible.

I don't think that its a problem per se with 0710 as we have not seen this problem at all on any of test Cores.
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #11 on: January 05, 2008, 08:10:36 pm »
No dice there either. My system is currently setup with the 250 gig drive on a sata connection. The only thing on the IDE cable is the DVD drive. Any other suggestions?
My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: DVD choppy. DMA keeps getting disabled.
« Reply #12 on: January 05, 2008, 08:43:23 pm »
No dice there either. My system is currently setup with the 250 gig drive on a sata connection. The only thing on the IDE cable is the DVD drive. Any other suggestions?

did you also swap the cable but only the drive?
The error not returning "SeekComplete" strongly suggests you have bad drive hardware/medium or a problem with the ide driver. The last one is very uncommon.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Andy

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: DVD choppy. DMA keeps getting disabled.
« Reply #13 on: January 05, 2008, 09:11:44 pm »
SOLVED:
THANK YOU GUYS!!!

I had just swapped out the drive and not the cable. I made the assumption that the new cable that came with my mobo couldn't be bad. WRONG!
Swapping out the cable solved the issues being logged to /var/log/messages and also seems to have cleaned up the DVD playback.

Thanks again for your help.
My Hybrid System
ASUS M2NPV-VM
AMD 5200+
2GB Ram
250 GB SATA Drive ST3250620AS
500w PS
LITE-ON DH-20A4P-04 20X DL DVD writer (IDE)
HAUPPAUGE PVR MCE 150
BLUETOOTH TRENDNET|TBW-105UB
KB&MS GYRATION|GC1205FKM
USB-UIRT
ZCU000 Zwave Controller

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: DVD choppy. DMA keeps getting disabled.
« Reply #14 on: January 05, 2008, 09:30:35 pm »
SOLVED:
THANK YOU GUYS!!!

I had just swapped out the drive and not the cable. I made the assumption that the new cable that came with my mobo couldn't be bad. WRONG!
Swapping out the cable solved the issues being logged to /var/log/messages and also seems to have cleaned up the DVD playback.

Thanks again for your help.

Great :-)
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk