# LG DVD writer problem enabling DMA

## laleshii

I get very low writing and accessing speeds on my LG dvd writer.

These are my kernel modules installed:

```

[*] Generic PCI bus-master DMA support 

│ │ [ ] Force enable legacy 2.0.X HOSTS to use DMA 

│ │[*] Use PCI DMA by default when available 

│ │ [ ] Enable DMA only for disks

```

and

```

│ <*> Intel PIIXn chipsets support
```

because I have a Intel chipset i915g type of mother board.

Some info:

```

rrr # hdparm -d /dev/hdc 

/dev/hdc: using_dma = 0 (off) 

rrr # hdparm -v /dev/hdc 

/dev/hdc: IO_support = 0 (default 16-bit)

 unmaskirq = 0 (off)

 using_dma = 0 (off)

 keepsettings = 0 (off)

 readonly = 0 (off)

 readahead = 256 (on)

 HDIO_GETGEO failed: Inappropriate ioctl for device 

rrr # hdparm -d1 /dev/hdc 

/dev/hdc: setting using_dma to 1 (on) 

HDIO_SET_DMA failed: Operation not permitted using_dma = 0 (off)

rrr  # hdparm -i /dev/hdc

/dev/hdc:

 Model=HL-DT-ST DVDRAM GSA-4167B, FwRev=DL10, SerialNo=DF8FFEB8D840

 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=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 *udma2

 AdvancedPM=no

 Drive conforms to: device does not report version:

 * signifies the current active mode

```

----------

## baobei

Iam betting this drive works fine in Windows.

I had a problem with an old cdrw that worked fine in windows.  When i did a hdparm  -i on it,

the "Drive conforms to:..." message reported an error much the same as yours. In my

case the drive required proprietary software.

The linux kernel supports ATAPI, if your drive does not, it will not work.

I bought a new drive for about $20, installed it and did a hdparm -i on it.

Now the "Drive conforms to..." message says " ATA/ATAPI-5 T13 1321D..."

Also, if you have two drives attached to the same ide cable, those two drives should be compatable together. For example, if one runs at udma2 and the other mdma0, you will have problems.

see /usr/src/linux/Documentation/ide.txt for details.

also /usr/src/linux/Documentation/cdrom/ide-cd

Or, maybe you just dont have permission to use that device???

----------

## laleshii

yes this drive works quite good in Windows writing a full dvd in 8 minutes ... with a 8x speed ...  :Sad: 

My DVD writer isn't that old ...

The dvd writer is alone on the ide cable but the primary ide controller is automatically set to my sata hard disk.Last edited by laleshii on Sat Oct 07, 2006 5:51 pm; edited 1 time in total

----------

## laleshii

I installed gentoo on some other computers but they all have this LG DVD Drive and I can't get them to work  :Sad: .

My friends just enter Windows XP when they write something but I don't have windows installed and I don't want to install it just for writing DVD-s.

Can anybody offer me some support or something coz this is really annoying !   :Evil or Very Mad: 

----------

## nbensa

 *laleshii wrote:*   

> Can anybody offer me some support or something coz this is really annoying !  

 

You could try "flashing" your drive's firmware. For this check LG website. Or you could buy another drive: Pionner for example works. I know because I have one (Pionner 110D.)

----------

## tmasscool

Hi all !

First of all , sorry for my poor english.

I also have a LG electronics dvd writer ( HL-DT-ST DVDRAM GMA-4082N - an OEM LG writer). 

Well it is, not the same model, but here is how i make it work fine.

The thing is I couldn't activate DMA on this drive because it seems to be a SATA drive. On this drive DMA is not required.

Maybe your drive is SATA too.. 

Try lspci | grep ATA 

If you see something that looks like SATA : for example

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)

Then you will probably need to do edit your kernel .config like this :

```

Device Drivers  --->

    ATA/ATAPI/MFM/RLL support  --->

        <*> ATA/ATAPI/MFM/RLL support

        <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support

        <*>     Include IDE/ATA-2 DISK support

        <*>     Include IDE/ATAPI CDROM support

        <*>     generic/default IDE chipset support

        [*]     PCI IDE chipset support

        <*>       Generic PCI IDE Chipset Support

        [*]       Generic PCI bus-master DMA support 

        [*]         Use PCI DMA by default when available

       <*>         Intel PIIXn chipsets support                             Select your chipset

    SCSI device support  --->

        <*> SCSI device support

        <*>   SCSI disk support

        <*>   SCSI CDROM support                                            Don't forget it or it will not work

        <*>   SCSI generic support

        [*]   Probe all LUNs on each SCSI device

                SCSI low-level drivers  --->

                     <*> Serial ATA (SATA) support                          You need to choose your SATA controller here

                         < >   AHCI SATA support

                         < >   ServerWorks Frodo / Apple K2 SATA support

                         <*>   Intel PIIX/ICH SATA support

                         < >   Marvell SATA support (HIGHLY EXPERIMENTAL)

                         < >   NVIDIA SATA support

                         < >   Pacific Digital ADMA support 

```

then make && make modules_install && make install

Now we need to pass some parameters to the kernel, so we need to edit grub.conf or lilo.conf or whatever...

my dvd writer was /dev/hdc, but it needs to be recognised as SATA not IDE,  therefore I passed the arguments

 hdc=noprobe to the kernel and libata.atapi_enabled=1 (you need a 2.6.18 kernel) like this in the grub.conf

```

.

kernel /vmlinuz root=/dev/sda7 hdc=noprobe libata.atapi_enabled=1 video=vesafb-tng:mtrr,ywrap splash=silent,theme:livecd-2006.1 quiet console=tty

.

```

reboot the computer now. Your dvd writer should appear as /dev/sr0 or /dev/scd0 no more /dev/hdc.

After that, I was able to watch DVD fluently and burning at max speed, it wasn't the case before. There is no need to activate dma as it is now recognised as a "SCSI device".

Note : there are other ways to configure the kernel by using modules, but the config is slightly different (need to pass parameters to the modules instead of the kernel).

I hope it could help someone...

----------

## ECantona

It worked for me, thanks! By the way, the model of my drive is HL-DT-ST DVDRAM GWA-4082N.

----------

