The default battery.sh script for setting the speedfreq option of to change the current policy to either performance or powersave only checks for BAT1. Most laptops use BAT0 instead of BAT1. I feel it should check the status of either of BAT0 or BAT1 to change the speedfreq policy. The following patch adds support for BAT0 as well. 14,27d13 < BAT0) < if [ $4 -eq 00000001 ] && [ -f /proc/acpi/battery/BAT0/state ] ; then < action="`cat /proc/acpi/battery/BAT0/state | grep charging | cut -c 26-`" < case $action in < charging) /usr/bin/speedfreq -p performance < logger "A/C adapter plugged in" < ;; < discharging) /usr/bin/speedfreq -p powersave < logger "A/C adapter plugged out" < ;; < esac < fi < ;; <
Could you please attach a unified diff instead? Thanks :)
Created attachment 41337 [details, diff] Patch to check for BAT0 status as many Laptops use BAT0 instead of BAT1
hrm... Now I was gonna go add this patch cause I agree with it however I came across one serious issue... battery.sh isn't created by acpid. it's created by speedfreq. Check with a quick qpkg -f /etc/acpi/battery.sh which package created yours.
True, sorry about that. Speedfreq does create that file. I am sorry that I filed that bug against acpid. I should I file it agains speedfreq. What do I need to do, do I need to refile this bug against speedfreq.
new revision of speedfreq should hit a mirror near you soon.