LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   DMA Mode won't stay set to "ON". (https://www.linuxquestions.org/questions/linux-general-1/dma-mode-won%27t-stay-set-to-on-365520/)

morrolan 09-21-2005 04:45 AM

DMA Mode won't stay set to "ON".
 
Hi guys,
I'm having a problem with setting the DMA flag on my dvd drive. I'm running Ubuntu hoary on a Toshiba A30-104 laptop, and I'm experiencing choppy playback from DVD's. I know that the problem is that DMA is not turned on (tested it), and I can turn it on for a single session easily enough using:

Code:

me@box:~$ sudo hdparm -d 1 /dev/hdc

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

This turns it on for a single session - it also works if I do the same on /dev/cdrom or /dev/dvd, as these are both symbolic links to /dev/hdc.

I have also tried

Code:

me@box:~$ sudo hdparm -d 1 -k 1 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 setting keep_settings to 1 (on)
 using_dma    =  1 (on)
 keepsettings =  1 (on)

From what I've read from "man hdparm" the -k switch should keep the settings after a reset, but it doesn't, or I'm misreading it's usage?

When I run the setup wizard on GXine, I get the following:

FAILED - DMA not turned on for /dev/dvd.


If you are using the ide-cd module ensure that you have the following entry in /etc/modules.conf:
options ide-cd dma=1
Reload ide-cd module
otherwise run hdparm -d 1 on your dvd-device.


I don't have an /etc/modules.conf, but I do have an /etc/modules which looks like:

Code:

/etc/modules:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

ide-cd
ide-disk
ide-generic
lp
mousedev
psmouse
sbp2
sr_mod


I have tried to set dma=1 in here like the GXine wizard says, but it doesn't seem to make a difference.

Does anyone know how I can set dma mode to on permanently so I don't have to run hdparm each time I want to watch a DVD?

foo_bar_foo 09-21-2005 12:54 PM

just put the hdparm command at the end of your boot scripts

morrolan 09-23-2005 03:55 AM

I thought of that but I haven't tried it - is there any script in particular where it belongs? Also, what about requiring root permissions to run hdparm? How will that affect it if I put it in the boot script?


All times are GMT -5. The time now is 09:30 AM.