public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] HDD with too aggressive power management
@ 2011-01-31 21:09 Nils Holland
  2011-01-31 21:31 ` Paul Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nils Holland @ 2011-01-31 21:09 UTC (permalink / raw
  To: gentoo-user

Hi folks,

I've got an Asus X7BJ-something laptop here that by default (i.e. when
installing plain Gentoo on it) seems to do too aggressive power
management for its hard drive. That is, already after only about five
seconds(!!) of inactivity, the HDD spins down. This is kind of insane
- you edit some small file, only half a minute later when you save it,
you have to wait for what feels like ages for your HDD to spin back up
and actually do something. ;-)

The first thing I tried was having a look at the BIOS to see if HDD
power management can be disable there. But no sir, no such option. Ok,
no problem I thought, and emerged "hdparm", which I have added to my
default runlevel, so that it gets executed with the arguments "-B 254
-S 0" upon each boot. That seems to fix it, HDD power management is
off and no more unwanted spindowns occur.

However, now comes the problem: It seems that whenever I change from
wall power to battery power (probably also vice versa, but I haven't
tested this often enough), the machine's HDD forgets about the
settings I've made using "hdparm" and starts spinning down right again
after only a few seconds of inactivity. That sucks.

Of course, manually executing "hdparm -B 254 -S 0 /dev/sda" after
unplugging the machine fixes the issue again. However, something more
"automated" would be prefered.

First thing, I'm wondering if the change in power management
parameters is actually caused by something at the OS level. I haven't
set up any such thing explicitly, so I believe that it's something the
machine just "does" outside of the OS's control. As it can be
overridden by executing "hdparm" manually, what I would need is probably
a place where I can hook in with a little shell script that gets
executed every time the system's power source changes, and does
nothing else than just execute "hdparm" with the appripriate
parameters. So much about the theory, but then I don't really have an
idea what I'd have to do to get a script to run every time the power
source changes. And that's why I'm writing this message, as any
suggestions that could point me into the right direction are very
welcome. ;-)

Greetings and thanks in advance,
Nils

-- 
Nils Holland * Ti Systems, Wunsorf-Luthe (Germany)
Powered by GNU/Linux since 1998



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-02 21:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 21:09 [gentoo-user] HDD with too aggressive power management Nils Holland
2011-01-31 21:31 ` Paul Hartman
2011-01-31 22:16 ` Alan McKinnon
2011-01-31 23:08 ` Iain Buchanan
2011-02-01 21:08   ` Nils Holland
2011-02-02 20:44     ` Nils Holland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox