<---- template headericclude ----->
Enable DMA on your DVD/CD drive
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Join Date
    Jul 2005
    Location
    Germany
    Age
    35
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Enable DMA on your DVD/CD drive

    For some of us, DMA isn't enabled by default for our wonderful FC5 powered computers (like some Dells and Thinkpads). I've been spending a month or two (off and on) trying to find out how to work arround this problem. The long answer, from what I understand, for why this happens has to do with an IDE and a SATA/PATA drivers that are conflicting with one another and trying to control the drive (you might notice that the drive is labled /dev/hdc) and the DMA doesn't work well... or at all. According to the bug-report that I read, this is not a bug but an expected side effect of some DVD drive setups. With recently released kernels it is not required to make a custom-build, so this is done based off of a yum-installed kernel.

    Signs of this problem include choppy DVD playback or slow image reading and when running "hdparm -d1 /dev/hdc" to turn DMA on it will respond with "Operation not permitted". If you see this and, like me, have been trying to find a way to enable DMA on your drive this should help you and I'm writing this so that people with this (apperently common) problem can referance one place to solve it.

    Ok, now to get to the part where I tell you how to...

    In the terminal:

    $su -
    #gedit /etc/modprobe.conf


    add the following line to the end of the file (leaving an extra empty line behind it):

    options libata atapi_enabled=1

    save, close and continue in the terminal:

    #gedit /boot/grub/menu.lst

    add the following to the boot parameter:

    combined_mode=libata

    save, close and reboot.

    Now your DVD drive should be called "/dev/scd0", DMA will not be needed and Xine should be able to play it without the choppyness. Further effects of a working DVD drive (from what I hear, tell myself to make me feel better and dream) include faster CD ripping speeds and general read speeds, improved oooo-aaahhhh factor of showing off Linux, improved firtility and a marginal decrease in Windows dependancy...

    My final two files look like this:
    (/boot/grub/menu.lst)
    Code:
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You do not have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /, eg.
    #          root (hd0,0)
    #          kernel /boot/vmlinuz-version ro root=/dev/sda1
    #          initrd /boot/initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/boot/grub/che3.xpm.gz
    hiddenmenu
    title Fedora Core (2.6.16-1.2133_FC5)
            root (hd0,0)
            kernel /boot/vmlinuz-2.6.16-1.2133_FC5 ro root=LABEL=/ rhgb quiet combined_mode=libata
            initrd /boot/initrd-2.6.16-1.2133_FC5.img
    title Fedora Core (2.6.16-1.2133_FC5) no_libata
            root (hd0,0)
            kernel /boot/vmlinuz-2.6.16-1.2133_FC5 ro root=LABEL=/ rhgb quiet
            initrd /boot/initrd-2.6.16-1.2133_FC5.img
    title Fedora Core (2.6.16-1.2122_FC5)
            root (hd0,0)
            kernel /boot/vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
            initrd /boot/initrd-2.6.16-1.2122_FC5.img
    and:
    (/etc/modprobe.conf)
    Code:
    alias eth0 tg3
    alias scsi_hostadapter ata_piix
    alias snd-card-0 snd-intel8x0
    options snd-card-0 index=0
    options snd-intel8x0 index=0
    remove snd-intel8x0 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0
    options libata atapi_enabled=1

    Final Note:
    The bug report had another option that could be passed to replace the "combined_mode=libata" parameter with "combined_mode=ide". My drive started working with the method in this how-to so I stopped there. If yours does not I'd go back and try again or just ask here for help. The bug report said that "combined_mode=ide" just gimped DMA on everything (to include the hard drive) so I wouldn't suggest it but that might've just been because it switched the driver for the SATA/PATA drives to IDE... Frankly I don't know... I'm guessing that if this didn't work, you have an IDE DVD drive but I'm way out of my league of tinkering. So basicly don't use "combined_mode=ide" unless you know what it does and why it doesn't work.
    Last edited by Kobnar; 23rd June 2006 at 03:54 AM.
    "rm -rf yourself..."
    --------------------
    IBM Thinkpad T43
    CPU: 1.87GHz Pentium M
    Memory: 2GB DDR 400
    Video Card: Radeon Mobility X300
    Media: CD-R/CD-RW/DVD Combo Drive
    Storage: SATA 60GB 7200rpm (Fedora Core)

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy, CA USA
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That didn't seem to work for me. My mobo is strictly PATA.

    I can get UDMA to start with the commands, but I'd like to figure out how to get it to happen at start-up.

    Someone on my other forum recommended putting the hdparm commands in a script in init.d

    I'll give that a shot and check back in...
    Last edited by Qwagmire; 7th July 2006 at 12:26 PM.
    Don't put it off for another second. Procrastinate today!
    Registered Linux User #414917

  3. #3
    stanabe Guest
    That didn't work on my Dell E1405 either. I also tried the following page which is similar, but I got no good results.

    No DMA on DVD drive
    http://fedoranews.org/cms/node/1150

    Edit:

    I tried this again on FC6 and it worked perfectly. Thanks Kobnar!
    Last edited by stanabe; 3rd April 2007 at 09:19 AM.

  4. #4
    Join Date
    Jul 2006
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can add commands to run at startup in /etc/rc.local

    i have hdparam commands in there to enable dma on my dvd rw, but i might try the way mentioned here (looks better)..

  5. #5
    Join Date
    Jul 2005
    Location
    Germany
    Age
    35
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    recently I've noticed a problem with this and HAL... HAL doesn't mount any CD's I put in anymore. I'm guessing it's a problem with a new version. Anyways, the device is still "/dev/scd0", if you've use this method, it just requires manual mounting.
    "rm -rf yourself..."
    --------------------
    IBM Thinkpad T43
    CPU: 1.87GHz Pentium M
    Memory: 2GB DDR 400
    Video Card: Radeon Mobility X300
    Media: CD-R/CD-RW/DVD Combo Drive
    Storage: SATA 60GB 7200rpm (Fedora Core)

  6. #6
    infra Guest
    recently I've noticed a problem with this and HAL... HAL doesn't mount any CD's I put in anymore. I'm guessing it's a problem with a new version. Anyways, the device is still "/dev/scd0", if you've use this method, it just requires manual mounting.
    Yes, I've noticed this too. I have created a post regarding this already (Click here )... hopefully we'll get some responses (unless you've overcome this issue already).

    Anyone have success with enabling DMA described in this post, without having to manually mount the cd/dvd drive? In other words, having DMA enabled with the automount function working in FC5.

  7. #7
    sadmac Guest
    Thx to Kobnar!

    Fixed a problem I've had since core 4!

    What a relief.

  8. #8
    Join Date
    Mar 2006
    Location
    .ru, Korolyov
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This does not work with dual layer dvd

    thinkpad T43, 1871-F1G, Fedora 5:

    # sudo dd if=/dev/scd0 of=/dev/null bs=2048
    dd: reading `/dev/scd0': Input/output error
    568+0 records in
    568+0 records out
    1163264 bytes (1.2 MB) copied, 0.681378 seconds, 1.7 MB/s

    # dmesg
    ..
    printk: 54 messages suppressed.
    Buffer I/O error on device sr0, logical block 284
    Buffer I/O error on device sr0, logical block 285
    end_request: I/O error, dev sr0, sector 2472
    end_request: I/O error, dev sr0, sector 2528
    end_request: I/O error, dev sr0, sector 2728

    But it works with standard (4.7GB) dvd:
    # sudo dd if=/dev/scd0 of=/dev/null bs=2048
    15929+0 records in
    15928+0 records out
    32620544 bytes (33 MB) copied, 7.02276 seconds, 4.6 MB/s
    ctrl^c

  9. #9
    Join Date
    Jul 2005
    Location
    Portugal
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I followed this topic steps (changed the modprobe.conf and menu.lst files) and after the reboot i ended up with a HAL that didn't mount CD's and a "no cd burner device" warning in every cd burning software...

    After a few readings I found out that this was happening because the optical device was now called /dev/scd0
    To solve the problem I created the /etc/udev/rules.d/51-local.rules file with the following content:

    # BEGIN FILE
    # location: /etc/udev/rules.d/51-local.rules

    KERNEL=="scd[0-9]*", \
    BUS=="scsi", \
    PROGRAM=="check-cdrom.sh %k DVD", \
    SYMLINK+="dvd dvd-%k"

    KERNEL=="scd[0-9]*", \
    BUS=="scsi", \
    PROGRAM=="check-cdrom.sh %k CD-R", \
    SYMLINK+="cdwriter cdwriter-%k cdrw cdrw-%k"

    KERNEL=="scd[0-9]*", \
    BUS=="scsi", \
    PROGRAM=="check-cdrom.sh %k DVD-R", \
    SYMLINK+="dvdwriter dvdwriter-%k dvdrw dvdrw-%k"
    # END FILE

    After this I restarted the udev service (reboot will also work) and everything is now working fine. The udev rule will create the needed symlink's for the device to work.

    (I'm using FC6 - sorry for the bad English)

  10. #10
    bruce64 Guest
    Good morning Kobnar -
    I'm using a Dell Inspiron 6000, I made the changes above and it worked like a charm! What was most important was showing your edited files specifically to following section:
    title Fedora Core (2.6.16-1.2133_FC5)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.16-1.2133_FC5 ro root=LABEL=/ rhgb quiet combined_mode=libata
    initrd /boot/initrd-2.6.16-1.2133_FC5.img
    I initially put combined_mode=libata at the end of the file and nothing happened. I corrected this and the DVD plays without dropouts but more importantly the sound juicer extracted cds in under 3:30mins - before the changes the avg cd took almost 12mins to rip. Many Thanks!

  11. #11
    haproot Guest

    Red face

    This worked for me on a Thinkpad T43 2668-95u running FC6. Haven't tried burning a cd yet, but if I have problems I'll post back. Definately made a huge increase in DVD playback performance in mplayer.

  12. #12
    Join Date
    Dec 2005
    Location
    Western Australia
    Posts
    269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A great technical explanation of the issue (short and easily understandable) on the topic here>

    http://www.serpentine.com/blog/2006/...s-cddvd-drive/

    Appending combined_mode=libata to the kernel line in GRUB solved the problem on my T43 notebook

  13. #13
    Join Date
    Nov 2006
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have applyed this fix myself with no problems with hal or anything. I have not needed to change or add udev rules. But when I loaded NeroLinux it told me that I didn't have permissions to /dev/sg0, 1, 2. I burn at the right speed as root but not as user. After applying this fix to it, I burnt at normal speeds as user not only in NeroLinux, but also in K3B. So far thats the only programs that I have tested.

    Open a terminal and log in as root. If you are not in root already from applying this fix in the first place.
    #su
    ## gedit /etc/rc.d/rc.local
    Once the file opens on the last line of the file, add the following.

    chmod a=rwx /dev/sg*
    This will allow all users to have full permissions to the sg files that is needed by nerolinux. But I also now have better preformance out of K3B also, so I am thinking it might be device bufferers, I dont know enough about linux to say thats fact, but its the only thing I can think of.

  14. #14
    sadmac Guest
    There should be a way to do that with a udev rule. usually that's the better answer.

  15. #15
    Ceckow Guest
    Awesome! You made my day.

    Works like a charm on a INSPIRON E1505

    Thank you.

Page 1 of 2 12 LastLast

Similar Threads

  1. Enable DMA on USB drive
    By daviddoria in forum Using Fedora
    Replies: 1
    Last Post: 17th February 2009, 02:00 PM
  2. Installing to a USB Flash Drive and using the drive and a normal hard drive
    By beeball in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 23rd March 2008, 05:45 AM
  3. Replies: 1
    Last Post: 9th July 2007, 08:35 PM
  4. Move a Linux drive from drive 1 to drive 0
    By n7yg in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 5th February 2007, 03:26 AM
  5. enable scsi tape drive compression?
    By crispx in forum Hardware
    Replies: 0
    Last Post: 20th December 2006, 10:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]