Apparently, though unproven, at 23:09 on Monday 31 January 2011, Nils Holland did opine thusly:
> 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. Running KDE with PowerDevil perhaps? > > 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 -- alan dot mckinnon at gmail dot com

