Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having a problem with DMA modes on my hard disk and after having searched google, newsgroups, and forms for the last 12 hours I've decided to post my problem here. My initial problem was that my system would boot very slowly while timing out on DMA modes(dmesg is listed below). I have found that I can turn this off with an append line of ide=nodma in my bootloader.
However, despite the faster bootup times this really kills the performance of my hard drive. The drive in question is a Maxtor 7200RPM 80GB ATA133. My mainboard is a KT333 with builtin ATA133 IDE controller. Below is an hdparm test regardless of whether I disable DMA on bootup.
hdparm -tT /dev/hdc
Timing buffer-cache reads: 1240 MB in 2.00 seconds = 620.00 MB/sec
Timing buffered disk reads: 22 MB in 3.13 seconds = 7.03 MB/sec
I ran hdparm on an old K6 233 that I've got lying around with a 5200RPM 8GB hd and I got 32MB in 3.02 seconds = 10.60 MB/sec on that (It's on mdma2)
I have a second identical Maxtor drive on hdd (I used to have the two in a RAID array). That disk is going to be for my dual boot into windows, at the moment, its just a plain formatted NTFS4 drive. That drive is currently using udma6 (ATA133) and I get speeds of 120 MB in 3.02 seconds = 39.74 MB/sec so over four times as fast.
I tried noautotune, and idebus=100 options for kernel params and no luck there.
I found a good article about using hdparm to change settings once you've booted up at linuxnetmag and followed some of their instructions but I'm still having issues. Per their advice I used tail to keep track of /var/log/messages while changing DMA modes.
To change to udma6 I ran
hdparm -d1 -X72 -i -v -t /dev/hda
This came back with a speed of 20 MB in 3.18 seconds = 6.29 MB/sec, even slower than before. So I checked the messages on my other console and found that it gave me the same errors as I was experiencing at Startup.
Nov 22 09:20:30 hawkwing kernel: hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
Nov 22 09:20:30 hawkwing kernel: hdc: drive_cmd: error=0x04 { DriveStatusError }
Nov 22 09:20:50 hawkwing kernel: hdc: dma_timer_expiry: dma status == 0x61
Nov 22 09:21:00 hawkwing kernel: hdc: error waiting for DMA
Nov 22 09:21:00 hawkwing kernel: hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }
So here are my final questions:
1) Can I/How can I setup this drive to work at udma6? I get the same error when trying dma2!
2) If I specify ide=nodma as part of my boot options won't that affect my cd-r and dvd drives as well? hdparm shows they are using dma.
3) Could this be a problem with my drive? I was using both in a striped windows array with no problems. I just changed this box over to linux earlier this week?
======dmesg======
IDE controller at PCI slot 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8233a (rev 00) IDE UDMA133 controller on pci00:11.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:DMA
hda: PLEXTOR CD-R PX-W4012A, ATAPI CD/DVD-ROM drive
hdb: IDE DVD-ROM 16X, ATAPI CD/DVD-ROM drive
hdc: MAXTOR 6L080L4, ATA DISK drive
hdd: MAXTOR 6L080L4, ATA DISK drive
blk: queue c0181174, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c01812b0, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdc: attached ide-disk driver.
hdc: host protected area => 1
hdc: 156355584 sectors (80054 MB) w/1819KiB Cache, CHS=155114/16/63, UDMA(133)
hdd: attached ide-disk driver.
hdd: host protected area => 1
hdd: 156355584 sectors (80054 MB) w/1819KiB Cache, CHS=155114/16/63, UDMA(133)
Partition check:
/dev/ide/host0/bus1/target0/lun0:<4>hdc: dma_timer_expiry: dma status == 0x61
hdc: error waiting for DMA
hdc: dma timeout retry: status=0x58 { DriveReady SeekComplete DataRequest }
(Note: The windows drive shows using_dma = 1 and udma modes 3 through 6 with 6 selected)
System is running Mandrake 9.2 kernel 2.4.22-10
AMD XP2200+, KT333, 512MB DDR333, 2x 80GB 7200rpm ATA133. (so far it ran a lot faster in windows :( I hope to remedy this soon)
Edit:
Forgot lspci (doh), here's the relevant lines:
00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
Okay, looks like the problem is in my IDE controller, I didn't think so at first due to the other drive showing up alright. More searching shows this should be resolve by adding the Alan Cox patches and possibly a patch by Vojtech Pavlik if that's not already in the -ac patches. Now I just have to figure out how to do that.
I never see
blk: queue c0181174, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c01812b0, I/O limit 4095Mb (mask 0xffffffff)
in my dmesg logs. This could be new in kernel version 2.4.22 .
Your version of Mandrake could be corrupted during downloading and burning the image on a CD.
Try another cable because putting kinks in the cable decreases high frequency transmission. Use round cable with shielding if you can. This could be 90% of your problem.
You need to download the kernel from kernel.org to apply the patches because you can not use your Mandrake kernel. justlinux.com has a good howto for patching and compiling kernels.
So I've done some more research and tried quite a few things but am still having problems.
First the quick stuff:
I swapped cables just in case, this was a good round shielded "ATA133" cable. no dice
I updated my BIOS, tried every possible option. no dice
So I downloaded the latest stable kernel, 2.4.22 from kernels.org and applied the correct -ac patch, 2.4.22-ac4 to the kernel and rebuilt per instructions I could find on justlinux (thanks for the advice). I am still having this problem and believe I may have done something wrong in building the kernel.
When I rebuilt, I used the make .oldconfig option and wonder if this may have been part of the problem. I wasn't prompted for any options that seemed related to my IDE controller. Could the needed driver not have been included because of this? Also after rebooting with the new kernel I had some hardware/software that wasn't working correctly. I figured I'd have to add my audio and nvidia drivers again but it seems like I may have really messed up my configuration with the new kernel. This was my first time building a kernel and while all the steps went fine, I didn't quite get what I wanted.
I decided to check and see what was different from the kernel I downloaded and the src that mandrake provided, there were two man differences.
First, there was no object file for my driver in the mandrake source, I assume this is because I just never compiled mandrake's source.
Any good advice on how to figure out the config options before building the kernel? Can/should I use the mandrake provided source or is that a stupid thing to do?
I'd like to get this thing patched and working without having to re-setup everything else on my box
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.