Trying to get a handle on DMA. How to check, enable, etc.
New Acer 5920, installed Ubuntu 7.10, fully updated. I'm guessing at this, trying various commands found in threads
fstab identifies the optical drive as /dev/scd0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
gives me this:Code:hdparm -v /dev/scd0
/dev/scd0:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Inappropriate ioctl for device
gives me:Code:sudo hdparm -d1 /dev/scd0
/dev/scd0:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Inappropriate ioctl for device
I read a coupla threads that suggested adding piix to /etc/modules but did that already. Apparently no difference. Anyone know what "inappropriate ioctl for this device" means?
-
I think it means you can't enable DMA on that drive. Check this out:
http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux#No_DMA_on_DVD_drive -
I'm not sure what I'm doing, but it appears DMA isn't working on the HDD either. I can deal with little annoyances related to sound or whatever, but basic stuff like DMA oughta "just work"
-
I don't know anything about your laptop, but on my Dell e1705, my HDD and (I believe) my optical drive is SATA. DMA isn't an option for SATA devices. AFAIK, Ubuntu 7.10 automatically sets DMA for devices that support it, so I'll go out on a limb and say you can't set DMA because it doesn't exist on your laptop.
-
So it's not the end of the world? Can you watch DVD's, rip CD's, that sort of thing?
I just got this laptop a few weeks ago, only had Ubuntu functional for a week now. Still trying to get a feel for what it should be able to do. Tell you what, it runs a lot faster on this modern laptop than the old hand-me-down desktops I was using as test rigs.. -
Yes, you can do all of that. Of course, DVD support is not included with the release, but if you click the ? on the menu bar, the help file will tell you exactly what you need to install to get protected DVD (ie: all store bought discs) support.
-
If you're investigating this because you are experiencing problems with either SATA optical drive or hard drive performance, then you need to make sure you have the appropriate SATA driver either loaded as a module, or built into your kernel. That's what the suggestions to, "add piix to /etc/modules", are all about. Before you do this, you should make sure that piix IS the right SATA module for your laptop. I've had laptops with SATA controllers which used the ata_piix module in the past, and my current Santa Rosa based laptop, which uses the sata_ahci module.
From my limited googling it looks like you need to make sure you are using the sata_ahci module and NOT the ata_piix module, with one stipulation. You need to make sure you don't have a SATA compatibility mode enabled in the BIOS. Also there was a bug for using DVD/CD drives in some Santa Rosa laptops which was addressed in linux kernels after 2.6.21. I'm not sure which kernel 7.1 Ubuntu installed for you, but if you do a uname -a in a terminal window, it should tell you.
Having said ALL of that. If you are running a Windows installation on this machine and you've installed it with this BIOS SATA compatibility mode enabled, disabling that will probably result in not being able to boot your Windows install, because you didn't install Windows with the right SATA drivers. (I'm not 100% sure on this). So before you do ANYTHING, and after you've backed up your computer, you can look at any OS installs on it and determine if you've matched the SATA controller and BIOS mode, with the right SATA drivers in the OS. -
Hi, jas -
Now that's a reply with some teeth
I don't know if I'm having problems or not. What I'm trying to do is write up a submission for the Ubuntu Laptop Testing Team. I want to cover everything I can, and DMA is an issue that's popped up with this laptop on the forums. As you've already gathered I don't really know what I'm doing.
So, it's an Acer 5920-6470.
In BIOS, "Information" tab says:
"VGA BIOS Version: Santa Rosa 1478"
In "Main" tab:
"SATA Mode: AHCI Mode"
If I go into that line, the only two choices are "AHCI Mode" or "IDE Mode"
I've made just one change in BIOS. That was moving the optical drive to first boot device so I could partition the HDD and install Ubuntu.
It's still running vista. I had to reinstall vista from my recovery discs after a partitioning snafu, but for the sake of this conversation it's essentially the original install. Pushed aside to make room for Ubuntu of course.
uname -a yields this: "2.6.22-14-generic"
Entering "sudo sdparm -v dev/scd0" and "sudo sdparm -v /dev/sda" gives me the same message:
"The program 'sdparm' is currently not installed. You can install it by typing: sudo apt-get install sdparm
bash: sdparm: command not found"
I'm not about to install sdparm without a clear idea of the consequences.
Do you think I should remove "piix" from modules and put "sata_ahci" in its place? I'm guessing that piix doesn't do anything for me. But another owner of a 5920G (similar to mine) claimed that "piix" solved his DMA issues.
Code:sudo hdparm -Tt /dev/sda
Timing cached reads: 2078 MB in 2.00 seconds = 1039.74 MB/sec
Timing buffered disk reads: 144 MB in 3.00 seconds = 47.93 MB/sec
I don't know if these are decent numbers or not.
Changing the entry to sdparm gives me "command not found" as expected.
Is there a simple way to ask vista to run a similar test? It would be very helpful to see how quickly vista accesses the HDD. -
Probably the most widely used disk benchmarking utility by storage IT folks, which is cross platform, is Iometer. This was a tool originally developed by Intel, and then given to the open source community. I don't know if it is easily installable via an Ubuntu repository in Linux, but using the current Windows versions under Vista will run into a problem with the new user access control system in Vista. If you read this thread you can see that some people were able to get iometer running in Vista by running it as an administrator. That may be more hassle than it's worth for you.
Beyond that, Estesoft makes a disk benchmarking utility for most flavors of windows, and specifically for Vista, which is free for testing and there are lots more Windows benchmarking utilities around the net for the taking. Lastly there are several benchmark utilities for Linux that are rolled into the sysstat package. Iostat is the disk benchmarking tool and here are some screenshots of it running in a terminal window. Also here's another page for linux based benchmarks. I'm sure others can chime in here. Testing computer performance is a big pastime in this business..
Good Luck.. -
Thanks very much for the informative reply. I keep a notebook for good terminal commands, and just made some new entries.
Code:sudo lsmod
ata_piix, size 17540, used by 0.
ahci, used by 0
ata_generic, used by 0
libata, used by 3 (ata_piix, ahci, ata_generic)
Does "used by zero" refer to a device, or does that mean nothing's using it?
I removed "piix" from the list generated by
Code:sudo gedit /etc/modules
lsmod shows almost 100 modules, yet sudo gedit /etc/modules only had about 4 entries.
How come?
Oh, yeah, downloading the Estep disk tool. On dial-up so everything's a chore. Nope, didn't work. Vista wouldn't run the installer. W2K started the installer, then started downloading something off the internet. No thank you. -
Sorry to hear that the estesoft software didn't work. You might want to Google around, or visit some of the other forums around here, like the Acer one, and see if there's a good suggestion for a reliable disk benchmark tool for Vista yet. I specifically installed XP on my laptop instead of Vista, so I can't help there.
Good Luck.. -
jas -
Thanks again for the helpful replies. -
Well, it pains me to admit that vista does anything better than Linux, but vista can play DVD's fine. After loading the restricted modules, DVD's are a glitchy, pixelated mess in Ubuntu.
Installed sdparm from Synaptic but don't know if I have to do something to make it active? Anyway, using sdparm doesn't come back with dma =1 like I was hoping.
Submitted a bug report. -
Really? I don't have any problems with playing DVDs in Gutsy. What steps did you follow?
-
I tossed in a commercial DVD 'cause I was told that Ubuntu would know what to do. It got some restricted drivers (gstreamer something or another) then started trying to play the DVD. It looked horrible - all pixelated and stuttering.
I've been dinking with various hdparm and sdparm commands and as far as I can tell DMA is not working. But I don't have a good understanding of the concept yet.
Hope you can help me out. I've got a 5920 with integrated Intel graphics, not the "G" model with discrete Nvidia card.
Acer 5920 DVD DMA
Discussion in 'Linux Compatibility and Software' started by Telkwa, Dec 31, 2007.