LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-09-2005, 12:03 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Enabling HDD DMA in Gentoo?


Hello,

I want to know how to enable DMA at startup in Gentoo Linux. And is there anything that must be compiled into the kernel to enable DMA?

I ran hdparm /dev/hda in Debian and here are the results:
Code:
/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 9733/255/63, sectors = 80060424192, start = 0
I want the DMA setting to be "on" in Gentoo as well. At the moment I get a warning about DMA not being enabled whenever Gentoo boots up. There is also a warning that it might slow down apps like KDE and so on if DMA is disabled.
 
Old 03-09-2005, 12:49 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
As per request, moved to Linux-Hardware
 
Old 03-09-2005, 12:50 AM   #3
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
You may want to start hdparm. Usually goes like this:

Code:
/etc/init.d/hdparm start
If you get no error messages then you can add it to the boot up process like this:

Code:
rc-update add hdparm default
It should then start up during the boot up.

You may can get more info on options here.

http://www.linuxgazette.com/issue79/punk.html

Later

 
Old 03-09-2005, 01:12 AM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Thanks dalek. I'll try that out.
 
Old 03-09-2005, 01:22 AM   #5
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
If it is not installed, emerge -v hdparm and it will install it for you. Then do the commands above. I think it is installed as part of system, not sure. Also, make sure you have the right chipset in your kernel. DMA won't work if it is not.

Later

 
Old 03-09-2005, 01:24 AM   #6
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Well hdparm is installed in Gentoo as well, so no problem with that.

Also as I just confirmed, DMA mode is enabled and working in Debian, so enabling DMA in Gentoo should not be a problem.

But what is the kernel option in make menuconfig for the chipsets?
 
Old 03-09-2005, 01:43 AM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
I ran /etc/init.d/hdparm start

and I got this error
Code:
 * Starting hdparm...                                                     [ ok ]
 * Running hdparm on /dev/discs/disc0/disc...
 HDIO_SET_DMA failed: Operation not permitted
 * Running hdparm on /dev/discs/disc1/disc...
 HDIO_SET_DMA failed: Operation not permitted
 * Running hdparm on /dev/cdroms/cdrom0...
 HDIO_SET_DMA failed: Operation not permitted
 * Running hdparm on /dev/cdroms/cdrom1...
 HDIO_SET_DMA failed: Operation not permitted
I'm typing this from Gentoo and KDE is really slow
 
Old 03-09-2005, 02:16 AM   #8
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
You may have the wrong chipset in the kernel. You may have to search around to find out what chip is used and put it in the kernel. It is sort of the same principle as installing a driver for your video card except it is a kernel thing.

I don't run hdparm on mine, it is installed though. I actually started mine when responding to your question. It runs slower with it than without it. You may want to make sure you have the right chipset enabled in the kernel and test the thing before using hdparm. Test this way:

Code:
hdparm -Tt /dev/hd<your drive letter here, a for first drive; b for second etc etc >
Hope that helps. Time for shut eye over here. It's after 2:00AM here.

Later

 
Old 03-09-2005, 02:19 AM   #9
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Just to confirm, I compiled all the IDE/DMA chipset modules available as modules, but I am not sure which chipset is the right one for me.
 
Old 03-09-2005, 02:46 AM   #10
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Done it! It works and even without hdparm at all.

I just compiled the Nvidia/AMD IDE chipset drivers into the kernel rather than as a module and rebooted and the performance is much much better now.

The option to find is "Device Drivers" --> "ATA/ATAPI/MFM/RLL support" in
Code:
make menuconfig
(kernel 2.6).

Didn't need to bother with hdparm at all!

Thanks for your help dalek.

For those interested. Test results of hdparm -Tt /dev/hdb

With the IDE chipset drivers compiled *with* hdparm started the result is:
Code:
/dev/hdb:
 Timing cached reads:   1144 MB in  2.00 seconds = 570.94 MB/sec
 Timing buffered disk reads:  164 MB in  3.02 seconds =  54.28 MB/sec
With the IDE chipset drivers compiled *without* hdparm started the result is:
Code:
/dev/hdb:
 Timing cached reads:   1224 MB in  2.00 seconds = 610.87 MB/sec
 Timing buffered disk reads:  162 MB in  3.01 seconds =  53.74 MB/sec
Not much difference there.

Last edited by vharishankar; 03-09-2005 at 02:52 AM.
 
Old 03-09-2005, 04:36 AM   #11
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
Sounds about right. The drive is the big issue here. It seems that the manufacturer can have a lot to do with the speed. I have two 80GB drives and the fast one is in this rig. The other is just over half as fast as this one. This is mine with KDE and all that stuff running of course.

Code:
root@smoker / # hdparm -Tt /dev/hda

/dev/hda:
 Timing cached reads:   1744 MB in  2.00 seconds = 871.70 MB/sec
 Timing buffered disk reads:  170 MB in  3.00 seconds =  56.64 MB/sec
root@smoker / #
I noticed it dropped just a little but when I started hdparm though. Prolly need to set it up with different options.

Glad you got that far though. I like learning something new every day.

Oh, couldn't sleep. I think I'll go soak in the tub for a while.

Later

 
Old 03-09-2005, 09:44 PM   #12
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
With Gentoo it's actually easier to set up these drivers and so on, although this particular issue is kernel related and distro-non-specific. I didn't have this much luck with Slackware and didn't get this far.

I even managed to get hardware accelerated 3d in Gentoo with the ATi drivers, something I couldn't set up with Slackware no matter how hard I tried.

Actually the Gentoo documentation is what made the difference. It's very logically organized, easy to follow and most importantly easy to understand. Once you understand what you're doing, this is the easiest distro in the world.
 
Old 03-10-2005, 03:14 AM   #13
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
I have to agree. The install, though WELL documented, is the worst part of Gentoo. The only thing you have to watch is the etc-update. Other than that, Gentoo is a breeze.

It is pretty easy to update things. When I did my first install and I got a bootable kernel, I made sure to save that kernel while I was "refining" the newer kernels. I always kept that known to boot generic kernel so I could fall back to it when needed.

I have used Mandrake before and while Mandrake is easier to install, Gentoo is way easier to keep up to date.

Later

 
  


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
problem enabling dma matrixon Linux - Hardware 2 04-30-2005 12:50 AM
Enabling DMA - tried everything? imranakbar Linux - Hardware 2 01-18-2005 02:49 AM
Enabling DMA DeadlyMuffin Slackware 4 07-19-2004 09:24 PM
Enabling DMA with no hdparm ? SML Fedora 1 02-22-2004 03:52 PM
Enabling DMA bizzikid Linux - Newbie 4 08-06-2003 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:11 AM.

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
Open Source Consulting | Domain Registration