# hitachi hard disc drive noise ticking when idle

## h.u.n.t.e.r

I'm having a weird 'problem'. It's not normal so I think it isn't harmless too.

In my Thinkpad R40; there's a hitachi 40GIG (travelstar 80n) drive.

When everything is idle, for every +- 10 seconds, the disc makes a 'tik', a move with is arm. After the tick it seems like it quickly writes something. The same sound as right before it shuts down.

In windows xp; it happens too; but less frequently and certainly not when idle and when the screensaver jumps on.

I've tried several kernelversions. And I use ext3 filesystem with noatime.

So....any suggestions?  :Smile: 

----------

## BradN

```
emerge procinfo

procinfo -n1
```

Watch to see if the hard drive is indeed being written to - this should tell you if it's the drive itself doing it, or something in Linux deciding to write to the drive.

----------

## vector0319

I would say backup all your data and get a replacement drive. I have had alot of important information get destroyed by ignoring noises that come from a harddrive. Laptop harddrives are supposed to be whisper quiet so any noise would make me suspicious. Just my 2 cents.

----------

## h.u.n.t.e.r

Well as far as I see from procinfo; the drive writes a few seconds after the "click/move". And that counter "12938 ide0" increases. It also seems to me that right before the click/move; it writes something too; whereas that counter doesn't increase.

I repeat: it only occures when idling.

Now maybe it has something to do with my partitions?

I have a winxp and fat partition first. After that comes a boot, swap and linux partition. And then I use windows bootloader which loads grub on the bootpartition.

Could it be that what I hear constantly, is that the drive moves toward the beginning/center of the disk (past the winxp partitions)? Or is that bullshit?

----------

## BradN

You could try unmounting extra partitions, going to single user mode, and re-mounting the root partition read only...

```
init 1

mount -o remount,ro /dev/root /

#see if writes still occur

mount -o remount,rw /dev/root /

init 5
```

(replace 'root' as appropriate)

----------

## h.u.n.t.e.r

OK, I executed BradN's suggenstions:

After remounting the my root partition readonly; no writes occur.

After remounting it with 'rw'; writes occur BUT no wicked sounds appear.

So now we can conclude that it is some kind of process that makes these writes...?

I could disable syslog-ng or kdm to see what happens... .

----------

## h.u.n.t.e.r

I did a rough test and disabled lot's of processes (while in kde) but the problem still occured:

```
PID TTY          TIME CMD

    1 ?        00:00:04 init

    2 ?        00:00:00 keventd

    3 ?        00:00:00 ksoftirqd_CPU0

    4 ?        00:00:00 kswapd

    5 ?        00:00:00 bdflush

    6 ?        00:00:00 kupdated

  292 ?        00:00:00 khubd

  326 ?        00:00:01 kjournald

  350 ?        00:00:00 usb-storage-0

  351 ?        00:00:00 scsi_eh_0

  513 ?        00:00:00 devfsd

 1428 ?        00:00:00 knodemgrd_0

 3060 vc/1     00:00:00 agetty

 3061 ?        00:00:00 login

 3062 ?        00:00:00 login

 3063 vc/4     00:00:00 agetty

 3064 vc/5     00:00:00 agetty

 3065 vc/6     00:00:00 agetty

 3370 vc/2     00:00:00 bash

 6235 vc/3     00:00:00 bash

 7941 ?        00:00:00 dhcpcd

 8516 ?        00:00:00 xfs

 8566 ?        00:00:00 kdm

 8568 ?        00:00:27 X

 8569 ?        00:00:00 kdm

 8639 ?        00:00:00 kde-3.1.4

 8673 ?        00:00:00 startkde

 8699 ?        00:00:00 kdeinit

 8702 ?        00:00:00 kdeinit

 8705 ?        00:00:00 kdeinit

 8707 ?        00:00:00 kdeinit

 8716 ?        00:00:00 kdeinit

 8724 ?        00:00:00 artsd

 8752 ?        00:00:00 kdeinit

 8753 ?        00:00:00 kwrapper

 8755 ?        00:00:00 kdeinit

 8756 ?        00:00:00 kdeinit

 8758 ?        00:00:00 kdeinit

 8760 ?        00:00:00 kdeinit

 8761 ?        00:00:01 kdeinit

 8771 ?        00:00:01 kdeinit

 8774 pts/0    00:00:00 bash

 8776 pts/1    00:00:00 bash

 8780 ?        00:00:00 kalarmd

 8818 ?        00:00:00 artsd

 8821 pts/0    00:00:00 su

 8824 pts/0    00:00:00 bash

 9353 ?        00:00:00 kdeinit

 9354 ?        00:00:00 kdeinit

 9359 pts/0    00:00:00 ps

```

After that I removed 'xdm' from default:

```
 PID TTY          TIME CMD

    1 ?        00:00:04 init

    2 ?        00:00:00 keventd

    3 ?        00:00:00 ksoftirqd_CPU0

    4 ?        00:00:00 kswapd

    5 ?        00:00:00 bdflush

    6 ?        00:00:00 kupdated

  292 ?        00:00:00 khubd

  326 ?        00:00:00 kjournald

  350 ?        00:00:00 usb-storage-0

  351 ?        00:00:00 scsi_eh_0

  515 ?        00:00:00 devfsd

 1281 ?        00:00:00 syslog-ng

 1362 ?        00:00:00 knodemgrd_0

 2363 ?        00:00:00 cupsd

 2661 ?        00:00:00 dhcpcd

 2738 ?        00:00:00 noip2

 2902 ?        00:00:00 xfs

 2915 ?        00:00:00 login

 2916 vc/2     00:00:00 agetty

 2917 vc/3     00:00:00 agetty

 2918 vc/4     00:00:00 agetty

 2919 vc/5     00:00:00 agetty

 2920 vc/6     00:00:00 agetty

 2982 vc/1     00:00:00 bash

 3002 vc/1     00:00:00 su

 3003 vc/1     00:00:00 bash

 3007 vc/1     00:00:00 ps

```

And after 15 minutes, still nothing abnormal.

So there is something in the first output (of ps -e) that is causing it....rarara. What part of kde? I could be wrong though  :Sad: .

----------

## BradN

*shrug*

good question...

----------

## kgraehl

In this thread we have a similar issue. https://forums.gentoo.org/viewtopic.php?t=110967&highlight=standby.  I too have a laptop that likes to make a little click every 10 seconds or so. When the harddrive is mounted from the bootcd it goes nice and quiet and doesn't spin up when I'm not using it. But currently no matter what I do it'll spin up. Procinfo confirms that something's being read (or written?). It would be great to have my laptop be quiet every once and a while   :Confused: 

----------

## xmit

Beside the annoying noise this problem produces it also reduces the lifetime of a harddrive. Modern IBM/Hitachi drives are guaranteed to survive 300000 of those click noises. Every 10th second means that your drive will be 'exhausted' in 35 days.

See http://www.hgst.com/hdd/library/whitepap/load/load.htm

----------

## mirage-x

My HP laptop has an Hitachi HD and I have EXACTLY the same problem, same sound.. But I never noticed this problem before 4 days ago (I have my laptop since 2 months).. I don't know if I changed something.. but the sound really annoys me.

First I though that the driver was failling but when listening more closely I found that the drive was just parking its head to "rest"... But too damn often!! I also did many many surface tests and S.M.A.R.T. tests which all say that my drive is perfect..

I hope we will find a solution soon...

----------

## mirage-x

Hitachi has firmware upgrades correcting the problems for some models, but not for mine  :Sad: 

Well I decided that it was enough... That sound was driving me crazy!! So I decided to make a dumb shell script that touches a file and sync HD buffers every 10 seconds... It's soooo silent now  :Smile:  Howerver it's not a great idea because it will theorically reduce battery life (by never "resting its arm"  :Wink: ) and performance (but updating a timestamp is not a big task)..

It seems to be an almost "normal" behavior for hitachi drives but it is so annoying!..

----------

## h.u.n.t.e.r

They have firmware update? I havent found 1 on their support site. I even mailed and asked if there were, but I got no response back.

----------

## mirage-x

Indeed, you can't find them on Hitachi's site.. You must look on either IBM, Dell or HP (or other) site.. For more info, you can search google or read the following threads:

http://delltalk.us.dell.com/supportforums/board/message?board.id=insp_harddrive&message.id=28998&view=by_date_ascending&page=1

http://forums.us.dell.com/supportforums/board/message?board.id=latit_harddrive&message.id=7218

Good luck  :Smile: 

----------

## xmit

Got it! My harddrive is now quiet like a sleeping baby. What I did? I switched the filesystem to ext2 and installed noflushd. Some people say, noflushd also works with other filesystems, even reiserfs. But I want to be careful.

The latest version of noflushd is 2.7, it is in portage unstable. 2.7 also supports kernel 2.6.

If you need further instructions, let me know.

This is so great. While I write these lines the HD spun down which it even wouldn't do under windows. Many thanks to the noflushd developers!   :Very Happy: 

----------

## BradN

I'm guessing you might run into problems with that if you lose power or have a total lockup - recent disk changes might not be written at all then!  At the very least, make sure you have magic sysrq key support so you can alt+printscreen+releasealt+s to sync the disks if you're unable to shutdown normally for some reason.

----------

## xmit

Maybe you are right, I'll switch back to ext3 or reiserfs.

Meanwhile I also found out, that noflushd can not conjure. With a full blown KDE desktop there are too many services that need to access the drive frequently. I found 'atop' quite usefull to see what is going on.

So I give up. Even though I can not get my harddrive to sleep for a noticable time, I know how to kill the annoying clicks: hdparm -B255 -S0 -M254 /dev/hda. Better than nothing.

mg

----------

## h.u.n.t.e.r

Tnx xmit. It worked for me too on my drive ( IC25N040ATMR04-0 ).

But the parameter -S0 or -S253 doesn't do a thing here (problem stays).

B255 does solves the ticking indeed

 *Quote:*   

>   -B     Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means  better performance. A value of 255 will disable apm on the drive.

 

Although I cannot disable it; hdparm -I /dev/hda shows "Advanced power management level: 254 (0xfe)"

----------

## psofa

same here! i had an ibm harddrive( i think its now hitachi's) and someday it desided to start clicking.after a month or so bas sectors etc started!

----------

## h.u.n.t.e.r

That must have been some other kind of ticking. I now run hdparm with these parameters:

disc0_args="-A1 -c3 -d1 -u1 -B255"

And everything works just great now.

----------

## xmit

A few years ago my company had a problem with a fairly amount of 10GB 2,5" harddrives. They broke after half a year to the displease of our customers. After consultation with IBM we changed the harddrive access pattern of our software to reduce the parking/restart cycles. That solved the problem.

To switch this damageable, aggressive parking control off by 'hdparm -B255 ...' is not a bad idea I suppose. One disadvantage might be that the drive is more vulnerable to mechanical shock while not in parking position. But according to murphy the drive is anyway hit while not in parking position. And maybe the drive consumes more power while not parking. And of course it produces more noise while not sleeping.

But as long as this 20 second killing tick noise is the alternative, I prefer -B255. As I already wrote in an earlier post, IBM drives are not guaranteed to survive more than 300.000 clicks.   :Rolling Eyes: 

----------

## h.u.n.t.e.r

Yea that's all true. I use -d1 -B255 now.

Btw, hdparm -I /dev/hda shows Advanced power management level: 254 (0xfe). Although it should be 255?

According to pdf manuals at hitachi that max value is indeed 254. Take a look: http://www.hgst.com/hdd/support/ftool_userguide.pdf

----------

## xmit

I have a IC25N040ATCS05-0 here and get the same results. After 'hdparm -B255 /dev/hda', 'hdparm -I /dev/hda' gives:  Advanced power management level: 254 (0xfe). I would expect 255 too, but wouldn't mind for a penny.

My /etc/conf.d/hdparm contains:

all_args="-d1 -X69 -u1 -c3 -m16 -B255 -S0 -M254 -k1"

I also think that -S0 and -M254 is not really necessary to solve our problem. But I still had no time to investigate this further. These parameters are harmless anyway.

----------

## h.u.n.t.e.r

I did; and you can easily drop S0 and M254

----------

## brucebertrand

I have the problem here too.  I think I just lost a drive to it as well.  After about 3 months of running Gentoo (which I love, BTW)  :Very Happy:  my Toshiba (rebranded Hitachi??) 40gig laptop drive crashed.  I replaced it with the drive out of my Archos MP3 player (Hitachi DK23CA-20).  Same clicking on it.  I don't want to loose another.

I did a few tests and found that it's definately KDE related.  If I remove all services from the default runlevel and reboot, I get the noise only after a normal read or write.  Go into KDE and it becomes periodic (every 10-15 seconds).  Exit KDE (back to terminal, not KDM) and the noise continues for ~30 seconds, then stops.

I'm wondering if anyone has the problem running Gnome?  If so, do you get the same results as I did from the procedure I described?

I had run other distros (SuSE and Mandrake) before on this laptop without noticing the problem.  Though at the time I wasn't using them as much as XP.  Now I'm completely off of XP and using Gentoo 100% of the time, so it's possible that I'm just now noticing it.

I have not yet tried the noflushd solution (using reiserfs).  I've tried the 'hdparm -B255' solution, but 'hdaprm -I' shows that APM level does not change from the original value, and the clicks continue.

Am I correct in assuming that the timeout before head parking is simply too short.  If it were increased to say 5 minutes, we wouldn't have this problem at all.  What would be the negative impact of doing this?  It seems that, during normal use, the heads should never be parked.  This should only happen if there were a long period of inactivity.

Starting to ramble.... I'll stop now.

----------

## h.u.n.t.e.r

Yea it is definately something in KDE. I agree. You'll have to trie yourself if Gnome doesn't do the same thing.

----------

## xmit

I don't have gnome here, but XP does not have this problem. And I can also confirm without starting KDE, X, ntpd, samba, cupsd etc. the drive does not tick that often.

Maybe with hdparm -Bxxx you set the idle time, after which the drive moves to parking position. Try some different values!

Probably the truth is more complicated. The parking mechanism is adaptive to the software's access scheme and tries to guess the best moment to park. Under certian conditions this adaptive control may result in a endless, high frequency parking/active cycle.  Which is deadly for the drive over a longer period. That is what a colleague told me, maybe it is a rumor! We definitely need a IBM/Hitachi/Toshiba technician here to answer that question.

I already wrote some comments about the disadvantages of switching parking off: less shock resistance, higher power consumption, more noise because you also switch sleep (spin-down) mode off.

----------

## brucebertrand

well, I'm staring at links2 in xterm while running blackbox.  Not hearing the clicks, though, for the first 20-30 seconds of the blackbox session, I thought that they were back.  Just X startup stuff I guess.

So, this is definately KDE related.  I'll change my "use" flags to include Gnome, and try that out...though it might be a while before I get results...Gnome's a pretty big download/compile.

----------

## brucebertrand

I just emerged Gnome (which took about 4 hours!!! yikes!).

So far, the periodic clicking is not there... Though is still seems like there is excessive clicking during sparse disk activity (like opening a ney tab in Mozilla/FireFox, or closing xterm).

I'm not used to Gnome at all, so it's a bit strange, but I'd rather deal with that than have another hard drive go out.

----------

## brucebertrand

This is odd.  I was using gnome and decided to check my mail.  I normally use kmail, so I opened up a terminal and launched it.  Normal hard drive noises.  I read through some mails.  No periodic clicking.

One of the messages had a link.  When I clicked it, konqueror opened and went to the URL.  More normal hard drive noise, or so I thought.

After about a minute or so, the periodic clicking started.  Another thing I noticed and thought was odd.  KDE's spell checking function (you know, with aspell/ispell ... misspelled words turn red pretty much anywhere in a KDE app) started working.  I did not think that this would happen without KDE running, but I guess that it's part of konqueror.

When I closed konqueror and kmail, the clicking did not stop.  Not untill I ran "kill -SIGKILL" on all of the "kdeinit" processes.  I've noticed, before, that they tend to stay open after a program is shut down.  What do they do?

So, questions for those more knoledgable. 

1 - could this point to the kdeinit process accessing the disk itself? 

2 - When at a blank KDE desktop (no apps running), is konqueror still running in the background?  If so, is there a way to run KDE without it?

3 - Are all of these things just random coincidences.  If so, am I going crazy.  :Confused: 

----------

