Saturday, December 10, 2011

Disabling Hard Disk Drive Advanced Power Management (HDD APM)

HDD APM explained in brief
The Advanced Power Management feature present in virtually all modern hard disk drives is aimed to save energy and power supply by regulating the performance of the hard disk drive. Power consumption is reduced by parking the drive heads when the disk is not in use, by adjusting spin speeds, and disabling internal components when not in use. Aggressive power saving settings allow the hard disk drive to stop its spindle motor and park heads more frequently, which allows saving as much energy as possible, but leads to increased deterioration of mechanics and delays on drive reads caused by waiting the magnetic disks to spin up to the necessary speed. In other words saving energy is achieved by decreasing performance and to a certain extent shortens drive life.


HDD APM and hard disk drive clicking sounds
Many users have reported a problem with hard drive clicking, sometimes described as a repeating tick tick tick type of ticking sound, or a faint beep at random intervals. The click sound is usually caused by the drive parking its head. There are multiple causes for that, including power management and shock detection.
The clicking sound occurs only when the drive is idle. Forcing the drive to be busy delays ticking. Launching programs that access the hard drive, such as indexing or defragmenting the drive, helps for a while. Of course there is always a better option. As clicking sounds are related to drive head parking it is possible to completely eliminate them by changing the APM settings and taking control over operation of hard disk.


How to set APM setting with hdparm.exe
The clicking noise apparently occurs when the drive is parking its heads (and ramping them off the drive surface) after a timeout after the last disk access. Workaround has been found by using hdparm to turn off power management for the drive: 
   # hdparm -B 255 hda
That should stop the drive from parking the heads except when turning off. You can also try: 
   # hdparm -B 254 hda
which doesn't turn power management off, but is the least aggressive setting. It will still unload heads, but far less often.


Download hdparm tool for Windows
A version of hdparm for Windows can be downloaded from the Cygwin project official webpage. The Cygwin package is a collection of Linux native tools and a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality for Windows.
Hdparm.exe is a command line tool. It must be saved in the same folder as cygwin1.dll in order to be ready to use. HDD APM settings are managed with prompts through the cmd console in Windows.

Download hdparm in Windows installer package format (MSI)

If you prefer hdparm.exe and cygwin1.dll may be downloaded here bundled as MSI installation package. The package contains:
- Hdparm executable for Windows v.6.9 and Cygwin1.dll library v.1007.9.0.0
- Predefined command scripts for setting most common HDD APM values - max battery, hard disk performance or APM disabled.


Screenshots:

Predefined command script

Start menu shortcuts

15 comments:

  1. Large thanks! This application has helped me to disconnect APM Toshiba MK3259GSXP in mine laptop.

    ReplyDelete
  2. This work good in linux or in windows to western digital HDs. but my toshiba HD MQ01ABD032 still make the "click" sound. HDparm show APM is disabled but toshiba make "click" sound when HD is idle.

    ReplyDelete
    Replies
    1. Try setting APM value to 254. If this doesn't help then try with 250.

      Delete
  3. Hope this helps with Seagate SV35 which have pretty much constant parkwannabe problem. For a drive that's just storage it wiggles it's head on and off to parking position couple thousand times per day.. needless to say that's some clicks.

    When I looked the smart data, APM level seemed to change to 128 right after firing this thing, so I assume it changed the parking time to less aggressive (whatever half minute it was).

    So behalf of the drives longevity and my nerves, thanks! :)

    ReplyDelete
  4. I have a question, I'm running my notebook with primary drive (SSD) and HDD where I store my data. I'm having troubles with HDD and APM. But if I disable APM through this application it disables APM on my SSD (hda) How can I achieve to disable APM on both drives ? Thanks for your reply !

    ReplyDelete
    Replies
    1. Go to C:\Program Files\hdparm where you will find three .cmd files.
      Open the cmd file for Disabling APM and look for the row containing this command:

      hdparm -B 255 hda

      the hda stands for "Hard Disk 1" or "Hard Disk A" (as used in Linux)
      if you replace hda with hdb this will refer to "Hard Disk 2" or "Hard Disk B" which is your SATA HDD.

      Have in mind that APM on SSD disks don't need to be disabled as SSD disks don't have spinning mechanical parts producing noises.

      Try it and share your feedback

      Delete
  5. Are these changes made directly to the hard drive? I'm asking because we had a performance issue in our NAS device (two 24-port Promise storage arrays), which my boss thinks is due to the APM features putting it into a low power mode. If we can plug these drives into a HD dock and then set it to use a specific APM level, will it keep that level when we unplug it and put it into the NAS?

    ReplyDelete
    Replies
    1. No. The settings are restored back to HDD factory defaults on shutdown or in your case - after you stop and unplug them.

      Delete
  6. WONDERFUL IT WORKED LIKE A CHARM!!! I was trying to solve this problem a very long time and now it's fixed!!! I almost crack my netbook because of weird and loud noise. Thank you so much, you're the best!!!

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Oh, forgot to mention, by the way I'm currently using Hitachi Travelstar. And isn't there no way to do this permanently? Thank you!

      Delete
    3. Look for software called Hitachi Feature Tool that may be found on Hitachi website. On Hitachi drives using this tool, APM can be disabled forever.

      Delete
    4. I tried that tool after you said, but it didn't recognize my disk. I looked at the guide of tool and saw that my disk isn't supporting. It doesn't matter though, since your program doing this fix already, I'm okay with it.

      But I want to start Windows with "disable HDD APM" not "enable HDD APM max performance". Because if I run only "enable hdd apm max perf" it still clicks for one or two time. This does not appear when I run "disable HDD APM".

      How can I add to "disable HDD APM" on Windows Startup Menu? I tried something, but it didn't work. It will be great if "disable HDD APM" start with Windows. Thank you!

      Delete
    5. Okay I figure it out with help this website:

      http://www.vikitech.com/1510/add-any-program-to-windows-7-startup-how-to-windows-7-tips

      I removed "enable HDD APM max performans" and put "disable HDD APM" as they told. Now Windows starts with "disable HDD APM". Just like I wanted. Yay!

      Delete
  7. Hello,

    Sony Vaio S15-t vásároltunk múlt év decemberben. Azóta küzdök ezzel a kérdéssel. Egy Toshiba MQxxxxx típusú hdd van benne. Minden beállítást megpróbáltam de semmi...van esetleg még ötleted, hogy ezt az idegverő kattogást kikapcsoljam?

    Köszi

    ReplyDelete