PDA

View Full Version : SATA DVD WRITER or DVD drive on SATA controller


steve941
2005-09-12, 07:04 PM CDT
I'm looking for help in enabling dma on my dvd writer. it is a sony dw-d56a and its on an sata controller. I've tried recompiling the linux kernel and changing 2 lines in libata.h from undef to define and I disabled Block Devices- IDE and disabled ATA support so that the normal ATAPI cd rom driver would not conflict with the libata scsi driver. after rebooting to the new kernel the dvd writer was picked up under libata as /dev/sr0 (dmesg) /dev/scd0 (hwbrowser). attempting to to do hdparm /dev/sr0 or /dev/scd0 gave me this error: innapropriate ioctl for this device. I could not enable dma. ...
is there anything else to try.. ive recompiled the kernel now 3 times with the modified libata.h, messin with the config- all failing and giving me that ioctl error.

sej7278
2005-09-13, 03:54 AM CDT
i don't mean to sound harsh, but you'd be better off ditching sata for optical devices (you get no benefit) and ditching sony too (they make the worst drives these days).

try an ide benq dw1640 or nec nd3540, get rid of your hassles for 30usd ;)

markf909
2005-09-13, 04:09 AM CDT
Have you tried burning a dvd though?
Do you get errors during a burn or does it take forever to burn?
I have applied all the libata patches from here (http://rtr.ca/dell_i9300/kernel/kernel-2.6.12/)
to a vanilla 2.6.12 kernel.
I still get the same error message as you when using hdparm but I can burn
a 4.7Gb disk in about 18 mins ( 6x media ) so im guessing that DMA is somehow
enabled. From using the same media on my desktop linux machines which have DMA
enabled no problem the time is roughly the same to burn.
I have a Dell Inspiron 6000 with an NEC 6500a DVD-RW drive running FC3.

steve941
2005-09-13, 02:27 PM CDT
unfortunately i doubt a new drive would help since its on an sata controller.. but i have considered trying it.. I was lookin at the LG super multi drives- are these good?... i have an inspiron 9300 so im limited to slim drives or usb/firewire drives....
the thing ive been trying to do is watch dvd movies.. after compiling the new kernel dmesg says dma is enabled, but I get errors when trying to play dvds that i diddn't get before. like xine gives me a nav packet error.

sej7278
2005-09-14, 02:50 AM CDT
lg drives are usually pretty good, but do you only have a sata controller and no ide - that would surprise me.

markf909
2005-09-14, 03:07 AM CDT
Steve,

I would suggest following the guide at the link I gave you for Inspiron 9300. (http://rtr.ca/dell_i9300)
It worked a treat for me. DVD movie playback is fine for me with mplayer and VLC.
The SATA problem for an optical drive seems to be a big issue for owners of Inspirons 6000 and 9300.
However the purchase of another drive should be the very last resort.

steve941
2005-09-14, 08:56 AM CDT
yeah.. dont want to buy another drive really but i was just lookin..
i believe you have the wrong link.. there should be an 'i' before '9300' but figured it out.. one thing i noticed it the site lists a nec dvd wr while i have a sony .. im going to try anyway though.. thanks

AlaxMAX
2005-09-17, 08:59 AM CDT
... I would suggest following the guide at the link I gave you for Inspiron 9300...

How is your DVD drive connected to your laptop? The kernel configuration file supplied on that site completely deactivates the stadard ATA drivers. Yet, as stated on the site, the Intel PIIX is available through the libata drivers. But how do I know libata supports not only SATA but PATA too?

Furthermore, as stated on that site, the hard disk drive is visible under /dev/sda (and in consequence, the partitions are /dev/sda*). I guess I have to replace any occurence of hda with sda in /etc/fstab in order to use the kernel compiled with that particular configuration file. Is there another place/file to modify in order to handle the change from sda to hda?

And to reach the topic problem, does deactivating traditional ATA drivers (including for IDE ATAPI CD-ROMs, which in my case is compiled into the kernel) have a positive impact on the SATA DVD drive detection?

steve941
2005-09-17, 11:07 AM CDT
drives are IDE/ATA on SATA controller, oh also ATAPI dvd writer on sata controller. There are no problems with the kernel autmatically putting hard drives as sda even though they are ata>hda. This is because the drives are on that sata controller. However, the dvd drive has issues. The kernel doesn't really have dma support for SATA dvd drives or ATAPI dvd drives on SATA controller.
just deactivating ata drivers won't do anything with your hard drives, but it will not detect your dvd drive.
there's the libata.h you have to edit to include atapi support in for libata. I've tried this and according to dmesg the new kernel detects my dvd drive as scsi/sata and apparently enables dma support. BUT dvd movies won't play, and that's really the only thing I want right now.

markf909
2005-09-18, 06:02 AM CDT
As Steve has pointed out the setup is an IDE HD and ATAPI DVD drive on a SATA controller.
The kernel has no official support for an ATAPI drive on a SATA contoller so a workaround
is so change the include/linux/libata.h file in the kernel and configure the kernel such that ATA/ATAPI support
is not compiled at all, your .config file should have this

# ATA/ATAPI/MFM/RLL support
#
# CONFIG_IDE is not set

Just by making those little changes, I was able to get my dvd drive fully working.
However my system used to suffer from random lockups due to buggy error handling
code in the libata drivers, so only by applying all the patches that I found on that site
did I get my system fully functional, with DVD working and Suspend to RAM etc.
Also, as far as I recall, the first time I recompiled the kernel I didn't have to edit
the /etc/fstab file or any other to take account the change from /dev/hda to /dev/sda.
I have yet to find anyone who can control the DMA using hdparm using this method though.
I can only guess that DMA is enabled on my laptop for the DVd just through empirical observations with other linux
machines I own that have DMA enabled on their DVD drives.

steve941
2005-09-18, 11:09 AM CDT
according to redhat hdparm is not supported for scsi dvd drives.. I filed a bug report of this problem a while ago hoping they would be able to help:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=163418

AlaxMAX
2005-09-19, 02:20 AM CDT
I deactivated those ATA standard drivers and I compiled into the kernel the support for SCSI, libata and Intel PIIX. But I was stuck with that /dev/hda -> /dev/sda transform because I didn't know if I had to modify /etc/lilo.conf and /etc/fstab or not in order to reflect the changes.

markf909
2005-09-19, 05:51 AM CDT
I use grub so I am unsure about any changes that would need to be made for LILO
Once a new kernel is compiled with the changes and installed , it should take care of
the change from /dev/hda/ to /dev/sda/
Thats how it worked for me.

AlaxMAX
2005-09-22, 07:18 AM CDT
markf909: Could you post your /boot/grub/grub.conf here (whithout the password line)? Actually, I would like to know the parameters supplied to the kernel at boot.

markf909
2005-09-23, 01:35 AM CDT
I have never had to make any changes to any grub file when i install
a new kernel.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,5)
# kernel /vmlinuz-version ro root=/dev/sda7
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=3
splashimage=(hd0,5)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.12.3)
root (hd0,5)
kernel /vmlinuz-2.6.12.3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.12.3.img

AlaxMAX
2005-09-24, 07:24 AM CDT
It didn't work. I have recompiled the kernel using the dot_config file on the site (changed the processor to P4, compiling reiserfs in the kernel and adding the alsa snd_intel8x0 and snd_intel8x0m modules).

At boot I obtained these lines:

Uncompressing Linux... Ok, booting the kernel;
RedHat nash version 4.2.15 starting
mount: error 6 mounting reiserfs.
ERROR: opening /dev/console !!!!:2
error dup2'ing fd of 0 to 0
error dup2'ing fd of 0 to 1
error dup2'ing fd of 0 to 2
switch root: mount failed
Kernel panic - not syncing: Attepmted to kill init!

The grub.conf look like this:

default=0
timeout=20
splashimage=(hd0,4)/grub/splash.xpm.gz
#hiddenmenu
title Fedora Core (2.6.13.1)
root (hd0,4)
kernel /vmlinuz-2.6.13.1 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.13.1.img

I have tried even root=/dev/sda7 (this is the / (root) partition) as kernel parameter, but it didn't helped. Am I missing some module?

steve941
2005-09-24, 09:58 AM CDT
did you add reiserfs support in kernel? it looks like it isn't because if it was a module it should load and if it was built-in it would load, so i'm betting you didn't compile in reiserfs...
you may have to recompile with that reiserfs as a module or built-in

AlaxMAX
2005-09-24, 10:51 AM CDT
Yes, the module is compiled into the kernel. I have taken special care to activate and compile it.

markf909
2005-09-25, 02:59 AM CDT
Hi Alax,

I never used the dot_config from that site.
I only ever used the patches for libata.
Then I do a make menuconfig and set it up from there.
The only changes I make then are just to disable ATA support.