# poor DVD performance [still unresolved]

## djacober

Hi again

I'm still in search of a solution to improve the performance of my DVD drive.

I hoped an upgrade to Kernel 2.6.16 would solve my problems but I was proven wrong.

I read through any forum I found but no solution up to now.

My DVD is:

```

tux linux # dmesg |grep -i dvd

  Vendor: SONY      Model: DVD+-RW DW-D56A   Rev: PDS7

```

on a Dell Inspiron 6000 and my relevant lspci output is:

```

tux linux # lspci

00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)

00:01.0 PCI bridge: Intel Corporation Mobile 915GM/PM Express PCI Express Root Port (rev 03)

.....

00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)

.....                                  

```

I tried to compile the kernel with and without IDE support

Here are my current parameters:

```

tux linux # grep ATA .config

# ATA/ATAPI/MFM/RLL support

CONFIG_SCSI_SATA=y

CONFIG_SCSI_SATA_AHCI=y

CONFIG_SCSI_ATA_PIIX=y

CONFIG_SCSI_SATA_SX4=m

CONFIG_SCSI_SATA_SIS=m

tux linux #

```

If I boot without ATA support I can see my DVD appearing as /dev/hdc but it's not accessible.

Even if I pass the kernel parameter libata.atapi_enabled=1

If I boot a kernel with ATA support I have poor performance with or without above mentioned parameter.

I appreciate any help on this subject as I have read through many forums now without finding a solution.

Here are a few examples.

https://forums.gentoo.org/viewtopic-t-341337-highlight-dvd+performance.html

https://forums.gentoo.org/viewtopic-p-2904081.html#2904081

http://gentoo-wiki.com/HARDWARE_SATA

All indicate the same but none of them seem to work for me.

Regards DanielLast edited by djacober on Thu May 18, 2006 4:59 am; edited 1 time in total

----------

## BitJam

Can you explain in more detail what you mean by "poor performance"?

This might make it easier for people to help.  For example, if "poor performance" means dvd playback eats up 100% of the CPU time and still drops frames even though hdparm says I have dma enabled for my dvd device then I would suggest making sure you have the proper USE flags such as mmx and sse, etc. set.  You can find out which of these flags are appropriate for your machine by running:

```
$ grep flags /proc/cpuinfo
```

----------

## djacober

By poor performance I mean when copying files from dvd I have a very low read rate, the system is completely locked, moving the curser is hardly possible, and starting other porgrams even less.

Burning DVD's I get a write rate of about 0.8x.

When I run hdparm I have a read rate of approx 1.8 MB/s which seems very low.

Here's my output of cpuinfo:

```

tux linux # grep flags /proc/cpuinfo

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx est tm2

```

Hope this information helps

Regards Daniel

----------

## mwplinux

I had the same problem on my Inspiron 6000. The solution was to remove all IDE Support in the kernel, and added "libata.atapi_enabled=1" as kernel parameter to my kernel line in GRUB. BTW, the dvd drive is now called /dev/sr0 instead of /dev/hdc.

----------

## djacober

Thanks for your hint.

I will try this as soon as possible.

Could you please post or send me the relevant parts of your kernel config.

Did you change something in your udev configuration?

According to my opinion the drive should then show up as /dev/sr0 but I still have /dev/hdc entry which I can't access anymore of course when I enable the libata option.

Thanks for your help

Regards Daniel

----------

## mwplinux

Well I can't show you my kernel config right now because I'm not home at the moment. But I just completly removed everything under "Device drivers" -> "ATA..."

To fix the /dev/hdc problem, just make a new symlink from /dev/sr0 to /dev/dvd.

----------

## djacober

OK that should help

But the problem is the /dev/sr0 device node didn't show up.

All I saw in dmesg was that the DVD drive was detected but no device node was created.

But anyhow I will try what you told me and give you an update.

Thanks again.

Regards Daniel

----------

## mwplinux

Do you have a node called /dev/scd0, because /dev/sr0 is a symlink to that?

----------

## djacober

I will have to check this tonight as I'm in the office right now.

But the weird thing is that I don't have any entries in dmesg.

When I have the IDE support built in in dmesg it tells me that the drive is registered as /dev/hdc

But with out IDE support all I see is 1 line telling me about the existence of the DVD drive.

I will post the output this evening.

----------

## djacober

I tried now your hint and the result is that I have no DVD drive at all anymore:

Here's the output of dmesg and my missing device nodes:

```
libata version 1.20 loaded.

ahci 0000:00:1f.2: version 1.2

acpi_bus-0201 [09] bus_set_power         : Device is not power manageable

ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 17 (level, low) -> IRQ 18

ACPI: PCI interrupt for device 0000:00:1f.2 disabled

ahci: probe of 0000:00:1f.2 failed with error -12

ata_piix 0000:00:1f.2: version 1.05

ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 17 (level, low) -> IRQ 18

PCI: Setting latency timer of device 0000:00:1f.2 to 64

ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14

ata1: dev 0 cfg 49:2f00 82:346b 83:7f09 84:6003 85:3c69 86:3e01 87:6003 88:203f

ata1: dev 0 ATA-7, max UDMA/100, 156301488 sectors: LBA48

ata1(0): applying bridge limits

ata1: dev 0 configured for UDMA/100

scsi0 : ata_piix

  Vendor: ATA       Model: SAMSUNG MP0804H   Rev: UE20

  Type:   Direct-Access                      ANSI SCSI revision: 05

ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xBFA8 irq 15

ata2: dev 0 cfg 49:0b00 82:0210 83:1000 84:0000 85:0000 86:0000 87:0000 88:0407

ata2: dev 0 ATAPI, max UDMA/33

ata2: dev 0 configured for UDMA/33

scsi1 : ata_piix

  Vendor: SONY      Model: DVD+-RW DW-D56A   Rev: PDS7

  Type:   CD-ROM                             ANSI SCSI revision: 05

SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)

sda: Write Protect is off

sda: Mode Sense: 00 3a 00 00

SCSI device sda: drive cache: write back

SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)

tux linux # ls -ld /dev/sc*

ls: /dev/sc*: No such file or directory

tux linux # ls -ld /dev/sr*

ls: /dev/sr*: No such file or directory

tux linux #                       

```

The wierd thing is that it recognizes the drive but doesn't create a device node.

What am I missing here?

----------

## djacober

No one out there who had this problem before?

Can't find the solution for this:

I either have to work with a poor performing DVD drive in IDE mode 

or without DVD drive at all when trying to configure it as a SATA device

Appreciate any hint.

Daniel

----------

## radio_flyer

 *djacober wrote:*   

> No one out there who had this problem before?
> 
> Can't find the solution for this:
> 
> I either have to work with a poor performing DVD drive in IDE mode 
> ...

 

I have an Acer laptop with the same crappy (read cheap) hardware. The problem is the ICH6M is a combined PATA/SATA controller and that concept violates the kernel sense of hardware political correctness--the IDE and SATA drivers fight over the same ports. Eventually the SATA driver is supposed to support all of the legacy PATA stuff and the old IDE (PATA) driver will go away. Not anytime soon though. Here's a link to a page that I used to understand some of the issues:

http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux

I find the SATA drivers to be a little problematic. So, there is a quick IDE workaround. See:

http://www.hermann-uwe.de/taxonomy/term/333

If you have an ICH6M (run 'lspci') and you apply that patch (follow the 'my first kernel patch' link) and recompile the kernel you might get DMA working. I have all the kernel SATA stuff off and just the IDE driver compiled in, and hdparm (running as a service at startup) is able to set DMA on for both the hard drive and DVD. Here's my relevant lspci line; except for the revision number it looks a lot like yours:

```
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 04)

```

so it might work for you.

----------

