qnx l33t
Joined: 25 Jun 2002 Posts: 638 Location: Göteborg, Sweden
|
Posted: Fri Jan 03, 2003 1:10 pm Post subject: Spin down HDD on suspend |
|
|
Hi!
First of all: I have a stationar computer, no laptop.
I want to suspend my computer sometimes. So I run
and it works well. Except one thing, harddisk drive is still going on.....
I read man hdparm and found out that
Code: | hdparm -S 1 /dev/hda | spins down the drive after 5 seconds, or even better
which spins down the drive immediately. (Actually it's not important, I can wait 5 seconds or so).
So I wrote a script (/usr/local/bin/sus):
Code: | #!/bin/sh
sudo hdparm -S 1 /dev/hda
sudo apm -s |
This one works FINE. Everything shots/spins down and it's very silent. But when I leater resume and start working again, I have to set the spin down time by hand, by typing
(which is vendor default spin down time).
After some time I found out that inside /etc/apm there were 3 directories, two of them looks intressting: suspend.d and resume.d . So I put a script in each of these, to spin down on suspend and reset hdparm -S on resume. I thought that everything in suspend.d was run when , and vice versa (resume.d on resuming).
BUT! Nothing happens! It seems like apm -s is not even looking what's in those directiories! What's wrong?? Any ideas??
Kindest regards, Jacob _________________ Registred Linux user #191143!
Abit NF7-S rev. 2.00 (BIOS v. 2.7)
AMD AthlonXP 2500+ (Barton)
PATA Seagate ST3120022A
SATA Seagate ST3200822AS & Silicon Image 3112 chipset
Gentoo Linux |
|