Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 10-01-2007, 10:46 PM   #1
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
Question hdparm / APM / Hard Drive Clicking Sound


Anyone know where I could find some documentation explaining the -B option of hdparm and it's implications regarding hard disk shock resistance and wear and tear? Or perhaps you have an explanation of your own? The man page is quite limited. =/


I recently noticed a clicking sound coming from my laptop's (Ubuntu 7.04) hard drive every few seconds. Google showed me I was far from being alone - seems tons of GNU/Linux users have encountered this problem. It also seems to be a pretty dangerous thing, as AFAICT it eats away at the hard disk's life. FWIW, it's a confirmed issue in Ubuntu's bug thing (I assume on other distros too):

A smartctl showed me my Load_Cycle_Count was through the roof. So I got worried about my drive dying a horrible early death and decided to work around the problem with what seems to be the most often recommended approach:
sudo hdparm -B 255 /dev/sda
The workaround worked fine - the clicking stopped (I also added the command to the startup sequence, etc). Granted, I can't change the past and whatever damage was done is done. I'm just happy I caught this sooner rather than later (the laptop is still relatively new).
win32sux@candystore:~$ sudo smartctl -a -d ata /dev/sda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is

Device Model:     Hitachi HTS541680J9SA00
Firmware Version: SB2OC74P
User Capacity:    80,026,361,856 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 1
Local Time is:    Mon Oct  1 22:16:52 2007 EST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x85) Offline data collection activity
                                        was aborted by an interrupting command from host.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever 
                                        been run.
Total time to complete Offline 
data collection:                 ( 645) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine 
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  44) minutes.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
  1 Raw_Read_Error_Rate     0x000b   100   100   062    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0004   100   100   000    Old_age   Offline      -       1351
  3 Spin_Up_Time            0x0007   253   253   033    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       591
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   100   100   000    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0004   100   100   000    Old_age   Offline      -       0
  9 Power_On_Hours          0x0012   099   099   000    Old_age   Always       -       704
 10 Spin_Retry_Count        0x0012   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       591
191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       65536
192 Power-Off_Retract_Count 0x0032   099   099   000    Old_age   Always       -       259
193 Load_Cycle_Count        0x0012   093   093   000    Old_age   Always       -       79353
194 Temperature_Celsius     0x0002   144   144   000    Old_age   Always       -       38 (Lifetime Min/Max 22/48)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       1
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   253   000    Old_age   Always       -       0
223 Load_Retry_Count        0x000a   100   100   000    Old_age   Always       -       0
225 Load_Cycle_Count        0x0012   093   093   000    Old_age   Always       -       79353

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%         1         -
# 2  Short offline       Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
So here's my questions: From what I've read, the clicking problem is due to excessive amounts of "disk head parking" going on. From what I understand, disk head parking is a safety measure which prevents damage to the drive when it's dropped, etc. For some reason, however, there is insane amounts of it happening out-of-the-box on some GNU/Linux setups. So what does this have to do with the disk's APM? From "man hdparm":
       -B     Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means  bet‐
              ter performance. A value of 255 will disable apm on the drive.
Does this mean my drive was spinning down every few seconds? Or is the parking a separate thing which doesn't require spinning down? I actually thought that by not enabling "laptop mode" I wouldn't have any spin downs.
win32sux@candystore:~$ cat /proc/sys/vm/laptop_mode
I know that the 255 disables the APM feature, but I would like to know where can I find documentation about the other 254 possible settings? The man page's "aggressive" description doesn't say much. For example, if I would set 254, how exactly does that affect the drive? Is there a time calculation that needs to be done, as with other settings? I've tried googling for ATA power management specifications but didn't have any luck. Basically, I'm worried that by completely disabling this APM I have increased the risk of my disk being damaged if my laptop is dropped or something like that. Any light you can shed on this would be - as always - greatly appreciated.

Last edited by win32sux; 10-02-2007 at 09:48 PM.
Old 10-02-2007, 01:51 PM   #2
LQ Guru
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Hi win32sux, I've spent a good portion of the morning trying to find some useful info on this topic. Alas, all I have come up with are more man pages and change logs all stating the same information just in different locations.

If it were me, I'd email the Author/developer/maitainer. I have read several articles today that mentioned he explained some of the hdparm switches via email. The address is available on the freshmeat and source forge project pages, and I wouldn't think he would mind explaining a switch with such a brief description. Sorry to be no more help.
Good luck. ;-)
Old 10-02-2007, 09:36 PM   #3
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
Thanks for your support, Peacedog!

Yeah, emailing the developer is definitely something I would consider in the near future. For now, though, I'd like to wait and see what happens on this thread. BTW, if this clicking issue does indeed eat away at hard disks' life, it's IMHO appalling that it hasn't been addressed by the Ubuntu Laptop Team (the issue is over a year old). I would have at least expected an explanatory statement from them in those bug report pages, considering how potentially serious this is. That said, I wonder if other distros might have addressed this already - I'll have to look into that because if they did then they might have provided an explanation. Anyhow, I look forward to any more feedback anyone might have. If I find anything myself I'll make sure to post it.

Last edited by win32sux; 10-02-2007 at 09:45 PM.
Old 10-12-2007, 03:26 AM   #4
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,039

Rep: Reputation: Disabled
As far as I know APM was superseded by ACPI (google for both?). If so, you can disable APM without negative consequences as long as ACPI is working. Now that has sometimes issues with laptops, so you should look into it on your machine...
Old 10-30-2007, 01:47 PM   #5
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
FYI: The issue has now found it's way to Slashdot. Hopefully this increase in attention translates into action on behalf of the Ubuntu folks. At this time, the issue's "importance" has not been elevated - it's still "wishlist".
Old 10-30-2007, 10:59 PM   #6
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Moved: This thread is more suitable in Ubuntu and has been moved accordingly to help your thread/question get the exposure it deserves.

Mod Note: As suggested, this appears to be a Ubuntu-centric issue, and so I'm moving it to that subforum
Old 01-15-2009, 06:22 AM   #7
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
Seems like a proper fix for this has finally found it's way to intrepid-updates. At least that's what I can gather after monitoring the discussion on the mailing list about this bug. I quote from the changelog:
acpi-support (0.114-0intrepid1) intrepid-proposed; urgency=low

* {ac,battery,resume,start}.d/ don't just check whether
laptop-mode is configured to control the drives, also check whether
laptop-mode itself is *enabled*. Finally closes LP: #59695.

-- Steve Langasek <> Mon, 05 Jan 2009 10:50:10 +0000
I believe the date on that is when it made it to intrepid-proposed, as AFAICT it's only been available via intrepid-updates for a day or two. Hopefully this means people won't need to manually work around this bug any more. The discussion on the mailing list seems to indicate that this fix still needs some more work, though. So I would expect there will either be further updates to this package done, or perhaps Ubuntu 9.04 will include the more complete fix. In any case, this is really good news for a lot of users!

EDIT: Indeed, soon after posting this another update was released:
acpi-support (0.114-0intrepid2) intrepid-proposed; urgency=low

[ Jakob Unterwurzacher ]
* Defensive quoting in, so that the script doesn't throw
a syntax error when the battery state is undetermined.

[ Steve Langasek ]
* lib/power-funcs: refactor getState() to return 'AC' by default,
since this is implicitly the case if we don't have a battery.
LP: #59695.

-- Steve Langasek <> Thu, 15 Jan 2009 13:37:16 +0000

Last edited by win32sux; 01-16-2009 at 03:09 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hard drive clicking spooon General 6 01-30-2006 04:39 PM
clicking hard drive slinky2004 Linux - Hardware 3 12-31-2005 09:10 PM
Clicking hard drive and being cracked? BajaNick General 4 09-21-2004 07:40 PM
Hard drive clicking away while surfing BajaNick Linux - Security 2 01-03-2004 03:53 PM
hard drive clicking ranger12002 General 12 07-20-2003 05:22 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration