LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2002, 07:42 AM   #1
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Rep: Reputation: 146Reputation: 146
DMA problem


I am currently having to log in as root and use the hdparm -d1 /dev/hda
command to get my hard drive to run using DMA. I have to do this before logging in a user.
Is there anyway to get this to happen automatically at boot?
I added the following line to rc.local "hdparm -d1 /dev/hda" but it doesnt seem to have worked.


many thanks
 
Old 12-10-2002, 07:51 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
Re: DMA problem

Quote:
Originally posted by salparadise
I
I added the following line to rc.local "hdparm -d1 /dev/hda" but it doesnt seem to have worked.
did u enter it with the quotes? should just be:

/sbin/hdparm -d1 /dev/hda

Are there any error messages during bootup related to this command?
 
Old 12-10-2002, 11:26 AM   #3
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Original Poster
Rep: Reputation: 146Reputation: 146
ok
i tried the above suggestion but the hdparm-d /dev/hda showed dma as 0(off)

this is not particularly a problem as the -d1 command turns it on without the need to reboot and it doesn't take long

but i would rather learn how to set it as part of the boot sequence

is /etc/rc.local the best place to be putting such a command ?
 
Old 12-10-2002, 12:09 PM   #4
Smitty-rh
Member
 
Registered: Oct 2002
Distribution: Redhat
Posts: 35

Rep: Reputation: 15
in /etc/sysconfig/harddisks ensure you have the line USE_DMA=1

then after you enable dma with hdparm it should be enable at boot.
 
Old 12-10-2002, 03:36 PM   #5
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Original Poster
Rep: Reputation: 146Reputation: 146
yes i already have that line and still it is not enabled at boot

maybe i should go at this from the other end

is there a line of code that resets/overrides dma settings upon exit from system?
 
Old 12-11-2002, 03:38 AM   #6
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
What distribution do you use and which version of it?
What kernel version do you use?
Did you compile the kernel yourself?
Did you patch the kernel using for instance grsecurity patch-set?
 
Old 12-11-2002, 03:54 AM   #7
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
To enable it in Redhat 8.0, and in order, to use mplayer fluently, just
add this line into /etc/modules.conf:

options ide-cd dma=1

Anne
 
Old 12-11-2002, 05:54 AM   #8
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Original Poster
Rep: Reputation: 146Reputation: 146
last time i booted the dma read as on
all i did was remove and then re-add the /sbin/ to the beginning of the hdparm command


hmmmmmm

no patches for kernel as yet
haven't got that far

kernel version 2.4.18.3
 
Old 12-11-2002, 02:55 PM   #9
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
i think your sort of doing it right, but you might
at -k1 for keep the settings after reset. thats
a drive reset, not a reset reset.
 
Old 12-12-2002, 02:26 AM   #10
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Original Poster
Rep: Reputation: 146Reputation: 146
------------------------------------------------
but you might
at -k1 for keep the settings after reset
------------------------------------------------

is this a konsole command or an addition to the rc.local file ?
and is it -k1 or at -k1 ?

i am new to this please explain a little more
 
Old 12-12-2002, 06:49 AM   #11
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
-k1
i meant add -k1, not at -k1
putting stuff in rc.local is sort of like autoexec.bat
for windows. its like typing stuff at the konsole,
before you log in, if you want to think of it that way.
so, it is both a konsole command and and addition
to the rc.local file, if you wish. here's the rest of the
hdparm commands. adding 0 after the command
turns it off, 1 turns it on, which reminds me.
there are only 10 types of people in this world, people
with ... and people without . . . blah blah blah.

if i remember close to right -X64 is UDMA0
-X67 UDMA3 and so on. sometimes if you can't get
a drive to work at a certain setting you can try the next
lower one, or 2nd lower. Hell, i'd try them all to keep
from running a pio mode whatever.

Is -X33 or so MWDMA 0? those are around there
somewhere.

There are many facts on the web and probably on this
site about optimizing drives.



Usage: hdparm [options] [device] ..
Options:
-a get/set fs readahead
-A * set drive read-lookahead flag (0/1)
-c * get/set IDE 32-bit IO setting
-C * check IDE power mode status
-d * get/set using_dma flag
-D * enable/disable drive defect-mgmt
-f flush buffer cache for device on exit
-g display drive geometry
-h display terse usage information
-i * display drive identification
-I * read drive identification directly from drive
-k * get/set keep_settings_over_reset flag (0/1)
-K * set drive keep_features_over_reset flag (0/1)
-L * set drive doorlock (0/1) (removable harddisks only)
-m * get/set multiple sector count
-n * get/set ignore-write-errors flag (0/1)
-p * set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P * set drive prefetch count
-q change next setting quietly
-r get/set readonly flag (DANGEROUS to set)
-S * set standby (spindown) timeout
-t perform device read timings
-T perform cache read timings
-u * get/set unmaskirq flag (0/1)
-v default; same as -acdgkmnru (-gr for SCSI, -adgr for XT)
-V display program version and exit immediately
-W * set drive write-caching flag (0/1) (DANGEROUS)
-X * set IDE xfer mode (DANGEROUS)
-y * put IDE drive in standby mode
-Y * put IDE drive to sleep
-Z * disable Seagate auto-powersaving mode
* = (E)IDE drives only
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DMA Problem. duffmckagan Debian 8 10-30-2005 09:32 AM
DMA Problem. duffmckagan Linux - Hardware 5 10-29-2005 03:16 PM
dma problem matrixon Linux - Hardware 0 09-19-2005 11:26 AM
Suse 8.2 change my DMA setting on my DVD-R drive to off & IDE DMA MODE NOT SHOWING IT maximalred Linux - General 0 08-23-2003 05:58 AM
sound card problem sounded like dma problem whansard Linux - Hardware 0 05-22-2003 08:58 PM


All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration