On Tue, 3 Nov 2009, Karol Babioch wrote:
I'm now wondering whether this is "normal"? I guess so, as the hard
drive gets disabled during the suspend, and after a wake-up it gets
re-enabled, so any changed made with hdparm don't get stored. Is this
intention right?
Your BIOS probably resets it to 127.
Secondly I want to know what would be the right file (place) to fix
this. I'll have to execute the hdparm command again, but don't quite
know where to put it, or at least where it should be put ;).
I just replied to another e-mail from you, regarding pm-utils... and I
said that it exposes a nice way for writing your own hooks. For example
you create an executable hook (script)
/etc/pm/sleep.d/03disk-power-management with contents:
#!/bin/sh
#
# Set HDD advanced power management to it's lowest value.
case "$1" in
thaw|resume)
/sbin/hdparm -B 254 /dev/sda >/dev/null
;;
*)
;;
esac
Notice I prefixed the name with 03. You can see other pm-utils hooks in
/usr/lib/pm-utils. When machine is suspending they are executed by the
order of their names, on resume they are executed in reverse. Above hook
does nothing on suspend or hibernate, but when waking up it is executed,
at the end. Usual practice is that hardware hooks have low or high
numbers (depending on what they do) and those dealing with software are
in between.
--
Adrian C. (anrxc) | anrxc..sysphere.org | PGP ID: D20A0618
PGP FP: 02A5 628A D8EE 2A93 996E 929F D5CB 31B7 D20A 0618