SlackwareThis 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.
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 06:13 AM..
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 04:06 PM..
Reason: fixed output of hdparm
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.
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:
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 12:01 PM..
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 .
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.
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
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.
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.
... 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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.