Fedora May Be Killing Your Laptop's Hard Drive?
Andy Green
andy at warmcat.com
Sun Nov 11 21:42:37 UTC 2007
Somebody in the thread at some point said:
> On Fri, 2007-11-02 at 10:08 +0000, Andy Green wrote:
>> # hdparm -B 192 /dev/sda
>>
>> for a similar Toshiba drive to mine, and sure enough it stops the
>> Load_Cycle count cranking up here along with the clicking I have
>> suddenly become extremely sensitized to.
>>
>> Apparently you should stick it in /etc/rc.local to make it stick.
>
> I did get around to doing that, quite a while ago. But I set it at 255,
> to turn it off completely. Though, it doesn't accept that, and the
> value reads back as set at 254 (and disabled). Anyway, it did the trick
> of stopping the drive clunking off every few seconds.
Great.
> However, that only solves the problem on a system that's booted up. If
> I wake a computer up from hibernation, rc.local isn't executed, and the
> drive comes up with its default bad values. Is there a similar script
> that's run after de-hibernation? (Suspend to disk, in this case.)
/etc/pm/hooks/
seems to be a place that is like /etc/init.d but for suspend and resume
-- I guess the same for Hibernate. For example I have one guy in there
called "99resolution" I see:
#!/bin/sh
case "$1" in
thaw|resume)
{ /sbin/service 915resolution start ; } 2>/dev/null
;;
*)
;;
esac
exit $?
It's pretty clear that copying that into a file
"/etc/pm/hooks/50stophddclick" and replacing the { /sbin/service...null
part with
hdparm -B 192 /dev/sda
or 254 or whatever your magic number was would be a good bet for getting
run on resume or "thaw"... I guess that is specifically what it is run
with when coming out of hibernate.
-Andy
More information about the fedora-list
mailing list