The problem with hard drive clicking is better described as a “repeating tick tick tick type of ticking sound, or a faint beep at random intervals” (ThinkWiki).

This is a dangerous and annoying issue, yet not addressed on major Linux distributions, so one has to fix it manually.

  1. Create file /etc/pm/power.d/95hdparm-apm with the following contents:

     #! /bin/sh
     hdparm -W0 /dev/sda
    

    Note: make it executable: chmod a+x /etc/pm/power.d/95hdparm-apm

  2. Add the following to /etc/hdparm.conf:

     /dev/sda {
       apm = 255
       apm_battery = 255
       write_cache = off
     }