I would like to run a few commands when my laptop is using battery
power. I managed to write an ACPI script which is duly executed by acpid
every time the AC adapter is connected/disconnected, but for some
reason, my values are overwritten by something else.
Same happened before when I was setting the values as default using an
init script, the settings were correct until I plugged out the ac
adapter or plugged it in. Every time I did that, the values reset to
default.
Can someone please hint me in the right direction to as what
application might be overwriting my values on ac adapter events? No
other ACPI script seems to touch anything of those values.
These are the commands I’m trying to run, and AT LEAST the
/proc/sys/vm entries are overwritten by something else to default (500
and 0) every time an ac adapter event occurs.
echo min_power >
/sys/class/scsi_host/host0/link_power_management_policy
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 5 > /proc/sys/vm/laptop_mode
echo 7 > /sys/bus/pci/drivers/iwl3945/0000:03:00.0/power_level
/usr/bin/hal-disable-polling --device /dev/scd0
echo “disable” > /proc/acpi/ibm/bluetooth
/sbin/hdparm -q -S 60 /dev/sda
If you’re on KDE, then it’s kpowersave: if you right-click on its icon
in system tray and configure it, you’ll see there’s a default power
saving scheme for “AC” and a default power scheme for “battery”. They
get invoked automatically each time you plug or unplug the power cord.
You may be able to disable that or, alternatively, disable kpowersave
altogether.
– http://stopsoftwarepatents.eu/ Even if free software were crap, it should still get our preference
over the non-free crap secreted by IT corporations.
-A free rephrasing of RMS-
JosipBroz;1918993 Wrote:
> If you’re on KDE, then it’s kpowersave: if you right-click on its icon
> in system tray and configure it, you’ll see there’s a default power
> saving scheme for “AC” and a default power scheme for “battery”. They
> get invoked automatically each time you plug or unplug the power cord.
> You may be able to disable that or, alternatively, disable kpowersave
> altogether.
Thanks for your answer, but I’m using GNOME, and I can’t seem to find
any settings in the gnome power manager about that.
Any further ideas?
Nevermind,I just installed laptop_mode-tools which does pretty much
everything I need and even more.
The version shipping with openSUSE 11.1 is a bit outdated and hasn’t as
many “plugins” as the new version on the official page, so anyone who
reads this might want to check out the official page.