I already installed and configured laptop-mode-tools, but i want to set up that at 10%-20% battery it plays a sound, and at 5%-10% it shutdown the computer, i dont want it to suspend
Another question, if i run powertop, and follow the instructions the keybindings says, will they remain when you reboot?
thankyou all
]]>On my laptop (Toshiba Satellite A35) enabling laptop-mode-tools with spindown delay set to 20 seconds reduces power draw by about 0.7W compared to having the hard drive running constantly. It's not a great amount, but it helps. I mostly like it because it has a side effect of making the laptop completely silent and in many cases I can run what I need from memory for long periods of time -- provided I'm doing something simple like editing a document, or having a document opened for reference.
I'm also using preload and a have a bunch of dirs (/tmp, /var/log) mounted as tmpfs.
As far as resuming is concerned -- I've configured pm-utils to restart laptop-mode-tools after system wakes up from suspend/hibernate. Just a simple script in /etc/pm/sleep.d.
]]>I'd changed my mind about hd spin downs -- I do want the hard drive to spin down, the whole laptop is set up to use the hard drive as little as possible in order to save battery and reduce noise.
Now I just use laptop-mode-tools with, pretty much, default settings as far as hard drive management is concerned.
Can you please specify what you did exactly to reduce power comsumption and what you use for HD management? Do you have experiences about the amount of power that can be saved?
I'm also a bit irritated about the "right" settings concerning spin-downs and life reduction of the HD (I allready read the thread about this topic).
\edit: Are the settings of laptop mode set correctly after resume or do you have to use the script mentioned in the wiki?
Thanks
]]>I don't remember why I had these hdparm commands in rc.local -- you're right, it doesn't make a whole lot of sense.
Also, since then I'd changed my mind about hd spin downs -- I do want the hard drive to spin down, the whole laptop is set up to use the hard drive as little as possible in order to save battery and reduce noise.
Now I just use laptop-mode-tools with, pretty much, default settings as far as hard drive management is concerned.
Sorry, I don't know the answer to your hdparm question.
]]>This is what I have in my laptop-mode.conf
# Should laptop mode tools control the hard drive power management settings?
#
CONTROL_HD_POWERMGMT=1
#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=254
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=255This in my rc.local:
# Turn hard drive spin downs off
hdparm -B 254 /dev/sda > /dev/null
hdparm -S 241 /dev/sda > /dev/nullI also noticed that suspend and hibernate reset hdparm settings so I use scripts as wrappers for the suspend and hibernate command and add the commands from rc.local to each script (after suspend/hibernate command).
This effectively stops the hard drive spin downs on my laptop. You might want to play with the hdparm values -- it seems to work slightly differently for different hard drive types.
Sorry for digging out this thread but I wanted to know why one has to adjust hdparm twice. Once in laptop mode tolls and once in rc.local.
Doesn't laptop mode alone set hdparm correctly?
Another question is about the "risk" of the option -S. I've read many threads about -B (I use hdparm -B 254 /dev/sda > /dev/null in my rc.local as well) but don't know how -S can affect the HDs lifetime.
Thanks!
]]>Only powermanagement that I currently use is cpu-scaling. Hmm I think I'll give laptop-mode a go, assuming that the defaults for laptop mode are safe-ish?
Edit:
How do I actually get laptop mode going? I have installed it (ofc) and edited the /etc/laptop-mode/laptop-mode.conf, but when calling /usr/sbin/laptop_mode, no matter if on ac or battery, I get "Laptop mode disabled, not active [unchanged]"Edit:
Do I just start the laptop-mode daemon in rc.conf, then call /usr/sbin/laptop_mode auto when something happens?
Just add "laptop-mode" to the DAEMONS array in rc.conf. You can also start it manually with /etc/rc.d/laptop-mode start.
]]>Edit:
How do I actually get laptop mode going? I have installed it (ofc) and edited the /etc/laptop-mode/laptop-mode.conf, but when calling /usr/sbin/laptop_mode, no matter if on ac or battery, I get "Laptop mode disabled, not active [unchanged]"
Edit:
Do I just start the laptop-mode daemon in rc.conf, then call /usr/sbin/laptop_mode auto when something happens?
If you don't want laptop-mode to control the powersaving features of your hd then just tell it not to (CONTROL_HD_POWERMGMT=0) -- although you can also use laptop-mode to override the default spin down settings of your hd (yes, your hd most likely spins down by default; this is how its designed, and this is what its firmware tells it to do) -- in order to disable spin downs completely.
If you use another powersaving tool then you might just as well use the script from the gentoo wiki.
]]>EDIT: I just noticed you rc.local
I just add this to mine:
hdparm -B 255 /dev/sda
Isn't that enough ?
]]>Correct me if I'm wrong, but doesn't using disk power management shorten the disks lifespan ? It can only spin so many times....
It is debatable -- but I disable it anyways (this is what the procedure described in my previous post accomplishes).
If you don't set anything explicitly your laptop hard drive is spinning down by default, and usually quite aggressively. This is why enabling HD power management in laptop mode tools can actually help -- you let it "control" hd power management and you use that control to disable it.
You can read more about the debate here: http://bbs.archlinux.org/viewtopic.php?id=39258