Opened 6 years ago

Closed 3 years ago

#10623 closed defect (moved_to_github)

hd-idle should use -a instead of -t to run as a daemon - it currently exits

Reported by: Todd Richmond <todd_richmond@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:


I finally spent time to figure out why hd-idle was not always shutting down my USB drive.

hd-idle is using -t disk which shuts down once and exits instead of -a which runs as a daemon and polls for the timeout perioud

Also, -a should be before -i since -i applies to the previous -a

Another option is to remove -a/-t completely since the default is all drives. This will also fix any system with multiple devices

At some point, hd-idle should have multiple config groups - 1 per disk, but that is a separate RFE

-a <name> Set (partial) device name of disks for subsequent idle-time parameters (-i). This parameter is optional in the sense that there's a default entry for all [SCSI] disks which are not named otherwise by using this parameter.
-i <idle_time> Idle time in seconds for the currently named disk(s) (-a <name>) or for all disks.
-l <logfile> Name of logfile (written only after a disk has spun up). Please note that this option might cause the disk which holds the logfile to spin up just because another disk had some activity. This option should not be used on systems with more than one disk except for tuning purposes. On single-disk systems, this option should not cause any additional spinups.
-t <disk> Spin-down the specified disk immediately and exit. Use only the disk name (e.g. sda) without /dev/ prefix
-d Debug mode. This will prevent hd-idle from becoming a daemon and print debugging info to stdout/stderr

Attachments (1)

hd-idle-init-10.03.1.tgz (1.3 KB) - added by primel1@… 6 years ago.
Workable config file and init script for hd-idle package Backfire 10.03.1

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by primel1@…

Workable config file and init script for hd-idle package Backfire 10.03.1

comment:1 Changed 6 years ago by primel1@…

Todd you are absolutely right

I attached my version (workable for me) in version for Backfire 10.03.1.

I had to clean the mess of config file and init script.
For example option for enabling debug which is of course running only from
non detached terminal IMHO not working from default init script.
So I removed it from config file.
Also -t option isn't used as daemon option, because hd-idle terminates immediately after.

I hope it helps someone maybe it'll be included in trunk.

And small notice for maintainer: please read the docs and ask other people on forum for feedback. The hd-idle package as is presented is in non usable state. The doc on wiki is of course also bad.
It's shame.

comment:2 Changed 6 years ago by primel1@…

I forgot to mention, that I added multiple config groups per disk as you asked.
Syntax is similar as in fstab config, you can use diskdev, disk label or uuid.
Without uuid, or label is useless configuring such daemon as hd-idle for disk attached via USB.

comment:3 Changed 6 years ago by Todd Richmond <todd_richmond@…>

Looks like Changeset 30722 fixed my problem.

It doesn't include prime1's extra, nice changes, but that should probably be entered as a separate bug so this one can be closed

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:5 Changed 3 years ago by notorand

The problem is still here as of BB 14.07 rc3.
What about a fix?

comment:6 Changed 3 years ago by jogo

  • Resolution set to moved_to_github
  • Status changed from new to closed

hd-idle is now maintained here:

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.