Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: HOWTO: Enable DMA for a device

  1. #1
    Join Date
    Apr 2005
    Beans
    11
    Distro
    Ubuntu 7.04 Feisty Fawn

    HOWTO: Enable DMA for a device

    If you have problem with cd/dvd's playback you have to enable DMA.
    So open a console and type "sudo gedit /etc/hdparm.conf" (without "") and add these lines at the end of the file.

    Code:
    /dev/cdrom {
    	dma = on
    }
    Where "/dev/cdrom" you can add your device. Then restart your pc (don't know if there's a script that does the same... ) and play again the dvd!

    Have fun

    PS1. Sorry for my bad english
    PS2. If you see smth wrong reply

  2. #2
    Join Date
    Apr 2005
    Beans
    135

    Re: HOWTO: Enable DMA for a device

    This is part of the script I wrote for ubuntu addon zip

    Code:
    echo "CD-ROM current DMA mode"
    sudo hdparm -i /dev/cdrom | grep "PIO modes"
    sudo hdparm -i /dev/cdrom | grep "DMA modes"
    echo "DVD-ROM current DMA mode"
    sudo hdparm -i /dev/dvd | grep "PIO modes"
    sudo hdparm -i /dev/dvd | grep "DMA modes"
    echo "* signifies the current active mode"
    read -p "Turn on DMA for CD-ROM and/or DVD-ROM? [Y/n/q]"
    if [ "--$REPLY" == "--q" -o "--$REPLY" == "--Q" ]; then exit 0; fi
    if [ "--$REPLY" == "--y" -o "--$REPLY" == "--Y" -o "--$REPLY" == "--" ]; then
    sudo hdparm -d1 /dev/cdrom
    sudo hdparm -d1 /dev/dvd
    echo "CD-ROM current DMA mode"
    sudo hdparm -i /dev/cdrom | grep "PIO modes"
    sudo hdparm -i /dev/cdrom | grep "DMA modes"
    echo "DVD-ROM current DMA mode"
    sudo hdparm -i /dev/dvd | grep "PIO modes"
    sudo hdparm -i /dev/dvd | grep "DMA modes"
    else
    echo "Skipped"
    fi

  3. #3
    Join Date
    Apr 2005
    Beans
    8

    Re: HOWTO: Enable DMA for a device

    Can the dma be enabled for my usb hard drive? Transfer speed seems pretty damn slow for me currently.

  4. #4
    Join Date
    Apr 2005
    Beans
    11
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Enable DMA for a device

    Maybe u have usb 1.1! Connect it to usb 2.0 and will go faster

  5. #5
    Join Date
    Jun 2005
    Beans
    2

    Re: HOWTO: Enable DMA for a device

    The above advice didn't work for me to begin with - I got an error as follows:

    setting using -dma to 1 (on)
    HDIO set dma failed: operation not permitted
    using dma = 0 (off)

    This was eventually fixed (via some obscure googling) by removing all ide-* entries from modules (or modules.conf - I've done this in 2 different distributions) and rebooting. After that, hdparm could be used to set dma as normal.

    I'm not sure exactly why this was needed, but at a guess it may have something to do with my only disk being SATA (my DVD drive is IDE primary master, /dev/hda).

    Perhaps this will prove useful to others!

  6. #6
    Join Date
    Mar 2005
    Location
    export HOME=Lund, Sweden
    Beans
    128
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Enable DMA for a device

    Be a bit careful with enabling DMA on older CD-players, they can (and probably will) break, or just not work right.
    Enabling DMA on my CD recorder (I would guess it's about 5 years old), seem to have been the reason that my computer got totally stuck twice... Last time it got stuck in BIOS while "Auto-detecting Secondary Master" (Which is the CD). This, AND some strange messages in the syslog about "ATAPI timeout" and "disabling DMA", makes me think DMA was a bad idea...
    Think twice about the age of your CD player (I guess DVD playes aren't affected by this...) before enabling this.
    There is a reason why there is an option in the kernel for not enabling DMA on CD-ROMs, and why the stock ubuntu kernel has this enabled.
    Proud Ubuntu user, with Debian experience. (Ubuntu as main OS since March 2005)
    Registered Linux User: #386006 (Linux Counter)
    Registered Ubuntu User: #5184 (Ubuntu Counter)

  7. #7
    Join Date
    Nov 2004
    Location
    Nyack NY USA
    Beans
    988
    Distro
    Ubuntu Development Release

    Re: HOWTO: Enable DMA for a device

    Don't forget this thread as well (Earned me brownie points )

    http://www.ubuntuforums.org/showthre...3238#post93238

  8. #8
    Join Date
    Mar 2005
    Beans
    53

    Re: HOWTO: Enable DMA for a device

    I have a problem (don't know if it's really a problem) that I posted on this thread that I need answer...
    http://www.ubuntuforums.org/showthread.php?t=40582

    Ok here's the text for those of you too lazy to click on the link:


    After setting dma on in hdparm.conf

    At startup after "Setting disc parameters..."

    /dev/hdc: No such file or directory

    Why?

    Other than that the device seems to work as normal
    Also I searched, scoured, irc'ed and googled but could not find any leads on how to enable DMA on a USB DVD burner.
    Last edited by bonifacio; June 9th, 2005 at 10:58 PM.

  9. #9
    Join Date
    Mar 2005
    Location
    Morgantown, WV
    Beans
    93
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: HOWTO: Enable DMA for a device

    I used the command line version at the end of hdparm.conf and got the same error for my DVD burner. *BUT* DMA was enabled as intended. When I commented the line out, DMA was not turned on at boot.

    So what is happening here?

  10. #10
    Join Date
    Mar 2005
    Beans
    53

    Re: HOWTO: Enable DMA for a device

    man says:
    hdparm provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE device driver subsystem.
    So I interpret it as only applicable to such device but NOT(?) USB device?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •