Installer should configure /etc/hdparm.conf

Bug #36664 reported by Aaron Whitehouse
10
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Every time that I re-install ubuntu, I reconfigure my hdparm.conf file. I am really happy to see that, in Dapper, DMA is turned on for my hard-disk and CD-Rom without my having to edit the files, but there are other options that are not set up for me.

I was told that my machine could handle, and should therefore turn on, the following:

/dev/hdc {
 dma = on
 io32_support = 3
}

/dev/hda {
 mult_sect_io = 16
 dma = on
 io32_support = 3
}

The DMA seems to be on now by default, but the other options are on the lowest setting. Is there a way of going through the hdparm options, testing if the machine can handle them and turning them on if it can? I have no doubt there are many other options in hdparm that I should have on but that I don't understand.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

BTW: I am using Dapper Flight 5, fully updated.

Revision history for this message
Colin Watson (cjwatson) wrote :

There is no sensible way to go through and try out hdparm options as you're suggesting. However, if the kernel can know that these options are safe for your hardware, perhaps it could enable them automatically without the need for hdparm.

To set hdparm.conf options in the installer, you can install in expert mode to be asked the cdrom-detect/cdrom_hdparm question. Answering -d1 -c3 would get the dma and io32_support parameters you're setting for your CD. We have no support for asking for hard disk hdparm.conf options in the installer at present, but I strongly believe that those should get better defaults in the kernel rather than adding installer UI for it.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Thanks for your comments, Colin. Firstly I want to make it clear that I did not want an additional Gui in the installer. I don't understand the options that I am talking about and I consider that there are those out there with less knowledge than myself.

What I was always talking about was auto-configuration. As you rightly point out, if it can be automatically done, it doesn't need hdparm.conf options set.

From my point of view, I would consider the issue fixed whether it was done by the kernel or the installer. At the moment most users either have to get someone else to 'write' their hdparm file or they have to run their hardware sub-optimally.

Revision history for this message
Didier Raboud (odyx) wrote :

I confirm that here.

My DVD burner/reader doesn't have dma activated, as it should have. "Should have" in the meaning that a standard (let's say "lambda") user should not have to do any line of command (nore config file edit) for having full functionality with disks and readers.

----------------------------------------
$ sudo hdparm /dev/hdc

/dev/hdc:
 IO_support = 0 (default 16-bit)
 unmaskirq = 0 (off)
 using_dma = 0 (off)
 keepsettings = 0 (off)
 readonly = 0 (off)
 readahead = 256 (on)
 HDIO_GETGEO failed: Invalid argument
----------------------------------------

Changed in linux-source-2.6.15:
status: Unconfirmed → Confirmed
Revision history for this message
Matthew Garrett (mjg59) wrote :

Could you both please attach the output of

lspci -n

and

sudo hdparm -h /dev/cdrom

?

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote : lspci

Here is the output of lspci -n

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote : hdparm

This it the output of sudo hdparm -h /dev/cdrom - I don't think that it worked...

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

This is the output of
sudo hdparm /dev/cdrom
because the other one failed

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Re-tested. The issue is still present in Dapper Final.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

In Edgy Knot 3:
$ hdparm /dev/cdrom

/dev/cdrom:
 IO_support = 0 (default 16-bit)
 unmaskirq = 0 (off)
 using_dma = 1 (on)
 keepsettings = 0 (off)
 readonly = 0 (off)
 readahead = 256 (on)
 HDIO_GETGEO failed: Inappropriate ioctl for device

$ sudo hdparm /dev/hda

/dev/hda:
 multcount = 0 (off)
 IO_support = 0 (default 16-bit)
 unmaskirq = 0 (off)
 using_dma = 1 (on)
 keepsettings = 0 (off)
 readonly = 0 (off)
 readahead = 256 (on)
 geometry = 16383/255/63, sectors = 117210240, start = 0

So it still doesn't seem optimised.

Revision history for this message
Launchpad Janitor (janitor) wrote : This bug is now reported against the 'linux' package

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this linux-source-2.6.15 kernel bug to the new "linux" package. We appreciate your patience and understanding as we make this transition. Also, if you would be interested in testing the upcoming Intrepid Ibex 8.10 release, it is available at http://www.ubuntu.com/testing . Please let us know your results. Thanks!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.