hdparm's -B parameter is documented as:

Get/set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better per‐ formance. Possible settings range from values 1 through 127 (which permit spin-down), and values 128 through 254 (which do not permit spin-down). The highest degree of power management is attained with a setting of 1, and the highest I/O performance with a setting of 254. A value of 255 tells hdparm to disable Advanced Power Management altogether on the drive (not all drives support disabling it, but most do).

This only gives two possible intervals, but doesn't describe what other effect different values have. What's the difference between let's say 63 and 127, etc. I couldn't find any more documentation about this. Is it described somewhere?

  • 1
    Some rough test results from a 4TB WD Elements Portable. As noted by SilverbackNet's answer, don't expect other devices to behave like this. Default=128. 127=30 min to standby, slow flashing LED. 126=same as 127. 124=10 min to standby, slow flashing LED. 63=~10 sec to motor spindown, solid LED. 12=~4 sec to spindown, solid LED. 1=immediate spindown, solid LED (I wasn't sitting next to drive to know how immediate -- like I said, rough test results). Haven't seen any info on what a solid LED after motor spindown might mean--spinup time seemed same as regular standby but didn't really test that. – juanitogan Mar 23 '18 at 20:39

The source code to hdparm shows that it just passes the value on to the disk, except that it passes command 0x85 instead of 0x05 when value is 255. The ATA Spec turns up this tidbit:

Subcommand code 05h allows the host to enable Advanced Power Management. To enable Advanced Power Management, the host writes the Sector Count register with the desired advanced power management level and then executes a SET FEATURES command with subcommand code 05h. The power management level is a scale from the lowest power consumption setting of 01h to the maximum performance level of FEh. Table 30 shows these values.

  • Maximum performance FEh
  • Intermediate power management levels without Standby 81h-FDh
  • Minimum power consumption without Standby 80h
  • Intermediate power management levels with Standby 02h-7Fh
  • Minimum power consumption with Standby 01h
  • Reserved FFh
  • Reserved 00h

Device performance may increase with increasing power management levels. Device power consumption may increase with increasing power management levels. The power management levels may contain discrete bands. For example, a device may implement one power management method from 80h to A0h and a higher performance, higher power consumption method from level A1h to FEh. Advanced power management levels 80h and higher do not permit the device to spin down to save power. Subcommand code 85h disables Advanced Power Management. Subcommand 85h may not be implemented on all devices that implement SET FEATURES subcommand 05h.

In other words: "Unspecified, device specific behavior"


With credit to www.freeminded.org

Values 1-127 permit spin-down, 128-254 do not and 255 disables advanced power management altogether (if the drive supports it). Values 1 to 240 are in 5 second steps, values 241 to 251 are steps of 30 minutes, see the table below.

enter image description here

There is more information on the site.

  • 13
    Thanks, but I'm having a feeling the site mixed up two arguments together. hdparm has another option -S that controls spin-down time, and it's defined exactly as the other sentence from the site: Values from 1 to 240 specify multi ples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. Also it doesn't make sense to define spin-down time for values >=128, if they don't actually don't permit spin-down. – Petr Feb 21 '13 at 20:26
  • 5
    This is misleading, the author of the blog post you linked seems to confuse -B, with -S. (-B changes the advanced power management and its entry in hdparm.conf is 'apm'). The table you posted is for the standby timeout ("-S" & "spindown_time") – karatchov Dec 6 '14 at 14:54
  • This is what I needed, and it worked for my FireCuda Seagate drives ST2000LX001 – Locane Apr 28 '17 at 20:02
  • I second what @karatchov sais. – Ben May 12 '19 at 8:15
  • from man smartctl: apm[,N|off] - [ATA only] Gets/sets the Advanced Power Management (APM) feature on device (if supported). If a value between 1 and 254 is provided, it will attempt to enable APM and set the specified value, 'off' disables APM. Note the actual behavior depends on the drive, for example some drives disable APM if their value is set above 128. Values below 128 are supposed to al‐low drive spindown, values 128 and above adjust only head-parking frequency, although the actual behavior defined is also ven‐dor-specific. – AlexOnLinux Oct 22 '20 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.