[Bug 270123] Re: Wrong battery status

linuxrules 270123 at bugs.launchpad.net
Wed Oct 6 00:11:04 UTC 2010


would this help


save this as /etc/acpi/battery.sh
in a root shell run: chmod +x /etc/acpi/battery.sh

#!/bin/sh
# UGLY HACK

AC_state=/proc/acpi/ac_adapter/AC/state

if grep -q "on-line" ${AC_state} ; then

    hal-set-property --udi `hal-find-by-capability --capability
ac_adapter` --key ac_adapter.present --bool true

else

    hal-set-property --udi `hal-find-by-capability --capability
ac_adapter` --key ac_adapter.present --bool false

fi
linuxrules said 7 minutes ago:

if code is in battery.sh add to top (below #!/bin/sh)

# UGLY HACK

AC_state=/proc/acpi/ac_adapter/AC/state

if grep -q "on-line" ${AC_state} ; then

    hal-set-property --udi `hal-find-by-capability --capability
ac_adapter` --key ac_adapter.present --bool true

else

    hal-set-property --udi `hal-find-by-capability --capability
ac_adapter` --key ac_adapter.present --bool false

fi

-- 
Wrong battery status
https://bugs.launchpad.net/bugs/270123
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list