Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I just bought the ASUS P4P800 Deluxe motherboard. I was told that I needed kernel 2.4.21 for this motherboard, so I upgraded to it and that's what I'm using now.
But I quickly noticed that my IDE harddrive access causing the system to pause temporarily every now and then when it accesses large files or has a lot of activity. It looks like it's not able to turn on DMA, so I'm getting really poor performance.
When I do "hdparm -d /dev/hda" (my primary harddrive), it shows:
using_dma = 0 (off)
So I type "hdparm -d1 /dev/hda", and it says:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
So it looks like it recognizes that it has up to udma6. The BIOS also recognized it (I checked there in the BIOS settings that it detected it was UDMA-6). So why is linux unable to use DMA mode with my harddrives?
Here's a snippet from my /var/log/messages about the IDE stuff:
Any idea what's going on? I seem to have reached the limits of my knowledge in this area. I don't think I can deal with having a motherboard in this kind of condition. But I doubt it's the motherboard's fault. I think it's something I need to be setting in linux somewhere. But what?!
How I noticed this problem in the first place was that I tried to play some mp3's to check out the P4P800's built-in sound chips. The sound was terrible. Every few seconds it would mess up by playing the wrong sound, or it would play garbage sound (not white noise) or pause in between sounds. Then I noticed it happened whenever I had disk access. So it looks like the disk access was interrupting the system long enough to cause the sound operations to be put on hold or even get corrupted (some of the notes were way off). I also noticed my mouse pointer would hang every now and then whenever I did something intensive with the disk. I mean it would hang for as much as 10 seconds! And I have a Pentium 4 2.6GHz, so it's definitely not a question of CPU speed.
And your IDE chipset is actually a IDE software RAID chipset.
I'd like to tell you what raid chipset you have, but asus seems to have a bunch of dead links where the manuals should be. Sorry. Looks like a VIA something or other. In which case you would need the raid kernel VIA module for that chipset.
Thanks, Thoreau. I'll flash my BIOS, which I've not done yet. Do you really think that'll allow linux to turn on DMA? Is that something an older BIOS didn't allow?
Also, I'm not using RAID drives. I'm just hooking up two harddrives to my primary IDE port. So I shouldn't have to enable RAID in the kernel or anything, right? I don't even remember seeing something in the config settings for it.
I upgraded my BIOS to the lastest version (version 1008 6/25/03). It didn't improve (or worsen) things. My DMA is still not set, and I get the same error message trying to force it to be set using hdparm.
I'm not sure what's going on here. I'm probably not setting something right in the linux kernel .config file. Here's the snippet from my .config file for just the IDE related section. Is there anything in there which should be set but isn't? ....
# ATA/IDE/MFM/RLL support
# IDE, ATA and ATAPI Block devices
# Please see Documentation/ide.txt for help/info on IDE drives
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_IDE_TASK_IOCTL is not set
# IDE chipset support/bugfixes
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# Note: most of these also require special kernel boot parameters
# CONFIG_BLK_DEV_4DRIVES is not set
# CONFIG_BLK_DEV_ALI14XX is not set
# CONFIG_BLK_DEV_DTC2278 is not set
# CONFIG_BLK_DEV_HT6560B is not set
# CONFIG_BLK_DEV_QD65XX is not set
# CONFIG_BLK_DEV_UMC8672 is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set
I tried manually changing the CONFIG_IDEDMA_AUTO setting to "y". Same with the CONFIG_DMA_NONPCI setting. Then I did "make xconfig", pulled up the menu for IDE stuff, didn't make any changes, then saved the .config file. The result was that the settings I had manually set were changed back to being unset. I think, therefore, I'm not supposed to just turn those two settings on and nothing else? I'm going to continue to play with it.
Well I emailed the linux kernel IDE maintainer. I haven't heard back. I did a google search on this problem, and it seems it's a very common problem. I think I'm the first to see it for the P4P800 and my combination of harddrives. But others with other motherboards and harddrives have run into this same issue lots of times in the past.
I tried upgrading to kernel 2.4.22-pre5. It wasn't any better. I hope they enable it in the final version of 2.4.22.
Interestingly, I tried kernel 2.4.2 (which came with Red Hat 7.1), and it didn't enable DMA either, *but* I was able to do "hdparm -d 1 /dev/hda" to enable it manually. And that worked. It doesn't work for kernels 2.4.20, 2.4.21, or 2.4.22-pre5, however. So that seems like a bug.
My feeling at this point is that the linux IDE drivers are greatly in flux. I hope they'll straighten this out soon. It's very disappointing.
Well well. I got a response to my question on alt.comp.periphs.mainboard.asus. It turns out I needed to enable these settings in the linux 2.4.21 kernel config:
* Generic PCI IDE Chipset Support (CONFIG_BLK_DEV_GENERIC)
* Generic PCI bus-master DMA support (CONFIG_BLK_DEV_IDEDMA_PCI)
* Use PCI DMA by default when available (CONFIG_IDEDMA_PCI_AUTO)
* Intel PIIXn chipsets support (CONFIG_BLK_DEV_PIIX)
I wasn't enabling the Intel PIIXn chipset support. That's what I was doing wrong. I didn't even know the ICH5 chipset was considered part of the Intel PIIXn chipset. That really wasn't obvious to me. Live and learn.
So now the kernel recognizes my on-board IDE controller. I verified that DMA is being used. And man, what a big performance difference!!! I feel like I have a great system now.