The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Acer 5920 DVD DMA

    Discussion in 'Linux Compatibility and Software' started by Telkwa, Dec 31, 2007.

  1. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    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

    Code:
    hdparm -v /dev/scd0
    gives me this:
    /dev/scd0:
    IO_support = 0 (default 16-bit)
    readonly = 0 (off)
    readahead = 256 (on)
    HDIO_GETGEO failed: Inappropriate ioctl for device

    Code:
    sudo hdparm -d1 /dev/scd0 
    gives me:
    /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?
     
  2. kegobeer

    kegobeer 1 hr late but moving fast

    Reputations:
    836
    Messages:
    3,682
    Likes Received:
    0
    Trophy Points:
    105
  3. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    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" :(
     
  4. kegobeer

    kegobeer 1 hr late but moving fast

    Reputations:
    836
    Messages:
    3,682
    Likes Received:
    0
    Trophy Points:
    105
    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.
     
  5. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    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.. :)
     
  6. kegobeer

    kegobeer 1 hr late but moving fast

    Reputations:
    836
    Messages:
    3,682
    Likes Received:
    0
    Trophy Points:
    105
    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.
     
  7. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    The problem is that you are trying to use a utility for IDE drives on a SATA drive. hdparm can do a bunch of things for IDE drives as discussed in the intro of the Gentoo wiki document in this link, but hdparm won't work at all for your 5920's optical and HDD, SATA drives. sdparm was written to do some of the things for SATA drives, that hdparm did for IDE drives, but since DMA is supposed to be on all the time with SATA drives, setting the DMA isn't one of them.

    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.
     
  8. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    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
    gives me:
    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.
     
  9. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    Ok. So that answers two questions I had. The first is that you do not have the IDE compatibility mode enabled in BIOS. I consider that a good thing. Second you are running a good version of the kernel which should not have problems with the configuration. In terms of your question regarding which modules to load, I would definitely take the "piix" module out. You could put the sata_ahci module in its place, but with your running install I would assume that you already have it either built into the kernel, or already loaded as a module. If you do an lsmod from a terminal window (or sudo lsmod), does the module show as loaded? If so, don't bother adding it to your modules configuration. From my perspective I figure you DO have all of the right modules loaded for your SATA devices. BTW, loading the "piix" module for someone else may have solved some problems IF they had the IDE compatibility mode enabled in their BIOS, I'm not sure.
    From the sdparm author's page referenced before;
    So like hdparm, sdparm can configure things on your drives and if used incorrectly can probably screw things up, so it's good that you're cautious. However, the commands you listed above would only output general information, verbosely, from the drive queried. In other words, your usage of sdparm above is useful for querying drive information, and wouldn't harm your system.
    If your end goal is to test I/O performance numbers under both Linux and Vista, in addition to using hdparm on Linux (which as you can see can give you some simple I/O numbers on even SATA disks), there's these suggestions;

    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..
     
  10. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    Thanks very much for the informative reply. I keep a notebook for good terminal commands, and just made some new entries.
    Code:
    sudo lsmod
    has lots of modules, including these:
    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
    Restarted the machine, lsmod looks the same.

    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.
     
  11. jas

    jas Notebook Evangelist

    Reputations:
    697
    Messages:
    622
    Likes Received:
    5
    Trophy Points:
    31
    It means that the module is loaded but not being used. It more than likely is not necessary for your config, so you're correct in removing it from your /etc/modules config file. It looks like it's also loading the ahci SATA module so you don't need to add that to your /etc/modules file (if it's not there already).
    Linux will autoload modules either that it discovers it needs upon bootup, for specific stuff like LAN HW, or through startup processes like bringing up your WiFi or Sound HW. That's why you typically don't need to load things like bluetooth, LAN or wireless LAN modules, in these /etc/modules file, with the current distributions. In my setup I load stuff like my webcam driver and some encryption modules. Everything else is autloaded by the OS, or the boot processes. It's not 100% reliable at discovering all of the hardware, but it's pretty good.

    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..
     
  12. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    jas -
    Thanks again for the helpful replies.
     
  13. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  14. kegobeer

    kegobeer 1 hr late but moving fast

    Reputations:
    836
    Messages:
    3,682
    Likes Received:
    0
    Trophy Points:
    105
    Really? I don't have any problems with playing DVDs in Gutsy. What steps did you follow?
     
  15. Telkwa

    Telkwa Notebook Consultant

    Reputations:
    68
    Messages:
    294
    Likes Received:
    0
    Trophy Points:
    30
    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.