hdaps_protect patch to enable disk head parking on thinkpads

Bug #139881 reported by VS
116
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned
Declined for Feisty by Henrik Nilsen Omma
Declined for Gutsy by Henrik Nilsen Omma
Declined for Hardy by Ben Collins
hdapsd (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Feisty by Henrik Nilsen Omma
Declined for Gutsy by Henrik Nilsen Omma
Declined for Hardy by Ben Collins
linux (Ubuntu)
Won't Fix
Wishlist
Unassigned
Declined for Feisty by Henrik Nilsen Omma
Declined for Gutsy by Henrik Nilsen Omma
Declined for Hardy by Ben Collins
linux-source-2.6.22 (Ubuntu)
Won't Fix
Wishlist
Unassigned
Declined for Feisty by Henrik Nilsen Omma
Declined for Gutsy by Henrik Nilsen Omma
Declined for Hardy by Ben Collins

Bug Description

Binary package hint: linux-image-2.6.22-11-generic

The kernel has the hdaps module, but it does not support parking the disk heads when a shock is detected.
Here's a patch for 2.6.22: http://article.gmane.org/gmane.linux.drivers.hdaps.devel/993
Patches for 2.6.22.9 and 2.6.23: http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1077

Without this patch, the hdapsd package is completely useless.

Revision history for this message
VS (storvann) wrote :

I forgot to mention that the tools to utilise this patch are already in the apt repositories (packages hdapsd, hdaps-utils), so it would only make sense to include this patch.

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

Thank you for your report and helping to make Ubuntu better. The patch you reference doesn't seem to be against, 2.6.22 but against 2.6.20. I believe you meant to reference this?:

http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1077

However, that patch isn't even in the mainline kernel yet either. This puts a strain on the ubuntu kernel team having to maintain a separate out of tree patch. However, I'll leave this decision to them. For now, I'll tag this as 'hardy-kernel-candidate' so that we retarget this report against the upcoming Hardy kenrel release. However, against linux-source-2.6.20 this bug does not meet the criteria for a stable release update and is being marked as Won't Fix. You can learn more about the stable release update process at https://wiki.ubuntu.com/StableReleaseUpdates . Thanks!

Changed in linux-source-2.6.22:
importance: Undecided → Wishlist
status: New → Won't Fix
Revision history for this message
VS (storvann) wrote :

The patch applies cleanly (and works) on 2.6.22.

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Leann, thanks for taging for hardy.
As fo gutsy, this bug wasn't meant for update. It was filled *before* release, and IIRC -- before Kernel Freeze.

Revision history for this message
VS (storvann) wrote :

Here are updated patches for 2.6.22.9 and 2.6.23-rc9
http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1077

VS (storvann)
description: updated
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

zdzichu: "As fo gutsy, this bug wasn't meant for update. It was filled *before* release, and IIRC -- before Kernel Freeze."

Indeed, thanks. Declining Gutsy nomination.

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

I've opened a new task against the actively developed kernel which is currently the Hardy Heron kernel. However, please remember as I noted before that it is a lot of extra work for the Ubuntu kernel team to maintain out of tree patches. As such they usually require evidence of upstream submission before considering to maintain community patches locally. Thanks.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Ben Collins (ben-collins) wrote :

This is a huge invasive patch that touches core block layer, core scsi, core libata and core ide subsystems. That's way too scary for us to consider maintaining ourselves. The fact that the patch has been floating around through several kernel releases also concerns me (why isn't it upstream?).

Declining on this basis. I suggest working to get this patch upstream.

Changed in linux:
status: Triaged → Won't Fix
Revision history for this message
Evgeni Golov (evgeni) wrote :

not a bug in hdapsd, needs support in the kernel

Changed in hdapsd:
status: New → Invalid
Revision history for this message
Noel J. Bergman (noeljb) wrote :

Ben Collins wrote:
> This is a huge invasive patch that touches core block layer, core scsi, core libata and core ide subsystems.
> That's way too scary for us to consider maintaining ourselves.

 Evgeni Golov (the package maintainer) wrote:
> not a bug in hdapsd, needs support in the kernel

That's fine, but until the situation changes, with either the kernel providing support or hdapsd no longer needing it, please consider either removing the hdapsd package from Ubuntu, or otherwise modify it to make it clear to unsuspecting users that the package is only usable by people maintaining their own kernels. At the moment, the presence of hdapsd seems at best misleading, as the code is useless without kernel support, as indicated by the package maintainer.

A simple patch would be:

--- /etc/init.d/hdapsd 2008-01-20 22:50:24.000000000 -0500
+++ hdapsd 2008-01-21 00:46:16.000000000 -0500
@@ -50,7 +50,7 @@
 do_checkprotect()
 {
  if [ ! -f /sys/block/$DISK/queue/protect ]; then
- log_warning_msg "Not starting $NAME: /sys/block/$DISK/queue/protect does not exist"
+ log_warning_msg "Not starting $NAME: /sys/block/$DISK/queue/protect does not exist. hdapsd requires a kernel patch. See http://thinkwiki.org/wiki/HDAPS#Disk_head_parking."
   exit 0
  fi
 }

and add the same disclaimer to the package description.

Revision history for this message
Evgeni Golov (evgeni) wrote :

Well, exactly this hint is written in /usr/share/doc/hdapsd/README.Deabian, which should be the first place to read if some app does not work out of the box, but I could add a hint to that file on startup though.

About removal: Uh, I didn't upload the package to Ubuntu, I don't know anything about removal from it either - can you give me a pointer here?

Revision history for this message
Noel J. Bergman (noeljb) wrote :

> this hint is written in /usr/share/doc/hdapsd/README.Deabian, which should
> be the first place to read if some app does not work out of the box

Ubuntu is trying to deliver linux to a larger population of users. A typical problem throughout the Open Source world is recognizing and coping with a transition from a small population of computer-skilled participants able to dig for information to a larger unskilled population that expects everything to just work. No one outside of the cognoscenti is going to go digging under /usr/share/doc, unless explicitly told to look there. Nor should most users look there, given the nature of the material generally present (changelogs, TODO files, copyright notices). At best, we'll train users to read man pages.

In any event, don't worry about removing the package. If you "add a hint to that file on startup", and to the package description, that should indicate to most users that the feature won't be present, and point the rare few (a tiny fraction of a percent) who can handle the patch to what they have to do. And we can hope that someday either the kernel support will be mainline, or the daemon won't need it.

Revision history for this message
Evgeni Golov (evgeni) wrote : Re: [Bug 139881] Re: hdaps_protect patch to enable disk head parking on thinkpads

On Wed, 23 Jan 2008 18:12:16 -0000 Noel J. Bergman wrote:

> Ubuntu is trying to deliver linux to a larger population of users. A
> typical problem throughout the Open Source world is recognizing and
> coping with a transition from a small population of computer-skilled
> participants able to dig for information to a larger unskilled
> population that expects everything to just work. No one outside of the
> cognoscenti is going to go digging under /usr/share/doc, unless
> explicitly told to look there.

Hum, should we remove /u/s/doc then ;)

> Nor should most users look there, given
> the nature of the material generally present (changelogs, TODO files,
> copyright notices). At best, we'll train users to read man pages.
>
> In any event, don't worry about removing the package. If you "add a
> hint to that file on startup", and to the package description, that
> should indicate to most users that the feature won't be present, and
> point the rare few (a tiny fraction of a percent) who can handle the
> patch to what they have to do. And we can hope that someday either the
> kernel support will be mainline, or the daemon won't need it.

I think adding a hint to the init script only should be enough.
IMHO hdaps is something "advanced" even when the kernel would have the
UNLOAD support, as the vanilla kernel has many problems with newer
hdaps chips (this is solved by tp-smapi (not in Ubuntu)) and thus hdapsd
might not work correctly sometimes.

However, I'm trying to get multidisk support for hdapsd and will then
upload a version with a louder "RTFM ;-)" in the init script.

Regards
Evgeni

Revision history for this message
Mateusz Kaduk (mateusz) wrote :

Can You provide hdaps_protect patch that applys on Ubuntu kernel ?
Hardy kernel is at
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-hardy.git ubuntu-hardy

Revision history for this message
Dennis Heinson (dheinson) wrote :

Could you forward this upstream? It would be great to have, it saved all my data on my Thinkpad before when I dropped it. Also, more and more Laptops have similar technology. While I do not know whether e.g. the Apple system works the same, it might be easy to implement.

Revision history for this message
DaveAbrahams (boostpro) wrote :

According to http://www.thinkwiki.org/wiki/HDAPS#Kernel_patch, the current kernel will hang with the best-currently-known hdaps patch. But, also, someone seems to be working on getting hdaps into the mainline kernel. When that happens, Ubuntu will have it.

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

Removing linux-source-2.6.24 task since beginning with Hardy, kernel bugs should be reported against the "linux" package which this already has. Thanks.

Changed in linux-source-2.6.24:
status: New → Invalid
Revision history for this message
Muelli (ubuntu-bugs-auftrags-killer) wrote :

Bug 204662 has been marked as a dup of this one. The issue, however, still persists on my x61s with 2.6.27-7. I can't "modprobe hdaps" with the following error:
[ 238.593306] hdaps: inverting axis readings.
[ 238.593322] hdaps: LENOVO ThinkPad X61s detected.
[ 238.593331] hdaps: driver init failed (ret=-6)!

Revision history for this message
Shem Multinymous (multinymous) wrote :

Muelli: vanilla hdaps is broken. Use hdaps_ec from the tp_smapi package instead (see http://www.thinkwiki.org/wiki/tp_smapi).

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

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.