My main computer runs up-to-date Gentoo with one SSD and two HDD. I use to spin down my HDD after a period of inactivity of 10 minutes (600 s). The hd-idle OpenRC service is enabled at boot and starts without errors. Once hd-idle configured and started, the HDDs spin down and wake up if I access them. However, if I suspend my computer to RAM, making sure both HDD are not spun down, and wake up my computer, the HDDs will not spin down even though they have been idle for 10 minutes or more. This happens with the Gentoo hd-idle package (Christian Mueller's 1.05 version). Another hd-idle app exists, which is basically a reimplementation of the original hd-idle. It's available at GitHub: github.com/adelolmo/hd-idle With the GitHub hd-idle (different from the Gentoo hd-idle app), disks spin down properly, no matter what. That version is the one packed in Alpine Linux, which I tried and can confirm it works perfectly. Reproducible: Always Steps to Reproduce: Steps to reproduce the bug in the Gentoo hd-idle app : 1. Emerge hd-idle, configure it, enable and start the hd-idle OpenRC service 2. Reboot your computer 3. While the HDDs are still spinning, suspend your computer to RAM 4. Resume from suspend and wait until the HDDs are supposed to spin down again (as per the hd-idle config) Actual Results: The HDDs do not spin down as expected. Expected Results: hd-idle should have spun down the HDDs according to the configuration file. It is interesting to note that the HDDs will spin down if you restart the hd-idle service after resuming from RAM. This is not quite handy, though. I think it would be nice to be able to emerge the hd-idle app available at GitHub. It is the one packaged in Alpine Linux and is much more recent and maintained than the original app from 2014. The new implementation by Adel Olmo is available here: github.com/adelolmo/hd-idle Should you need any other information, please get in touch! Thanks for reading.
For information, this is my current hd-idle config file /etc/conf.d/hd-idle. I use it for both the Gentoo hd-idle app and the GitHub reimplemented app: ### /etc/conf.d/hd-idle HD_IDLE_OPTS="-i 0 -a sdb -i 600 -a sdc -i 600 -l /var/log/hd-idle.log" ### And the hd-idle OpenRC service file /etc/init.d/hd-idle: ### /etc/init.d/hd-idle description="Utility for spinning down hard disks after a period of idle time" command="/usr/sbin/hd-idle" command_args="${HD_IDLE_OPTS}" depend() { after bootmisc } ###
Dear Christophe, thanks for your report! Since it is written as a bug report against the current "Christina Mueller" version (or short "cjmueller" version as listed on Repology) we have in Gentoo, it was assigned to me (while likely, you rather / also wanted to create a new package request). The cjmueller version which is packaged in Gentoo works based on the design principles that: - Nothing apart from hd-idle spins up / down disks... - ... unless there is read / write activity (via /proc/diskstats ). Entering standby and waking back up does not produce r/w activity, so if this wakes disks on your hardware, the cjmueller version will not catch it. There are two upstream bug reports about this: - https://sourceforge.net/p/hd-idle/bugs/1/ This one recommends to use hdparm for internal disks instead of hd-idle, since the author says that her hd-idle version was made with focus on USB-attached disks. - https://sourceforge.net/p/hd-idle/bugs/3/ This one is not resolved yet and explicitly focuses on the standby issue. So for the currently packaged cjmueller version, I'll have to close this as UPSTREAM issue — rewriting the base functionality / changing the design concept of the application is out of scope downstream. You can however open a new issue with a subject such as: "sys-apps/hd-idle-adelolmo: new package request" asking for the unrelated (but similarly named) adelolmo package to be packaged.