Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166166 - app-laptop/hdapsd has been broken since about 2.6.18 kernel
Summary: app-laptop/hdapsd has been broken since about 2.6.18 kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High critical with 7 votes (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 163867 164518 196047 209907 214202 216641 242138 252591 254314 263324 (view as bug list)
Depends on:
Blocks: 187154
  Show dependency tree
 
Reported: 2007-02-10 04:09 UTC by Ed Catmur
Modified: 2009-10-25 18:42 UTC (History)
25 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for hdapsd-20070524 (hdapsd-20070524.ebuild,2.58 KB, text/plain)
2007-06-03 12:02 UTC, Nik Raub
Details
ebuild for hdapsd-20070524 with new kernel patches for 2.6.20 to 2.6.22 (hdapsd-20070524-r1.ebuild,2.86 KB, text/plain)
2007-07-22 11:05 UTC, Nik Raub
Details
ebuild for hdapsd-20070524 with new kernel patches for 2.6.20 to 2.6.23 (hdapsd-20070524-r2.ebuild,2.98 KB, text/plain)
2007-10-27 23:29 UTC, Nik Raub
Details
Reduced power version, requires tp_smapi >=0.32 (hdapsd.c,19.68 KB, text/plain)
2008-03-22 01:07 UTC, Anton Bolshakov
Details
The new hdapsd (based on the reduced power version) (hdapsd-20081004.c.bz2,6.68 KB, text/plain)
2008-10-08 08:11 UTC, Martin Schanzenbach
Details
hdapsd-20081004.ebuild (hdapsd-20081004.ebuild,3.39 KB, text/plain)
2008-11-29 12:15 UTC, Thomas Pani
Details
updated init file, 2.6.27 support (hdapsd.init,1.29 KB, text/plain)
2008-12-16 14:07 UTC, Anton Bolshakov
Details
kernel_patched function fixed (hdapsd-20081004-r1.ebuild,3.04 KB, text/plain)
2008-12-16 14:12 UTC, Anton Bolshakov
Details
added ~amd64 (hdapsd-20081004-r2.ebuild,3.04 KB, text/plain)
2009-01-21 08:27 UTC, Victor Mataré
Details
Ebuild for hdapsd-20090129 (hdapsd-20090129.ebuild,1.47 KB, text/plain)
2009-01-30 22:53 UTC, Phillip Michael
Details
modified to install udev rule (hdapsd-20090129.ebuild,1.83 KB, text/plain)
2009-04-10 05:36 UTC, Hypnos
Details
udev rule (99-hdaps.rules,144 bytes, text/plain)
2009-04-10 05:37 UTC, Hypnos
Details
Version bump. Udev rules obsolete (hdapsd-20090401.ebuild,1.64 KB, text/plain)
2009-04-10 22:32 UTC, Anton Bolshakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2007-02-10 04:09:37 UTC
Current hdapsd 2.6.19 kernel patch applies to 2.6.20 but breaks build.

Patch to 2.6.20_rc6:

http://thread.gmane.org/gmane.linux.drivers.hdaps.devel/979
http://news.gmane.org/find-root.php?message_id=%3c30311145.481170171206673.JavaMail.root%40epia.dresco.co.uk%3e
http://cache.gmane.org//gmane/linux/drivers/hdaps/devel/979-001.bin

Testing.

I think uberlord is still handling this.
Comment 1 Ed Catmur 2007-02-10 12:45:32 UTC
Hm, doesn't work; the completion handling seems to have changed since _rc6.  We'll have to wait until someone fixes the patch for 2.6.20.
Comment 2 Robert A. 2007-05-08 22:01:54 UTC
fyi:
http://www.nabble.com/attachment/9047418/0/hdaps_protect-2.6.20.patch.bz2
works for me on sys-kernel/gentoo-source-2.6.20-r8
Comment 3 Anton Bolshakov 2007-05-21 20:49:20 UTC
the patch from comment #2 works with sys-kernel/suspend2-sources-2.6.21-r4 and my ATA disk too. It applies fine with some offsets (you might want to fix that too).
Please consider to include it to the portage.
Comment 4 Nik Raub 2007-06-03 12:02:36 UTC
Created attachment 121020 [details]
ebuild for hdapsd-20070524

There is also a new hdapsd on http://www.zen24593.zen.co.uk/hdaps/

I modified the old ebuild to use the new hdapsd-20070524 and the patch for 2.6.20, which are currently downloaded from the web.

Please note that this is the first time that I am messing with ebuilds, so there are no guarantees. It works on my system and that's all I can say.
Comment 5 Anton Bolshakov 2007-06-03 15:09:27 UTC
There is one more thing about hdapsd.
I tested it with 2.6.21 kernel and found out that the current daemon takes
  19.9% ( 49.8)            hdapsd : do_nanosleep (hrtimer_wakeup)
wakeups from idle based on the output from powertop tool.
I understand it has to be very fast to be able to park a harddisk, but the wake up time should be more reasonable, I think.
How about... 10 times per second instead of 50?
Comment 6 Timo Antweiler 2007-07-13 13:38:24 UTC
Will the ebuild for hdapsd-20070524 be uploaded into the portage tree for testing? 
Comment 7 Nik Raub 2007-07-22 11:05:48 UTC
Created attachment 125631 [details]
ebuild for hdapsd-20070524 with new kernel patches for 2.6.20 to 2.6.22

I found a new kernel patch on http://article.gmane.org/gmane.linux.drivers.hdaps.devel/993 which supposedly works on 2.6.20 to 2.6.22. I updated the hdapsd ebuild to use this patch and also included some cosmetic improvements to the ebuild. 

I don't like the way the ebuild currently dumps the patches into /usr/share/doc/hdapsd-20070524-r1/. It's a nasty hack. If someone can point out the proper way to do this (or another ebuild where I can learn by example) I'll be happy to fix it.

@Anton: I saw "Powertop Patches" for hdaps mentioned someplace, that might address your concerns about power consumtion. Haven't looked into it yet though.

Insert Standard Disclaimer here: ... have no clue what I am doing ... bla, bla ... works on my machine ... use at your own risk ...
Comment 8 Anton Bolshakov 2007-09-25 05:46:46 UTC
Some news:

http://www.thinkwiki.org/wiki/HDAPS#Userspace_daemon
http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1045
http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1040
hdapsd.c - Reduced power version - reduces timer interrupts, as measured by PowerTOP. This leads to lower power consumption on tickless kernels. Interrupt reduction requires the hdaps kernel module from tp_smapi 0.32 or newer, and a udev rule.

hdapsd has to be updated and a new udev script should be included too.

Tony, could you close all version bump HDAPS related bugs please?
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-10-16 14:35:47 UTC
*** Bug 196047 has been marked as a duplicate of this bug. ***
Comment 10 René 'Necoro' Neumann 2007-10-16 14:47:22 UTC
Ok -- from my other bug which was marked as duplicate:
New patches for 2.6.22 and 2.6.23: 
http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1077

The 2.6.22 patch works fine with my 2.6.22-suspend2-r2 kernel.
Comment 11 Nik Raub 2007-10-27 23:29:07 UTC
Created attachment 134514 [details]
ebuild for hdapsd-20070524 with new kernel patches for 2.6.20 to 2.6.23

Ok guys, heres an updated ebuild that includes the new kernel patches. It opreates the same was as before and is STILL a nasty hack. So once again, if someone could tell me how to do this properly or point me to a cleaner example i'd be much obliged.

The power patches are NOT included here. As Anton pointed out these patches rely on tp_smapi 0.32 or newer, but the newest version in the tree is 0.31, so i don't see much sense in including these patches currently. I would try to figure out how to put these patches into the ebuild as soon as one of you guys pulls a new tp_smapi ebuild together ...
Comment 12 Christian Banik 2008-01-23 17:39:42 UTC
I tried out the new r2 ebuild, but it fails to download the patches from gmane. Can anybody correct that?

Thanks and cheers,
buschaot
Comment 13 Sven Wehner 2008-02-01 14:26:11 UTC
Have a look at: http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1077
That's the thread that the patch is appended to. You have to mark the interesting part (there is a patch for 2.6.22 and 2.6.23), and paste it to a text file...
Comment 14 Terry L. Triplett 2008-02-11 16:40:26 UTC
The gentoo-sources 2.6.23-r8 update to fix the vmsplice security issues motivated me to update from my own custom kernel.  In the process I had to apply the hdaps protect patch so I went to ThinkWiki to see what was available, since the current ebuild doesn't have patches for 2.6.23.  

Thinkwiki pointed me to the following patches, which apply cleanly against gentoo-sources-2.6.23-r8, build correctly and seem to work fine (3 hours with no issues).  There are 2 patches of interest - a disk-protect patch for 2.6.23 and a patch for 2.6.20 or greater that corrects a deadlock in the disk-protect patch.  I  don't have an ebuild handy since I applied these by hand, but I include the links here to the email threads and patch file downloads.

Since many people probably want/should want to update gentoo-sources to fix the vmsplice issues, I suggest this might be a good time to get the hdaps patches up-to-date for thinkpad users.

Disk protect patch
-------------------

Thread URL: http://sourceforge.net/mailarchive/message.php?msg_name=87fxz3g2b2.fsf%40denkblock.local

Patch URL: http://sourceforge.net/mailarchive/attachment.php?list_name=hdaps-devel&message_id=87pry7ehx3.fsf%40denkblock.local&counter=2

Deadlock patch
--------------

Thread URL: http://sourceforge.net/mailarchive/message.php?msg_name=fj316o%24e7q%241%40ger.gmane.org

Patch URL: http://sourceforge.net/mailarchive/attachment.php?list_name=hdaps-devel&message_id=fj316o%24e7q%241%40ger.gmane.org&counter=1
Comment 15 Peter Weller (RETIRED) gentoo-dev 2008-02-18 21:23:25 UTC
The kernel team are currently unwilling to add the HDAPS patches to the main gentoo-sources kernel - see bug #141565

I'm semi-maintaining some patched versions of the kernel in my overlay (layman -a welp - make sure you have git stuff), but that needs to be updated. Watch out for a .24 kernel coming soon (hopefully!)
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2008-03-22 00:56:16 UTC
*** Bug 209907 has been marked as a duplicate of this bug. ***
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2008-03-22 00:57:42 UTC
*** Bug 214202 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2008-03-22 01:05:24 UTC
*** Bug 163867 has been marked as a duplicate of this bug. ***
Comment 19 Anton Bolshakov 2008-03-22 01:07:46 UTC
Created attachment 146829 [details]
Reduced power version, requires tp_smapi  >=0.32

Sorry for the dup.  Jakub wants all issues together, so here we go.
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2008-03-22 01:08:12 UTC
This thing would be best removed altogether; completely useless as it is.
Comment 21 Robert A. 2008-03-22 01:45:38 UTC
(In reply to comment #20)
> This thing would be best removed altogether; completely useless as it is.

It works here (although not with the kernel patch provided by the ebuild) - so at least its not useless for me.
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2008-03-22 07:11:05 UTC
(In reply to comment #21)
> It works here (although not with the kernel patch provided by the ebuild) - so
> at least its not useless for me.

I've been talking about the ebuild... ;) While the in-kernel stuff might be POS according to bug #141565 Comment #26, it can hardly be more of a POS than this thing that fails to work with any supported Gentoo kernel and has been failing for over a year, with these random kernel patches causing more harm than good apparently, such as the issue in Bug 163867.

Why exactly can't this stuff be pushed into vanilla kernel if the in-kernel stuff sucks that much?
Comment 23 Terry L. Triplett 2008-03-22 15:59:57 UTC
> Why exactly can't this stuff be pushed into vanilla kernel if the 
> in-kernel stuff sucks that much?

Because the blk_freeze patches that are required to make hdaps really work are of a highly experimental nature, based on my reading of the mailing lists from whence they come (see comment 14).  Since they only benefit a small subset of users with specific hardware and touch crucial parts of the disk i/o subsystem, pushing them into the vanilla kernel by default seems imprudent.  It sucks to require a kernel patch and rebuild to get hdaps working fully, but it's not that onerous.

My recommendation would be to disable CONFIG_SENSORS_HDAPS by default in the vanilla sources since the in-kernel module is useless except as a novelty (maybe even patch it out so it isn't there to tempt people) and refer people to the tp_smapi package if they want disk parking.

IMHO the blk_freeze patches supplied by this ebuild belong in the tp_smapi ebuild, since that package actually supplies the supplemental hdaps kernel module. Right now the module built by tp_smapi can't actually work fully until the blk_freeze patches are applied by this package.  That seems broken to me, or at least confusing.  The outcome of a tp_smapi install with hdaps enabled should be a fully working module with the appropriate kernel support.  This package should just supply the daemon to make it work if the user chooses.

This all sucks royally, of course.  In the long run I'd like to see all the hardware support be part of the official kernel where it belongs.  Not sure why things are the way they are now.
Comment 24 Anton Bolshakov 2008-06-17 03:22:32 UTC
I have fixed bug #196052, bug #166166, bug #164518 and uploaded hdapsd ebuild + tp_smapi ebuild (bug #219285, #215967 fixed) to my sectools overlay:
http://gentoo.o0o.nu/sectools.xml
http://gentoo.o0o.nu/portage/app-laptop/hdapsd/
Let me know if any problem with it.

P.S. to comment #23: I disagree, blk_freeze should stay together hdapsd daemon.
Comment 25 Terry L. Triplett 2008-06-24 01:48:32 UTC
> P.S. to comment #23: I disagree, blk_freeze should stay together hdapsd daemon.

Care to explain your reasoning?  hdapsd is a *userspace* daemon that monitors the state of the accelerometer and initiates protection by communicating with the hdaps module via the hdaps_protect sysfs interface.  It doesn't implement the protection - that's the job of the hdaps *kernel* module which requires the blk_freeze patch to the *kernel* to work properly.  That patch logically belongs in the package that actually supplies the hdaps kernel module.  That way, any other tool that wants to manage disk protection (eg. an alternative hdaps daemon with a better algorithm, or a custom user created tool) won't have to contend with a broken hdaps kernel module.  The module should have the potential to function fully and properly regardless of which specific userspace daemon happens to be initiating disk protection.
Comment 26 Anton Bolshakov 2008-06-24 03:31:32 UTC
> Care to explain your reasoning?
Sorry, I was busy with the overlay.
Well, first of all, our conversation is a bit pointless, because the patch soon or later should go to the kernel.
While your reasons sounds logical and make 100% sence, my thoughts are that tp_smapi does not provide hdaps functionality only. Also, all functions of tp_smapi are more for monitoring purpose; user might not use hdaps freeze function at all and might not expect that it would patch system-level critical files and add an additional functionality to the kernel.
Another point is that if we would use a kernel-space monitoring patch instead  it would be logical to keep them together.

Anyway, for now, everything is wrong: tp_smapi together with blk_freeze patches should be in the kernel, hdapsd should have it's own homepage and a maintainer. 
Comment 27 Terry L. Triplett 2008-06-24 15:55:36 UTC
(In reply to comment #26)

Agree on all counts.  Except I still think hdaps kernel patches belong with the kernel module.  *wink*

> Anyway, for now, everything is wrong: tp_smapi together with 
> blk_freeze patches should be in the kernel

Seems to be happening gradually, which is hopeful.  The deadlock patch mentioned in #14 I normally apply to my own kernels wasn't necessary in 2.6.26 any longer since the kernel code had the fix already.  I guess the right thing to do instead of yakking about it here is to help Elias Oltmanns and others in their efforts to get this into the mainstream kernel.  (/me prepares to follow my own advice)

Some relevant links:

http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2008-May/043658.html
http://lkml.org/lkml/2008/2/25/478

Peace.
Comment 28 Mark Loeser (RETIRED) gentoo-dev 2008-09-01 18:42:55 UTC
*** Bug 216641 has been marked as a duplicate of this bug. ***
Comment 29 Martin Schanzenbach 2008-10-08 08:10:26 UTC
A new hdapsd has been released by Elias. See here: http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1372

It's required for the 2.6.27 kernel release candidate patches AND is backwards compatible. So maybe when 2.6.28 becomes testing the hdapsd package can be "fixed" to use this version and require a kernel >=2.6.28.


Cheers
Comment 30 Martin Schanzenbach 2008-10-08 08:11:36 UTC
Created attachment 167586 [details]
The new hdapsd (based on the reduced power version)
Comment 31 Anton Bolshakov 2008-10-08 08:41:12 UTC
Thank you Martin for the good news.
Just to add, the new version of patch will be in 2.6.28, and backported for 2.6.27 can be find here:
http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1379
http://cache.gmane.org//gmane/linux/drivers/hdaps/devel/1379-001.bin

Comment 32 Thomas Pani 2008-11-29 12:15:03 UTC
Created attachment 173738 [details]
hdapsd-20081004.ebuild

Here's an ebuild for hdapsd-20081004 together with the kernel patches for 2.6.26 and .27 (I left out all the older ones).
It creates the necessary udev rule, adds -y in conf.d if tp_smapi isn't used (no warnings), and checks for already patched kernel in block/blk-sysfs.c

It's EAPI="2" ('cause I use SRC_URI arrows for fetching the stuff from gmane), so you'll need to use >=portage-2.2_rc11.
Comment 33 Anton Bolshakov 2008-11-29 14:41:05 UTC
(In reply to comment #32)

Thomas,
I didn't mention, but sectools overlay's users should be using it already.
The url is still the same:
http://gentoo.o0o.nu/portage/app-laptop/hdapsd/

I'm not sure how it's different from yours. It's still EAPI=1. Works well for me so far.
Comment 34 Anton Bolshakov 2008-12-16 14:07:56 UTC
Created attachment 175470 [details]
updated init file, 2.6.27 support

the new location for 2.6.27 kernel is:
/sys/block/${DISK}/device/unload_heads
Comment 35 Anton Bolshakov 2008-12-16 14:12:41 UTC
Created attachment 175473 [details]
kernel_patched function fixed

an updated ebuild from my sectools overlay.
We are using the following line for kernel_patched() check:
"ata_id_has_unload" "${KERNEL_DIR}"/include/linux/ata.h

Recent patches from the mailing list are also in the the same overlay
Comment 36 Thomas Pani 2008-12-16 14:47:13 UTC
(In reply to comment #33)
> I didn't mention, but sectools overlay's users should be using it already.
Uh, I wasn't aware of that.
> I'm not sure how it's different from yours. It's still EAPI=1. Works well for
> me so far.
Well, I've outlined my changes in #32. Main difference is the adding of the udev rule to support the new polling method. EAPI=2 is only used for fetching hdapsd source and kernel patches from gmane archives (instead of supllying them in ${FILESDIR}.
Comment 37 Anton Bolshakov 2008-12-16 15:14:52 UTC
Thomas,

I believe udev rule belongs to tp_smapi package (see manual) and the bug report #215967 has to be fixed. It'll be only installed if "hdaps" use flag is enabled in tp_smapi ebuild:

http://gentoo.o0o.nu/portage/app-laptop/tp_smapi/tp_smapi-0.39-r1.ebuild
Comment 38 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 13:11:21 UTC
*** Bug 252591 has been marked as a duplicate of this bug. ***
Comment 39 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 13:12:01 UTC
*** Bug 242138 has been marked as a duplicate of this bug. ***
Comment 40 Victor Mataré 2009-01-21 08:27:28 UTC
Created attachment 179153 [details]
added ~amd64

This thing runs fine on amd64, so I took the liberty of adding the keyword.
Comment 41 Phillip Michael 2009-01-30 22:53:49 UTC
Created attachment 180324 [details]
Ebuild for hdapsd-20090129

Here is an ebuild for hdapsd-20090129. This release adds support for multiple disks using multiple -d options, but the init script only supports one disk.
Comment 42 Phillip Michael 2009-01-30 23:41:50 UTC
(In reply to comment #41)
> Ebuild for hdapsd-20090129
Also, the udev rule is now included upstream. The ebuild I posted should install it.
Comment 43 Michael Orlitzky gentoo-dev 2009-02-10 07:33:42 UTC
I created an HDAPS overlay:

(clone)  http://michael.orlitzky.com/git/hdaps-overlay.git
(gitweb) http://michael.orlitzky.com/git/?p=hdaps-overlay.git;a=summary

to make my life easier. I'll try to keep the hdapsd ebuild updated with whatever's available. I wrote the one in there now (20090129), but if somebody else posts a better one, I'll include it with his or her permission.

There's an xfce4-hdaps panel plugin in there too, if anyone's using XFCE.
Comment 44 Jakub Sokołowski 2009-02-17 10:57:43 UTC
I managed to install ebuild for hdapsd-20090129(except for the part where here it doesn't have hdpasd.conf and hdapsd.init, used the ones from older version) and I'm running kernel 2.6.28.5, hdapsd managed to start but It's not working. I don't have the /sys/block/xda/queue/protect file and /sys/block/xda/device/unload_heads refuses any operations. Can't read or write to it. hdapsd can't either. I'm wondering if it's a problem with the kernel or just with my hard drive.
Comment 45 Anton Bolshakov 2009-02-17 12:31:07 UTC
I had the same problem with one of laptops and I fixed it by RTFM :)

/usr/src/linux/Documentation/laptops/disk-shock-protection.txt:
If you know that your device really does
support the unload feature (for instance, because the vendor of your
laptop or the hard drive itself told you so), then you can tell the
kernel to enable the usage of this feature for that drive by writing
the special value -1 to the unload_heads attribute:

# echo -1 > /sys/block/sda/device/unload_heads

will enable the feature for /dev/sda, and giving -2 instead of -1 will
disable it again.
Comment 46 Benjamin Schulz 2009-02-23 06:50:34 UTC
With kernel 2.6.28. I had a problem with  a wrong error message that comes from /etc/init.d/hdapsd

There, I could find the lines:

    if [[ ! -e /sys/block/${DISK}/queue/protect ]] ; then
   	eerror "No protect entry for ${DISK}!"
   	eerror "Make sure your kernel is patched with the blk_freeze patch"
   	return 1
    fi

Obviously, Kernel 2.6.28 doesn't neet that check.

So I just commented out those lines. This can be done, by adding a # before every line.

Maybe, one also want to write
echo -1 > /sys/block/sda/device/unload_heads

instead of these lines, to force the disk to enable unloading. 

Then everything works.
Comment 47 Thomas Pani 2009-02-24 14:29:54 UTC
(In reply to comment #46)
> With kernel 2.6.28. I had a problem with  a wrong error message that comes from
> /etc/init.d/hdapsd
Anton's ebuild from sectools overlay has a correct check for that:
http://gentoo.o0o.nu/portage/app-laptop/hdapsd/hdapsd-20090129.ebuild
Comment 48 Hypnos 2009-04-10 05:36:26 UTC
Created attachment 187844 [details]
modified to install udev rule
Comment 49 Hypnos 2009-04-10 05:37:33 UTC
Created attachment 187845 [details]
udev rule
Comment 50 Hypnos 2009-04-10 05:39:50 UTC
With the ebuild and udev rules I just attached, plus the conf and init files from Anton's overlay, hdapsd works well on my T61 with tp_smapi-0.40 and tuxonice-sources 2.6.29.
Comment 51 Anton Bolshakov 2009-04-10 22:32:44 UTC
Created attachment 187928 [details]
Version bump. Udev rules obsolete

http://gentoo.o0o.nu/portage/app-laptop/hdapsd/
Comment 52 Jan Schubert 2009-04-11 10:16:58 UTC
*** Bug 263324 has been marked as a duplicate of this bug. ***
Comment 53 Hypnos 2009-04-11 14:14:59 UTC
Comment on attachment 187845 [details]
udev rule

Anton, thank you -- your new ebuild works well for me.
Comment 54 menaheme 2009-05-24 22:49:49 UTC
(In reply to comment #53
> (From update of attachment 187845 [details] [edit])

Thanks for the update, works for me T61 kernel 2.6.27-r8, tp_smapi-0.40 , no kernel hsaps module. (needed to use -force_io though, since i didnt update the BIOS.)
Comment 55 Anton Bolshakov 2009-05-30 01:38:12 UTC
Guys, please vote for this bug.
kernel 2.6.29 is getting stable, hdapsd got its own homepage page and all other problems seems to be solved too. I don't see any reason why it's not in the portage yet.
Comment 56 Martin Gebert 2009-05-31 21:00:32 UTC
Here's my vote. I'm just trying to migrate to TuxOnIce-2.6.28 and this issue is getting a pain in the posterior :-(
Comment 57 Anton Bolshakov 2009-05-31 22:56:47 UTC
By "vote" I mean to use new and a bit hidden feature of gentoo's bugzilla: "vote for this bug" link
https://bugs.gentoo.org/votes.cgi?action=show_user&bug_id=166166#vote_166166
We've got 23 guys in CC list and only 5 voted.
You can set up to 10 points. Thanks.

Peter, may be you could also update us on the status please?
Comment 58 Andreas Thalhammer 2009-06-01 07:56:53 UTC
I didn't know about this vote system. But fancy it is! And hidden too!

So, I used this hdapsd-20090401 ebuild, kernel 2.6.30-rc7-git4 and tp_smapi 0.40. Works like it should on my ThinkPad R51 1830-DG4.
Comment 59 Martin Gebert 2009-06-01 19:26:35 UTC
OK, I voted :-) And here's my experience so far:
- Current hdapsd-20090401 (seems to) work(s) for me on a ThinkPad T43 with kernel tuxonice-sources-2.6.28-r10 and tp_smapi-0.40 (HD light shows activity on shaking the laptop; what other possibilities to check parking state?).
- I had to add "echo -1 > /sys/block/${DISK}/device/unload_heads" to /etc/init.d/hdapsd as mentioned in comment #46.
- Neither khdapsmonitor nor khdapsmon from portage seem to recognize the current hdapsd interface and report no drive protected.
Comment 60 Anton Bolshakov 2009-06-02 00:51:29 UTC
(In reply to comment #59)

RTFM and use search :-):

cat /sys/block/${DISK}/device/unload_heads
bug #254322

ps. I think it make sense to stop supporting the old path "/queue/protect" in future. It brings more confusion then functionality.
Comment 61 Michael Weber (RETIRED) gentoo-dev 2009-06-02 06:18:08 UTC
(In reply to comment #59)
> (HD light shows activity
> on shaking the laptop; what other possibilities to check parking state?).
> - I had to add "echo -1 > /sys/block/${DISK}/device/unload_heads" to
> /etc/init.d/hdapsd as mentioned in comment #46.
> - Neither khdapsmonitor nor khdapsmon from portage seem to recognize the
> current hdapsd interface and report no drive protected.

maybe you want to try the gnome-hdaps-applet from http://www.zen24593.zen.co.uk/hdaps/ (is in my overlay http://svn.xmw.de/gentoo-overlay/gnome-extra/hdaps-applet/ ).
Comment 62 Martin Gebert 2009-06-02 18:31:48 UTC
Thanks Anton for pointing to the patch. I was able to integrate the ebuild and patch into my local overlay, khdapsmonitor is working now. When current hdapsd support is finally updated in portage this will also have to be included...
Good work!
Comment 63 PetaMem R&D 2009-09-29 10:07:30 UTC
How about a version bump? Eix (sync as of 2009-09-28) keeps telling me theres a version from 2006

* app-laptop/hdapsd
     Available versions:  ~*20060409 ~*20060409-r1 ~*20060409-r3
     Homepage:            http://hdaps.sourceforge.net/
     Description:         IBM ThinkPad Harddrive Active Protection disk head parking daemon

While there are recent versions from 2009

http://sourceforge.net/projects/hdaps/files/hdapsd/

Comment 64 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-14 21:04:28 UTC
welp retired or something - assigning to maintainer.

mobile: any input? i'm tempted to commit this...
Comment 65 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-14 21:42:34 UTC
*** Bug 254314 has been marked as a duplicate of this bug. ***
Comment 66 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-14 21:48:17 UTC
*** Bug 164518 has been marked as a duplicate of this bug. ***
Comment 67 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-14 22:03:39 UTC
+*hdapsd-20090401 (14 Oct 2009)
+
+  14 Oct 2009; Thilo Bangert <bangert@gentoo.org> +hdapsd-20090401.ebuild,
+  files/hdapsd.init:
+  version bump from bug #166166
+

please test.
Comment 68 Hypnos 2009-10-16 05:20:10 UTC
Seems to work fine here.  I observe /sys/block/sda/device/unload_heads, and the number goes non-zero when I jerk the laptop.

Thanks!
Comment 69 Stefan Hübner 2009-10-16 06:00:56 UTC
If this is just the same as the ebuild in the sectools overlay, then it works well - or are there any changes compared to the sectools-version and I'd really have to try it out?
Comment 70 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-16 07:14:52 UTC
yes - there are minor edits, but it shouldnt be anything big.
Comment 71 Michael Orlitzky gentoo-dev 2009-10-16 19:39:52 UTC
I've been running the ebuild from an overlay for months now on my X61s. No problems to report. The new ebuild from portage works fine, too.
Comment 72 Anton Bolshakov 2009-10-16 21:14:58 UTC
Guys, all hdaps related ebuilds are in the portage now and I've removed them from sectools overlay. Thank you for using it.
I didn't use my usual -r100.ebuild so you need to run "emerge -1 hdapsd" to start using version from the portage.

This 3 years bug is fixed, please close it :)
Comment 73 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-17 06:42:30 UTC
anton: thanks for your work over the years. and thanks for the feedback.

closing. please open new issues whenever you find something. remember to move your votes.
thanks
kind regards
Thilo
Comment 74 Stefan Hübner 2009-10-17 08:03:11 UTC
Same here - no problems since yesterday, and sectools-version was running stable for about a month (before that I had used a version from jokey's overlay-which I also considered stable).

So I'd vote for stable on amd64 (Thinkpad X61Tablet, Hitachi 500GB SATA 9mm version)
Comment 75 Mark 2009-10-25 16:30:17 UTC
the initscript for version 20090401 has a bug which prevents the start of hdapsd:
look at checkconfig()
if [ ! -f /dev/${DISK} ]
doesn't work, you must use -b instead of -f, because the hard disk file is not a regular file but a block device.
Comment 76 Hypnos 2009-10-25 18:25:02 UTC
(In reply to comment #75)

Did you remember to update the init script with dispatch-conf or cfg-update?  The init script in the Portage files dir for hdapsd has no such line -- it relies on the config file /etc/conf.d/hdapsd.

With this initscript, hdapsd functions is able to start on my machine.
Comment 77 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-25 18:42:07 UTC
no - mark is right. the check was added without a version bump, so you might not have it. i changed -f to -b as suggested. thanks for the report - sorry for the oversight.

for new issues please open new and separate bug reports.

thanks