Difference between revisions of "Problem with hard drive clicking"

From ThinkWiki
Jump to: navigation, search
m (Possible Cause and Speculation: pointer to noatime)
(Possible solutions (Linux): mention idle3-utils, thanks to greenfreedom10 for the hint)
 
(65 intermediate revisions by 21 users not shown)
Line 1: Line 1:
Many users have reported a '''problem with hard drive clicking''', sometimes described as a repeating '''tick tick tick''' type of ticking sound.
+
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 [[Hitachi Travelstar 5K80]] series which shipped with many T series Thinkpads in particular is reported to suffer from this problem. The clicks occur rapidly, and are quiet but noticeable. While in use in a quiet environment the clicks can be relatively loud and very irritating to some users. The clicks seem to happen when the drive is idle and the power has been on for a significant period of time. The clicking is also reported on other vendor's laptop hard drives too and is therefore almost certainly a hard drive related rather than a laptop chassis related.
 
  
The clicking sound appears to only occur when the drive is idle. Forcing the drive to be busy silences the ticking while the drive is busy. Launching programs that access the hard drive such as searching or defragmenting the drive helps for a time. Cycling the power on the hard drive such as through a full power off reboot of the system stops the ticking for the moment and has been used as a temporary solution. Also see use of hdparm for another way to reset the drive without a power off reboot.
+
The click sound is usually caused by the drive '''parking its head'''. There are multiple causes for that, including power management and shock detection (see below for fixes). However, it may also mean that your drive is about to ''die'' (the dreaded "[http://en.wikipedia.org/wiki/Click_of_death click of death]"); check <tt>/var/log/messages</tt> (or <tt>/var/log/syslog</tt>) for suspicious errors, and remember to backup!
  
Others recommend using Hitachi's drive feature tool to increase the acoustic management level, and/or set power management settings.
+
The [[Hitachi Travelstar 5K80]] series, which shipped with many T series Thinkpads, is reported to suffer from this problem in particular. The clicks occur rapidly, and are quiet but noticeable. While in use in a quiet environment, the clicks can be relatively loud and annoying. The clicks seem to happen when the drive is idle and the power has been on for a significant period of time. Western Digital drives (like the Scorpio series) are also known to exhibit pronounced clicks. The clicking is also reported on other vendors' laptop hard drives, and is therefore almost certainly hard drive related rather than laptop chassis related.
  
===Possible Cause and Speculation===
+
The clicking sound appears to occur only when the drive is idle. Forcing the drive to be busy silences the ticking. Launching programs that access the hard drive, such as searching or defragmenting the drive, helps for a time. Cycling the power on the hard drive, such as through a full power-off reboot of the system, stops the ticking for the moment. <tt>hdparm</tt> can be used to reset the drive without rebooting, or to set the power management settings.
  
Laptop drives (especially Hitachi [[Hitachi Travelstar 5K80]], [[Hitachi Travelstar 5K100]] and SAMSUNG MP0804H) can unload heads very often, and they can produce a noticeable click when doing that.  Some ThinkPad BIOSes can be very eager to program the HD Advanced Power Management feature (hdparm -B) even when told to always keep the HD in "Maximum Performance mode" and will do so every time AC state changes, and when coming out of suspend (be it S3 or S4).  Unless you reset the HD's APM mode, it will unload its heads eventually thus producing the clicks.
+
Others recommend using Hitachi's drive feature tool to increase the acoustic management level.
  
Another proposed possible cause is the drive firmware running a low level surface media check periodically during drive idle time.
+
=== Possible cause and speculation ===
  
It is not known whether the problem is a sign of impending drive failure. The root cause of the problem is not yet known.  It is quite likely to be a normal mode of drive operation. The problem is very prevalent.
+
Laptop drives (especially Hitachi [[Hitachi Travelstar 5K80]], [[Hitachi Travelstar 5K100]] and SAMSUNG MP0804H) can '''unload heads''' very often, producing a noticeable click. Some ThinkPad BIOSes can be very eager to program the HD Advanced Power Management feature (<tt>hdparm -B</tt>), even when told to always keep the HD in "Maximum Performance mode", and will do so every time AC state changes and when coming out of suspend (be it S3 or S4). Unless you reset the HD's APM mode, it will unload its heads eventually, thus producing the clicks.
  
Do not confuse this with regular activity. Many daemons poll (config) files every few seconds. Despite files being cached, POSIX-compliant filesystems like ext2 or ext3 must update (=write) the last access time. More details and workaround in [[How to reduce power consumption#Hard_Drives]].
+
Another possible cause is the drive firmware running a low level '''surface media check''' periodically during idle time.
  
===Tracking down the cause of the clicks===
+
It is not known whether the problem is a sign of impending drive failure. The root cause of the problem is not yet known. It is quite likely to be a normal mode of drive operation. The problem is very prevalent.
  
Using "'''smartctl -A'''", it is possible to check if any of the drive's attributes related to platter spin-up/down or head unload are increasing when a click is heard.
+
Do not confuse this with regular activity. Many daemons poll (config) files every few seconds. Despite files being cached, POSIX compliant filesystems like ext2 or ext3 must update (= write) the last access time. More details and a workaround in [[How to reduce power consumption#Hard_Drives]].
That can help pinpointing the cause of the clicks.
 
  
===Possible solution (Linux)===
+
Some vendors have extra power-saving timers that might be causing issues, such as the '''idle3''' timer of some WD Green drives that controls the WD Intellipark feature.
  
Temporary relief has been seen by using '''hdparm''' to reset the drive.  But note the warning in the hdparm man page indicating that it is a dangerous operation. This is very likely due to the possibility of losing data in the write cache not yet stored to the hard drive.  This would be dependent upon the particular hard drive.  When used in the following to stop the clicking I have not seen any data loss.  YMMV.
+
=== Tracking down the cause of the clicks ===
  
  # hdparm /dev/hda
+
Using "'''<tt>smartctl -A</tt>'''" (part of the the <tt>[http://sourceforge.net/apps/trac/smartmontools/wiki smartmontools]</tt> package), it is possible to check if any of the drive's attributes related to platter spin-up/down or head unload are increasing when a click is heard. That can help pinpointing the cause of the clicks.
 +
 
 +
A shell script like this may help to see if the '''Load Cycle Count''' is affected (indicating head unloading):
 +
 
 +
<pre>#!/bin/bash
 +
lastval=0
 +
while :
 +
do
 +
        newval=`smartctl -A /dev/sda | awk '$2=="Load_Cycle_Count" {print $10}'`
 +
        if [[ $newval != $lastval ]]    # i.e., anything has changed (here: load cycle count only)
 +
        then
 +
                date
 +
                echo $newval
 +
        fi
 +
        lastval=$newval
 +
        sleep 30    # or some other interval
 +
done
 +
</pre>
 +
 
 +
=== Possible solutions (Linux) ===
 +
 
 +
The clicking noise apparently occurs when the drive is parking its heads (and ramping them off the drive surface in the process) after a timeout after the last disk access. Temporary relief has been found by using '''<tt>hdparm</tt>''' to turn off power management for the drive:
 +
 
 +
: {{cmdroot|hdparm -B 255 /dev/sda}}
 +
 
 +
That should stop the drive from parking the heads except when turning off. You can also try
 +
 
 +
: {{cmdroot|hdparm -B 254 /dev/sda}}
 +
 
 +
which doesn't turn power management off, but is the least aggressive setting: it will still unload heads, but far less often. (The drives ''are'' prepared to withstand a great number of head unloads: 200,000 unloads are typical, and Hitachi drives tolerate about 600,000 unloads.)
 +
 
 +
To make these changes permanent, you have to ensure that the <tt>-B</tt> commands are reissued at every boot, after resuming from disk or RAM, after hotswapping, and ''every time the ThinkPad BIOS might try to override them''. This is done in two steps: changing the default settings when the system boots, and changing the settings when the system resumes after the lid is closed and re-opened.
 +
 
 +
==== Start-up settings ====
 +
 
 +
On Debian, edit <tt>/etc/hdparm.conf</tt> (as root):
 +
 
 +
: {{cmdroot|vi /etc/hdparm.conf}}
 +
 
 +
Add the following lines:
 +
 
 +
# Change sda to hda if it's a PATA drive
 +
/dev/sda {
 +
        apm = 255
 +
}
 +
 
 +
Then, to refresh the settings, run
 +
 
 +
: {{cmdroot|update-rc.d hdparm defaults}}
 +
 
 +
On Ubuntu 11.04, the script <tt>/usr/lib/pm-utils/power.d/95hdparm-apm</tt> (part of the <tt>hdparm</tt> package) sets the APM level to 128 when on battery and 254 otherwise (these defaults are part of the <tt>hdparm_options()</tt> function in <tt>/lib/hdparm/hdparm-functions</tt>). This may be overridden in <tt>hdparm.conf</tt> with the custom setting <tt>apm_battery</tt>:
 +
 
 +
/dev/sda {
 +
        apm = 255
 +
        apm_battery = 255
 +
  }
 +
 
 +
Alternatively, you can override the <tt>95hdparm-apm</tt> script by creating an empty file with the same name in <tt>/etc/pm/power.d</tt>:
 +
 
 +
: {{cmdroot|touch /etc/pm/power.d/95hdparm-apm}}
 +
 
 +
On [http://wiki.archlinux.org/index.php/Laptop#Hard_drive_spin_down_problem Arch Linux], edit <tt>/etc/rc.local</tt> instead and add:
 +
 
 +
hdparm -B 254 /dev/sda
 +
 
 +
Then reboot the system, and the clicking noise should be gone.
 +
 
 +
==== Wake-up settings ====
 +
 
 +
The clicking may resume when the lid is closed and re-opened. To fix this, create an executable file named <tt>50_hdparm-pm</tt> in <tt>/etc/pm/sleep.d</tt>:
 +
 
 +
: {{cmdroot|vi /etc/pm/sleep.d/50_hdparm-pm}}
 +
 
 +
With the following content:
 +
 
 +
#!/bin/sh
 +
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then
 +
        hdparm -B 255 /dev/your-hard-drive > /dev/null
 +
fi
 +
 
 +
To make it executable, run:
 +
 
 +
: {{cmdroot|chmod +x /etc/pm/sleep.d/50_hdparm-pm}}
 +
 
 +
If this does not help, but manually setting <tt>hdparm -B 255 /dev/sda</tt> does, try the script below instead:
 +
 
 +
#!/bin/sh
 +
. "${PM_FUNCTIONS}"
 +
case "$1" in
 +
        thaw|resume)
 +
                sleep 2
 +
                hdparm -B 255 /dev/sda
 +
                ;;
 +
        *)
 +
                ;;
 +
esac
 +
exit $NA
 +
 
 +
On [https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695 Ubuntu] 8.10 (Linux Mint 6) on a T42, there seems to be something else setting a lower value in battery mode, which might be coming from the BIOS because it clicks during boot and stops with this in place. Make an executable file named "<tt>99-hdd-spin-fix.sh</tt>" (the important thing is it's starting with "<tt>99</tt>"), containing the following:
 +
 
 +
#!/bin/sh
 +
# Use a less aggressive hard disk power management to get rid of
 +
# clicking noise when the drive is parking its heads
 +
hdparm -B 255 /dev/sda
 +
 
 +
Then, copy this file to <tt>/etc/acpi/suspend.d/</tt>, <tt>/etc/acpi/resume.d/</tt> and <tt>/etc/acpi/start.d/</tt>. Remember to make the files executable (<tt>chmod +x</tt>).
 +
 
 +
Otherwise, try to reset the drive with <tt>-w</tt>, but note that this may cause data loss, according to <tt>hdparm</tt>'s man page. When used in the following way to stop the clicking, I have not seen any data loss. YMMV.
 +
 
 +
# hdparm /dev/sda
 
  # sync
 
  # sync
 
  # sleep 5
 
  # sleep 5
 
  # sync
 
  # sync
  # hdparm -w /dev/hda
+
  # hdparm -w /dev/sda
 +
 
 +
==== Laptop mode ====
  
The clicking noise apparently occurs when the drive is parking its heads (and ramping them off the drive surface in the process) after a timeout after the last disk access. Try turning off power management for the drive; that should stop the drive from parking the heads except when turning off:
+
Yet another solution is to install the <tt>laptop-mode-tools</tt> package and have it handle the hard drive's settings. Note that by default, <tt>laptop-mode-tools</tt> will frequently spin down the hard drive to save power.
  
# hdparm -B 255 /dev/hda
+
Edit <tt>/etc/laptop-mode/laptop-mode.conf</tt>, set <tt>CONTROL_HD_POWERMGMT=1</tt> and ensure that <tt>hdparm</tt> sets <tt>-B 255</tt>.
  
You can also try
+
==== Disable WD Intellipark ====
  
# hdparm -B 254 /dev/hda
+
On WD Green drives where Intellipark might be causing the problem, you can try to use the [http://idle3-tools.sourceforge.net/ idle3-tools] utility to disable Intellipark.
  
which doesn't turn power management off, but is the least agressive setting: it will still unload heads, but far less often.  The drives '''are''' prepared to withstand a great number of head unloads (200k unloads are typical, Hitachi drives tolerate about 600k unloads).
+
=== Possible solution (Windows) ===
  
These commands have immediate effect, and need to be re-issued at every boot, after resuming from disk or RAM, and after hotswapping. '''You have to reissue the -B commands every time the ThinkPad BIOS might have tried to override them'''.
+
On a X41T, do BIOS, firmware and IBM updates. Then simply disable the ShockProtection of the hard drive. On a native X41T Windows installation, it solved the problem; one will hear a click only every hour. It seems that the problem is related to an aggressive setting that will try to park the head often to protect the drive, so the problem is not related with power management settings. Perhaps a similar approach also works under Linux. &ndash; WBonX (Hitachi drive)
  
===Specific models===
+
=== Specific models ===
  
====Hitachi C4K60 (HTC426060G9AT00)====
+
==== Hitachi C4K60 (HTC426060G9AT00) ====
  
On a Thinkpad X41 with a has a 60GB Hitachi C4K60 (HTC426060G9AT00) hard-disk that had the clicking problem (even in Windows), the hdparm solution above did not work. The problem was indeed caused by the hard-disk unloading the heads when idle, and the Load_Cycle_Count SMART statistic could be seen increasing when the clicks occurred.
+
On a Thinkpad X41 with a has a 60 GB Hitachi C4K60 (HTC426060G9AT00) hard disk that had the clicking problem (even in Windows), the <tt>hdparm</tt> solution above did not work. The problem was indeed caused by the hard disk unloading the heads when idle, and the <tt>Load_Cycle_Count</tt> SMART statistic could be seen increasing when the clicks occurred.
  
hdparm -B settings did not seem to help, and a check of the harddrives specs (available in [http://www.hitachigst.com/tech/techlib.nsf/products/Travelstar_C4K60   hitachigst.com]) verified that setting the APM mode off (hdparm -B 255) would set it actually to the lowest APM mode (the same as hdparm -B 254). In this drive, even the lowest APM mode unloads the heads very aggressively causing the clicking sounds. Another problem is that the drive is rated only for 600000 unload/load cycles, which means that the drive will break in at most a couple of years.  
+
<tt>hdparm -B</tt> settings did not seem to help, and a check of the hard drive's specs (available in [http://www.hitachigst.com/tech/techlib.nsf/products/Travelstar_C4K60 hitachigst.com]) verified that setting the APM mode off (<tt>hdparm -B 255</tt>) would set it actually to the lowest APM mode (the same as <tt>hdparm -B 254</tt>). In this drive, even the lowest APM mode unloads the heads very aggressively, causing the clicking sounds. Another problem is that the drive is rated only for 600,000 unload/load cycles, which means that the drive will break in at most a couple of years.
  
{{NOTE|This observation is only about the specific model (Hitachi C4K60), and is not true for more recent Hitachi drives, which do disable APM with -B 255.}}
+
{{NOTE|This observation is only about the specific model (Hitachi C4K60), and is not true for more recent Hitachi drives, which do disable APM with <tt>-B 255</tt>.}}
  
====Samsung MP0804H 80GB====
+
==== Samsung MP0804H 80GB ====
 +
 
 +
On this drive, the clicking noise can be immediately stopped just by enabling ''automatic offline tests'' using
 +
 
 +
: {{cmdroot|smartctl -o on /dev/hda}}
  
On this drive, the ''clicking noise'' can be immediately stopped just by enabling ''automatic offline tests'' using
 
# smartctl -o on /dev/hda 
 
 
Even more strange is that SMART wasn't enabled by default, although the drive supports it.
 
Even more strange is that SMART wasn't enabled by default, although the drive supports it.
  
The drive had already performed 15.539 load cycles (out of 600.000) within only one week.
+
The drive had already performed 15,539 load cycles (out of 600,000) within only one week.
 +
 
 +
Note that enabling SMART (<tt>-s</tt> on) without enabling offline tests &ndash; which is what I did immediately after observing the clicks &ndash; did not solve the problem, but made it quite clear that the drive was badly in need of some care.
 +
 
 +
==== Seagate Momentus 7200.1 and 7200.3 ====
 +
 
 +
Reported in X61t and X61 (I have a ST9320421AS).
  
Note that enabling SMART (-s on) without enabling ''offline tests'' -- which is what I did immediately after observing the ''clicks'' -- did not solve the problem, but made it quite clear that the drive was ''badly in need of some care''.
+
On these drives, each click does indeed correspond to an increase in SMART attribute 193, "<tt>193 Load_Cycle_Count</tt>", as you can see by doing a
  
 +
: {{cmdroot|smartctl -A /dev/sda}}
  
 +
before and after a click.
  
===Firmware upgrades===
+
It seems like the problem is that the default powersaving mode for the drive is one which causes clicking. In fact, executing
  
There are two HD firmware upgrades on Lenovo's support website. One is specific to X41's, and will upgrade Hitachi's to Release A0L0  (document [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-67238 MIGR-67238], 2007/01/24). The upgrade comes in three forms: diskette, windows executable or ISO CD-ROM image.
+
: {{cmdroot|hdparm -B 255 /dev/sda}}
IBM's latest posted firmware, A5DA, does not appear to solve the problem.
 
  
A newer upgrade set ([http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-62282 MIGR-62282], 2007/05/02) updates HD firmwares of several brands, including Hitachi. The patch upgrades firmware for HTC4260xxG9AT00 to A0L2 (according to program output, from 00P3A0B5 to 00P3A0L2). The upgrade comes in a large (20 MB) ISO format, or as several diskettes. There is seemingly no windows executable; therefore upgrading a diskless machine can be problematic (it involves making a DOS-based USB bootable drive).
+
which is supposed to turn off power management, actually leaves power management ''on'', and is equivalent to
 +
 
 +
: {{cmdroot|hdparm -B 128 /dev/sda}}
 +
 
 +
as can be seen by comparing the results of
 +
 
 +
# hdparm -B 1 /dev/sda; hdparm -I /dev/sda | grep Advanced
 +
# hdparm -B 128 /dev/sda; hdparm -I /dev/sda | grep Advanced
 +
# hdparm -B 254 /dev/sda; hdparm -I /dev/sda | grep Advanced
 +
# hdparm -B 255 /dev/sda; hdparm -I /dev/sda | grep Advanced
 +
 
 +
This may or may not be related to something else strange; the drive reports that the advanced power management level is 0x8000 more than what you set it to, presumably leading <tt>hdparm</tt> to report that it is always set to "unknown setting" (since the number should be between 1 and 255). FYI, the results of the above sequence of commands are:
 +
 
 +
{{cmdroot|hdparm -B 1 /dev/sda; hdparm -I /dev/sda | grep Advanced}}
 +
 
 +
/dev/sda:
 +
setting Advanced Power Management level to 0x01 (1)
 +
        Advanced power management level: unknown setting (0x8001)
 +
          *    Advanced Power Management feature set
 +
 
 +
{{cmdroot|hdparm -B 128 /dev/sda; hdparm -I /dev/sda | grep Advanced}}
 +
 
 +
/dev/sda:
 +
setting Advanced Power Management level to 0x80 (128)
 +
        Advanced power management level: unknown setting (0x8080)
 +
          *    Advanced Power Management feature set
 +
 
 +
{{cmdroot|hdparm -B 254 /dev/sda; hdparm -I /dev/sda | grep Advanced}}
 +
 
 +
/dev/sda:
 +
setting Advanced Power Management level to 0xfe (254)
 +
        Advanced power management level: unknown setting (0x80fe)
 +
          *    Advanced Power Management feature set
 +
 
 +
{{cmdroot|hdparm -B 255 /dev/sda; hdparm -I /dev/sda | grep Advanced}}
 +
 
 +
/dev/sda:
 +
setting Advanced Power Management level to disabled
 +
        Advanced power management level: unknown setting (0x8080)
 +
                Advanced Power Management feature set
 +
 
 +
The workaround seems to be to execute
 +
 
 +
: {{cmdroot|hdparm -B 254 /dev/sda}}
 +
 
 +
So it seems like the drive is interpreting "<tt>hdparm -B 255 /dev/sda</tt>", which I'm guessing is the default (and which is supposed to be ''not'' powersaving mode) as a request to go into powersaving mode, which causes it to spin down a lot and to and click. And I'm guessing that "<tt>hdparm -B 254 /dev/sda</tt>" actually takes it out of powersaving mode.
 +
 
 +
Somewhat annoying, because
 +
 
 +
: {{cmdroot|smartctl -A /dev/sda}}
 +
 
 +
shows that I have already accumulated a <tt>Load_Cycle_Count</tt> 106680 after owning the laptop for just a few weeks! I'm not sure that I understand this stuff, but if this corresponds to "Load/Unload Cycles" in http://www.seagate.com/docs/pdf/datasheet/disc/ds_momentus7200.pdf, then that's more than 1/6 of the drive's lifetime!
 +
 
 +
I can confirm that after having my drive for about 5 days now, the 193 cycle count is already at 3000, and it's steadily increasing. That is really annoying. Unfortunately, changing the powersave mode on my drive (ST9320421AS) only breaks my hibernate capability (the laptop resumes immediately), but it won't stop the clicking; instead it will increase it.
 +
 
 +
===== Firmware upgrade =====
 +
 
 +
While no firmware update was found direct from IBM/Lenovo, Dell support offers a firmware update for a nearly-identical Seagate drive model. In at least in two cases (model T500, 7200.3; model Z61m 7200.3), the firmware update eliminated the clicking issue. Details available from this <s>[http://forums.seagate.com/stx/board/message?board.id=ata_drives&thread.id=2677&view=by_date_ascending&page=2 Seagate Thread]</s> [http://forums.seagate.com/t5/Momentus-XT-Momentus-and/CLICKING-NOISE-ISSUE-on-Momentus-7200-3-ST9320421AS-320GB/m-p/12498#M78 Seagate Thread] (version that works, maybe they have restructured their forum) or [http://www.thinkwiki.org/wiki/Talk:Problem_with_hard_drive_clicking here] (for ST9160411ASG).
 +
 
 +
==== [http://sdd.toshiba.com/main.aspx?Path=HardDrivesOpticalDrives/2.5-inchHardDiskDrives/MK2035GSS/MK2035GSSSpecifications Toshiba MK2035GSS] ====
 +
 
 +
The issue happens with "laptop mode" disabled. BIOS is an "AMIBIOS 8.00.14", and the chipset is "Mobile Intel GM965 Express".
 +
 
 +
I can solve the problem with the <tt>hdparm</tt> workaround. The lowest value that makes the trick for me is:
 +
 
 +
: {{cmdroot|sudo hdparm -B 192 /dev/sda}}
 +
 
 +
=== Firmware upgrades ===
 +
 
 +
There are two HD firmware upgrades on Lenovo's support website. One is specific to X41's, and will upgrade Hitachi's to Release A0L0 (document [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-67238 MIGR-67238], 2007/01/24). The upgrade comes in three forms: diskette, Windows executable and ISO CD-ROM image. IBM's latest posted firmware, A5DA, does not appear to solve the problem.
 +
 
 +
A newer upgrade set ([http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-62282 MIGR-62282], 2007/05/02) updates HD firmwares of several brands, including Hitachi. The patch upgrades firmware for HTC4260xxG9AT00 to A0L2 (according to program output, from 00P3A0B5 to 00P3A0L2). The upgrade comes in a large (20 MB) ISO format, or as several diskettes. There is seemingly no Windows executable; upgrading a diskless machine can therefore be problematic (it involves making a DOS-based USB bootable drive).
  
 
The upgrade caused one X41 Tablet HTC426060G9AT00 drive to stop clicking.
 
The upgrade caused one X41 Tablet HTC426060G9AT00 drive to stop clicking.
  
===Another Possible Solution===
+
=== Solutions for OS/2 (eComStation) ===
 +
 
 +
Using the latest [http://svn.netlabs.org/xata Danis506 driver], it is possible to set the APM level of the drive with the /APM:x switch. For the Western Digital Scorpio Blue 320GB EIDE, for example, /APM:254 seems to quiet it down. Like hdparm, lower values may be possible for this and other models.
 +
 
 +
=== Another possible solution ===
 +
 
 +
IBM, when notified about this occurrence, may replace the drive with a Fujitsu 5k 80GB hard drive, as to them the sound is indicative of a potential hard drive failure.
  
IBM, when notified about this occurance, may replace the drive with a Fujitsu 5k 80GB hard drive, as to them the sound is indicative of a potential hard drive failure.
+
== External links ==
  
==External links==
+
* Ubuntu reported bugs: [https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695 59695], [https://bugs.launchpad.net/ubuntu/+bug/104535 104535]
*[http://www.hitachigst.com/hdd/support/download.htm Hitachi Global Storage Technologies Downloads] - The drive feature tool may help with this problem.
+
* [http://wiki.archlinux.org/index.php/Laptop#Hard_drive_spin_down_problem ArchWiki: Hard drive spin down problem]
*[http://forum.thinkpads.com/viewtopic.php?t=7462 Thread on thinkpads.com]
+
* [http://www.hitachigst.com/hdd/support/download.htm Hitachi Global Storage Technologies Downloads] &ndash; the drive feature tool may help with this problem
*[http://notebookforums.com/showthread.php?t=46058 Thread on notebookforums.com]
+
* [http://forum.thinkpads.com/viewtopic.php?t=7462 Thread on thinkpads.com]
*[http://forums.silentpcreview.com/viewtopic.php?p=143203 Thread on silentpcreview.com]
+
* [http://notebookforums.com/showthread.php?t=46058 Thread on notebookforums.com]
*[http://forum.thinkpads.com/viewtopic.php?t=15769 Another Thread on thinkpads.com]
+
* [http://forums.silentpcreview.com/viewtopic.php?p=143203 Thread on silentpcreview.com]
*[http://www.tabletpcbuzz.com/forum/topic.asp?TOPIC_ID=28538&whichpage=1 Thread on tabletpcbuzz.com]
+
* [http://forum.thinkpads.com/viewtopic.php?t=15769 Another Thread on thinkpads.com]
*[http://thinkpad-forum.de/forum/viewtopic.php?t=2255 German Thread on thinkpad-forum.de (Containing an interesting remark about a possible problem with the Cache)]
+
* [http://www.tabletpcbuzz.com/forum/topic.asp?TOPIC_ID=28538&whichpage=1 Thread on tabletpcbuzz.com]
 +
* [http://thinkpad-forum.de/forum/viewtopic.php?t=2255 German Thread on thinkpad-forum.de (Containing an interesting remark about a possible problem with the Cache)]
  
[[Category:T40]] [[Category:T41]] [[Category:T42]] [[Category:T43]] [[Category:X41]] [[Category:G41]]
+
[[Category:T40]]
 +
[[Category:T41]]
 +
[[Category:T42]]
 +
[[Category:T43]]
 +
[[Category:T61]]
 +
[[Category:T61p]]
 +
[[Category:X41]]
 +
[[Category:G41]]

Latest revision as of 04:39, 14 April 2012

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 (see below for fixes). However, it may also mean that your drive is about to die (the dreaded "click of death"); check /var/log/messages (or /var/log/syslog) for suspicious errors, and remember to backup!

The Hitachi Travelstar 5K80 series, which shipped with many T series Thinkpads, is reported to suffer from this problem in particular. The clicks occur rapidly, and are quiet but noticeable. While in use in a quiet environment, the clicks can be relatively loud and annoying. The clicks seem to happen when the drive is idle and the power has been on for a significant period of time. Western Digital drives (like the Scorpio series) are also known to exhibit pronounced clicks. The clicking is also reported on other vendors' laptop hard drives, and is therefore almost certainly hard drive related rather than laptop chassis related.

The clicking sound appears to occur only when the drive is idle. Forcing the drive to be busy silences the ticking. Launching programs that access the hard drive, such as searching or defragmenting the drive, helps for a time. Cycling the power on the hard drive, such as through a full power-off reboot of the system, stops the ticking for the moment. hdparm can be used to reset the drive without rebooting, or to set the power management settings.

Others recommend using Hitachi's drive feature tool to increase the acoustic management level.

Possible cause and speculation

Laptop drives (especially Hitachi Hitachi Travelstar 5K80, Hitachi Travelstar 5K100 and SAMSUNG MP0804H) can unload heads very often, producing a noticeable click. Some ThinkPad BIOSes can be very eager to program the HD Advanced Power Management feature (hdparm -B), even when told to always keep the HD in "Maximum Performance mode", and will do so every time AC state changes and when coming out of suspend (be it S3 or S4). Unless you reset the HD's APM mode, it will unload its heads eventually, thus producing the clicks.

Another possible cause is the drive firmware running a low level surface media check periodically during idle time.

It is not known whether the problem is a sign of impending drive failure. The root cause of the problem is not yet known. It is quite likely to be a normal mode of drive operation. The problem is very prevalent.

Do not confuse this with regular activity. Many daemons poll (config) files every few seconds. Despite files being cached, POSIX compliant filesystems like ext2 or ext3 must update (= write) the last access time. More details and a workaround in How to reduce power consumption#Hard_Drives.

Some vendors have extra power-saving timers that might be causing issues, such as the idle3 timer of some WD Green drives that controls the WD Intellipark feature.

Tracking down the cause of the clicks

Using "smartctl -A" (part of the the smartmontools package), it is possible to check if any of the drive's attributes related to platter spin-up/down or head unload are increasing when a click is heard. That can help pinpointing the cause of the clicks.

A shell script like this may help to see if the Load Cycle Count is affected (indicating head unloading):

#!/bin/bash
lastval=0
while :
do
        newval=`smartctl -A /dev/sda | awk '$2=="Load_Cycle_Count" {print $10}'`
        if [[ $newval != $lastval ]]    # i.e., anything has changed (here: load cycle count only)
        then
                date
                echo $newval
        fi
        lastval=$newval
        sleep 30    # or some other interval
done

Possible solutions (Linux)

The clicking noise apparently occurs when the drive is parking its heads (and ramping them off the drive surface in the process) after a timeout after the last disk access. Temporary relief has been found by using hdparm to turn off power management for the drive:

# hdparm -B 255 /dev/sda

That should stop the drive from parking the heads except when turning off. You can also try

# hdparm -B 254 /dev/sda

which doesn't turn power management off, but is the least aggressive setting: it will still unload heads, but far less often. (The drives are prepared to withstand a great number of head unloads: 200,000 unloads are typical, and Hitachi drives tolerate about 600,000 unloads.)

To make these changes permanent, you have to ensure that the -B commands are reissued at every boot, after resuming from disk or RAM, after hotswapping, and every time the ThinkPad BIOS might try to override them. This is done in two steps: changing the default settings when the system boots, and changing the settings when the system resumes after the lid is closed and re-opened.

Start-up settings

On Debian, edit /etc/hdparm.conf (as root):

# vi /etc/hdparm.conf

Add the following lines:

# Change sda to hda if it's a PATA drive
/dev/sda {
        apm = 255
}

Then, to refresh the settings, run

# update-rc.d hdparm defaults

On Ubuntu 11.04, the script /usr/lib/pm-utils/power.d/95hdparm-apm (part of the hdparm package) sets the APM level to 128 when on battery and 254 otherwise (these defaults are part of the hdparm_options() function in /lib/hdparm/hdparm-functions). This may be overridden in hdparm.conf with the custom setting apm_battery:

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

Alternatively, you can override the 95hdparm-apm script by creating an empty file with the same name in /etc/pm/power.d:

# touch /etc/pm/power.d/95hdparm-apm

On Arch Linux, edit /etc/rc.local instead and add:

hdparm -B 254 /dev/sda

Then reboot the system, and the clicking noise should be gone.

Wake-up settings

The clicking may resume when the lid is closed and re-opened. To fix this, create an executable file named 50_hdparm-pm in /etc/pm/sleep.d:

# vi /etc/pm/sleep.d/50_hdparm-pm

With the following content:

#!/bin/sh
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then
        hdparm -B 255 /dev/your-hard-drive > /dev/null
fi

To make it executable, run:

# chmod +x /etc/pm/sleep.d/50_hdparm-pm

If this does not help, but manually setting hdparm -B 255 /dev/sda does, try the script below instead:

#!/bin/sh
. "${PM_FUNCTIONS}"
case "$1" in
        thaw|resume)
                sleep 2
                hdparm -B 255 /dev/sda
                ;;
        *)
                ;;
esac
exit $NA

On Ubuntu 8.10 (Linux Mint 6) on a T42, there seems to be something else setting a lower value in battery mode, which might be coming from the BIOS because it clicks during boot and stops with this in place. Make an executable file named "99-hdd-spin-fix.sh" (the important thing is it's starting with "99"), containing the following:

#!/bin/sh
# Use a less aggressive hard disk power management to get rid of
# clicking noise when the drive is parking its heads
hdparm -B 255 /dev/sda

Then, copy this file to /etc/acpi/suspend.d/, /etc/acpi/resume.d/ and /etc/acpi/start.d/. Remember to make the files executable (chmod +x).

Otherwise, try to reset the drive with -w, but note that this may cause data loss, according to hdparm's man page. When used in the following way to stop the clicking, I have not seen any data loss. YMMV.

# hdparm /dev/sda
# sync
# sleep 5
# sync
# hdparm -w /dev/sda

Laptop mode

Yet another solution is to install the laptop-mode-tools package and have it handle the hard drive's settings. Note that by default, laptop-mode-tools will frequently spin down the hard drive to save power.

Edit /etc/laptop-mode/laptop-mode.conf, set CONTROL_HD_POWERMGMT=1 and ensure that hdparm sets -B 255.

Disable WD Intellipark

On WD Green drives where Intellipark might be causing the problem, you can try to use the idle3-tools utility to disable Intellipark.

Possible solution (Windows)

On a X41T, do BIOS, firmware and IBM updates. Then simply disable the ShockProtection of the hard drive. On a native X41T Windows installation, it solved the problem; one will hear a click only every hour. It seems that the problem is related to an aggressive setting that will try to park the head often to protect the drive, so the problem is not related with power management settings. Perhaps a similar approach also works under Linux. – WBonX (Hitachi drive)

Specific models

Hitachi C4K60 (HTC426060G9AT00)

On a Thinkpad X41 with a has a 60 GB Hitachi C4K60 (HTC426060G9AT00) hard disk that had the clicking problem (even in Windows), the hdparm solution above did not work. The problem was indeed caused by the hard disk unloading the heads when idle, and the Load_Cycle_Count SMART statistic could be seen increasing when the clicks occurred.

hdparm -B settings did not seem to help, and a check of the hard drive's specs (available in hitachigst.com) verified that setting the APM mode off (hdparm -B 255) would set it actually to the lowest APM mode (the same as hdparm -B 254). In this drive, even the lowest APM mode unloads the heads very aggressively, causing the clicking sounds. Another problem is that the drive is rated only for 600,000 unload/load cycles, which means that the drive will break in at most a couple of years.

NOTE!
This observation is only about the specific model (Hitachi C4K60), and is not true for more recent Hitachi drives, which do disable APM with -B 255.

Samsung MP0804H 80GB

On this drive, the clicking noise can be immediately stopped just by enabling automatic offline tests using

# smartctl -o on /dev/hda

Even more strange is that SMART wasn't enabled by default, although the drive supports it.

The drive had already performed 15,539 load cycles (out of 600,000) within only one week.

Note that enabling SMART (-s on) without enabling offline tests – which is what I did immediately after observing the clicks – did not solve the problem, but made it quite clear that the drive was badly in need of some care.

Seagate Momentus 7200.1 and 7200.3

Reported in X61t and X61 (I have a ST9320421AS).

On these drives, each click does indeed correspond to an increase in SMART attribute 193, "193 Load_Cycle_Count", as you can see by doing a

# smartctl -A /dev/sda

before and after a click.

It seems like the problem is that the default powersaving mode for the drive is one which causes clicking. In fact, executing

# hdparm -B 255 /dev/sda

which is supposed to turn off power management, actually leaves power management on, and is equivalent to

# hdparm -B 128 /dev/sda

as can be seen by comparing the results of

# hdparm -B 1 /dev/sda; hdparm -I /dev/sda | grep Advanced
# hdparm -B 128 /dev/sda; hdparm -I /dev/sda | grep Advanced
# hdparm -B 254 /dev/sda; hdparm -I /dev/sda | grep Advanced
# hdparm -B 255 /dev/sda; hdparm -I /dev/sda | grep Advanced

This may or may not be related to something else strange; the drive reports that the advanced power management level is 0x8000 more than what you set it to, presumably leading hdparm to report that it is always set to "unknown setting" (since the number should be between 1 and 255). FYI, the results of the above sequence of commands are:

# hdparm -B 1 /dev/sda; hdparm -I /dev/sda

/dev/sda:
setting Advanced Power Management level to 0x01 (1)
       Advanced power management level: unknown setting (0x8001)
          *    Advanced Power Management feature set

# hdparm -B 128 /dev/sda; hdparm -I /dev/sda

/dev/sda:
setting Advanced Power Management level to 0x80 (128)
       Advanced power management level: unknown setting (0x8080)
          *    Advanced Power Management feature set

# hdparm -B 254 /dev/sda; hdparm -I /dev/sda

/dev/sda:
setting Advanced Power Management level to 0xfe (254)
       Advanced power management level: unknown setting (0x80fe)
          *    Advanced Power Management feature set

# hdparm -B 255 /dev/sda; hdparm -I /dev/sda

/dev/sda:
setting Advanced Power Management level to disabled
       Advanced power management level: unknown setting (0x8080)
               Advanced Power Management feature set

The workaround seems to be to execute

# hdparm -B 254 /dev/sda

So it seems like the drive is interpreting "hdparm -B 255 /dev/sda", which I'm guessing is the default (and which is supposed to be not powersaving mode) as a request to go into powersaving mode, which causes it to spin down a lot and to and click. And I'm guessing that "hdparm -B 254 /dev/sda" actually takes it out of powersaving mode.

Somewhat annoying, because

# smartctl -A /dev/sda

shows that I have already accumulated a Load_Cycle_Count 106680 after owning the laptop for just a few weeks! I'm not sure that I understand this stuff, but if this corresponds to "Load/Unload Cycles" in http://www.seagate.com/docs/pdf/datasheet/disc/ds_momentus7200.pdf, then that's more than 1/6 of the drive's lifetime!

I can confirm that after having my drive for about 5 days now, the 193 cycle count is already at 3000, and it's steadily increasing. That is really annoying. Unfortunately, changing the powersave mode on my drive (ST9320421AS) only breaks my hibernate capability (the laptop resumes immediately), but it won't stop the clicking; instead it will increase it.

Firmware upgrade

While no firmware update was found direct from IBM/Lenovo, Dell support offers a firmware update for a nearly-identical Seagate drive model. In at least in two cases (model T500, 7200.3; model Z61m 7200.3), the firmware update eliminated the clicking issue. Details available from this Seagate Thread Seagate Thread (version that works, maybe they have restructured their forum) or here (for ST9160411ASG).

Toshiba MK2035GSS

The issue happens with "laptop mode" disabled. BIOS is an "AMIBIOS 8.00.14", and the chipset is "Mobile Intel GM965 Express".

I can solve the problem with the hdparm workaround. The lowest value that makes the trick for me is:

# sudo hdparm -B 192 /dev/sda

Firmware upgrades

There are two HD firmware upgrades on Lenovo's support website. One is specific to X41's, and will upgrade Hitachi's to Release A0L0 (document MIGR-67238, 2007/01/24). The upgrade comes in three forms: diskette, Windows executable and ISO CD-ROM image. IBM's latest posted firmware, A5DA, does not appear to solve the problem.

A newer upgrade set (MIGR-62282, 2007/05/02) updates HD firmwares of several brands, including Hitachi. The patch upgrades firmware for HTC4260xxG9AT00 to A0L2 (according to program output, from 00P3A0B5 to 00P3A0L2). The upgrade comes in a large (20 MB) ISO format, or as several diskettes. There is seemingly no Windows executable; upgrading a diskless machine can therefore be problematic (it involves making a DOS-based USB bootable drive).

The upgrade caused one X41 Tablet HTC426060G9AT00 drive to stop clicking.

Solutions for OS/2 (eComStation)

Using the latest Danis506 driver, it is possible to set the APM level of the drive with the /APM:x switch. For the Western Digital Scorpio Blue 320GB EIDE, for example, /APM:254 seems to quiet it down. Like hdparm, lower values may be possible for this and other models.

Another possible solution

IBM, when notified about this occurrence, may replace the drive with a Fujitsu 5k 80GB hard drive, as to them the sound is indicative of a potential hard drive failure.

External links