Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
06-10-2009, 05:12 AM
|
#1
|
|
Member
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403
Rep:
|
Harddrive clicks
I know this topic has been covered a bit here already ( http://www.linuxquestions.org/questi...laptop-698103/), but I'd like to know what solutions to the problem people have found since it first arose several months ago.
My HD is experiencing the 'clicking' resulting from the spin-down bug connected to powermanagement. I'm already up to nearly 40,000 on the Load_Cycle_Count. It could be worse, but it has only been about four months since I bought the laptop (new). I don't actually recall hearing the clicks with 12.1 which I installed for the first couple of months. Is it possible there's something in 12.2 which has caused the bug to surface?
Issuing hdparm -B 254 /dev/sda works for me, but this needs to be reissued on each reboot and after every pm-suspend (which I have tied to my button event in acpi). But hdparm needs to be run by root so short of permitting it through sudo I can't insert it into a hook in /etc/acpi/acpi_handler.sh.
In any case, I'd like to know if someone has come up with something better than hdparm -B 254 /dev/sda, since this causes the disk to spin permanently, thereby eating up power that might be saved. I could use Ilgar's script (see the link above) which runs smartctl or sync every few seconds to stop the spindowns but again that limits power management.
Here's my HD info:
Code:
ATA device, with non-removable media
Model Number: WDC WD1600BEVT-88ZCT0
Serial Number: WD-WXEX08UJA900
Firmware Revision: 11.01A11
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5
Thanks for any tips. B.
Last edited by brixtoncalling; 06-10-2009 at 05:13 AM.
|
|
|
|
06-10-2009, 12:49 PM
|
#2
|
|
Member
Registered: Nov 2007
Location: Canada
Distribution: Slackware 12.0
Posts: 100
Rep:
|
This is something I'm also interested in.
|
|
|
|
06-10-2009, 02:12 PM
|
#3
|
|
Member
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403
Original Poster
Rep:
|
Quote:
Originally Posted by brixtoncalling
Issuing hdparm -B 254 /dev/sda works for me, but this needs to be reissued on each reboot and after every pm-suspend (which I have tied to my button event in acpi). But hdparm needs to be run by root so short of permitting it through sudo I can't insert it into a hook in /etc/acpi/acpi_handler.sh.
|
Let me take back the statement that sudo would be needed to run hdparm -B 254 /dev/sda inside /etc/acpi/acpi_handler.sh. You don't; commands will be run as root. My script is:
Code:
case "$1" in
button)
case "$2" in
power) /usr/sbin/pm-suspend
/usr/sbin/hdparm -B 254 /dev/sda
;;
# lid) /usr/sbin/pm-suspend
# ;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
And this seems to work. On resume, my count doesn't increase. There are no clicks. All is well... when I run hdparm -I /dev/sda, it returns the result:
Code:
Advanced power management level: 254
Recommended acoustic management value: 128, current value: 254
Another related question is that my harddrive seems to be running hot: 51C at the moment and I've observed 58C. I'm new to keeping an eye on these kinds of things so maybe it has always been like this. But could setting things to 254 be causing overheating as well?
Last edited by brixtoncalling; 06-10-2009 at 03:06 PM.
Reason: fixed output of hdparm
|
|
|
|
06-10-2009, 02:38 PM
|
#4
|
|
Member
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Rep:
|
This may or may not be related to the "click of death"; but you might want to do a google search
for "click of death" (without the quotes) --- you'll find some interesting reading,
and it just might be related.
Gary
PS: This might be of interest to some of you
|
|
|
|
06-10-2009, 02:55 PM
|
#5
|
|
Member
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware 13.37 and 13.1
Posts: 382
Rep:
|
Quote:
|
My HD is experiencing the 'clicking' resulting from the spin-down bug connected to powermanagement. I'm already up to nearly 40,000 on the Load_Cycle_Count. It could be worse, but it has only been about four months since I bought the laptop (new).
|
This is what I've got on my eee pc 1000H, which clicks a couple of times a minute:
Code:
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 229407
I think I should be worried? 
|
|
|
|
06-10-2009, 03:12 PM
|
#6
|
|
Member
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403
Original Poster
Rep:
|
Quote:
Originally Posted by mcnalu
This is what I've got on my eee pc 1000H, which clicks a couple of times a minute:
Code:
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 229407
I think I should be worried? 
|
Very worried. I'm just happy I caught mine while it was still only at ~40,000 cycles.
|
|
|
|
06-11-2009, 01:16 PM
|
#7
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,592
|
Sorry, but this solution does not work for me. So 'hdparm -B 255 /dev/hda' does not work.
The only solution that works is listed here:
http://www.linuxquestions.org/questi...ml#post3413908
What I did is put that in a script called 'cycle' and then I call that on boot, so if for any reason I don't want it to stop the cycling, I just 'killall cycle'.
Last edited by H_TeXMeX_H; 06-14-2009 at 11:01 AM.
|
|
|
|
06-11-2009, 03:37 PM
|
#8
|
|
Member
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403
Original Poster
Rep:
|
Did you try hdparm -B 255 /dev/hda?
|
|
|
|
06-11-2009, 04:03 PM
|
#9
|
|
Member
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware 13.37 and 13.1
Posts: 382
Rep:
|
Well hdparm -B 254 /dev/sda worked a charm for me - but now I've got a hd in its old age
Code:
# smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231024
Thu Jun 11 19:47:59 BST 2009
# smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231026
Thu Jun 11 19:48:55 BST 2009
# hdparm -B 254 /dev/sda
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
# smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231027
Thu Jun 11 19:49:32 BST 2009
# smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231027
Thu Jun 11 19:51:37 BST 2009
# smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231027
Thu Jun 11 19:52:30 BST 2009
# smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231027
#smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231027
Thu Jun 11 20:05:16 BST 2009
# !sm
smartctl -a /dev/sda | grep Load_Cycle_Count && date
193 Load_Cycle_Count 0x0022 001 001 000 Old_age Always - 231027
Thu Jun 11 22:01:55 BST 2009
|
|
|
|
06-11-2009, 04:17 PM
|
#10
|
|
Member
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 13.37, Pardus 2011.2
Posts: 884
Rep:
|
I think those Old_age indicators are not so important but you're at the threshold value, that's what counts (so yes, you're in trouble, just like I am  ). As for the hdparm solution, it's known that it doesn't work for all HDDs.
Edit: Also, I've realized that calling sync is not as effective as calling smartctl. In that other thread I've mentioned these two options but calling smartctl seems to be the only guaranteed way.
When my disk parks its head after a long time (like when I suspend or kill this script) it makes a high pitch beep-like sound, like the beeps of those old digital watches. That might be another indication of the coming death  .
Last edited by Ilgar; 06-11-2009 at 04:27 PM.
|
|
|
|
06-13-2009, 12:38 AM
|
#11
|
|
Member
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403
Original Poster
Rep:
|
I've played around with adding the -S option to hdparm, but with mixed success.
hdparm -B 127 -S 20 /dev/sda, for example, causes the drive to spindown after about 5 seconds of inactivity, whereas it should be waiting a minute. In fact, it doesn't matter what time value I pass. The drive always spins down after 5 seconds. I also tried different values for -B but no combination of the two does what I would like.
Ultimately, I placed a hdparm -B 254 /dev/sda in rc.local and adjusted my /etc/acpi/acpi_handler.sh as above to ensure that I avoid this problem. But for power saving, I would have liked to have my disk spin down after some period of inactivity when I'm on battery but I haven't found a way of doing it.
|
|
|
|
06-13-2009, 09:50 PM
|
#12
|
|
Member
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211
Rep:
|
Quote:
Originally Posted by brixtoncalling
Issuing hdparm -B 254 /dev/sda works for me, but this needs to be reissued on each reboot and after every pm-suspend (which I have tied to my button event in acpi). But hdparm needs to be run by root so short of permitting it through sudo I can't insert it into a hook in /etc/acpi/acpi_handler.sh.
|
I understand that if you're using pm-suspend to do suspension/hibernation, then you should use /etc/pm/sleep.d to setup any scripts to run on suspension or resuming. This way it will work no matter how you call pm-suspend.
I have this one (in /etc/pm/sleep.d/90-hdparm):
Code:
#!/bin/sh
# pm-utils hook to handle suspend/resume properly for hdparm
. "${PM_FUNCTIONS}" || . "${FUNCTIONS}"
do_hdparm()
{
# Fix aggressive power saving.
/sbin/hdparm -B 240 /dev/sda
}
case "$1" in
hibernate|suspend)
exit 0
;;
thaw|resume)
do_hdparm
exit $?
;;
*) exit $NA
;;
esac
|
|
|
|
06-14-2009, 09:24 AM
|
#13
|
|
Member
Registered: Apr 2009
Distribution: Slackware
Posts: 442
Rep:
|
Quote:
Originally Posted by brixtoncalling
I placed a hdparm -B 254 /dev/sda in rc.local and adjusted my /etc/acpi/acpi_handler.sh as above to ensure that I avoid this problem. But for power saving, I would have liked to have my disk spin down after some period of inactivity when I'm on battery but I haven't found a way of doing it.
|
My disk have this 'feature' and use same setup on notebook, with the acoustic on max. But this not prevent the numbers increasing, just slow the process...
The disc spinning down to save energy is annoying to me, so I just keep running and sacrifice some time on battery. Wireless drains a lot of power on my hardware and I get used to manually turn the chip off.
|
|
|
|
06-14-2009, 09:31 AM
|
#14
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,592
|
Quote:
Originally Posted by BrZ
My disk have this 'feature' and use same setup on notebook, with the acoustic on max. But this not prevent the numbers increasing, just slow the process...
|
The same things happens for me, it doesn't matter what parameters I use for hdparm, either 254 or 255, it either doesn't do anything or slows down the cycling some ... obviously not good enough. The only working solution was posted in a different thread, as I indicated earlier. That solution actually works, there absolutely no cycling as long as that script is running, it's basically just a wake-up script that prevents the drive from sleeping. I guess maybe to optimize it one can use hdparm to slow the cycling, and then the script can use a longer sleep time between waking the drive.
|
|
|
|
06-14-2009, 10:42 AM
|
#15
|
|
Member
Registered: Apr 2009
Distribution: Slackware
Posts: 442
Rep:
|
Quote:
Originally Posted by H_TeXMeX_H
... there absolutely no cycling as long as that script is running, it's basically just a wake-up script that prevents the drive from sleeping. I guess maybe to optimize it one can use hdparm to slow the cycling, and then the script can use a longer sleep time between waking the drive.
|
Thanks, found it:
Code:
#!/bin/bash
while [ 1 ]
do
smartctl -d ata -a /dev/sda | grep Load_Cycle_Count
sleep 3
done
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:31 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|