FS#22078 - [ibam] assumes wrong battery in /sys/class/power_supply -- have fix
Attached to Project:
Community Packages
Opened by Adrian Todd (solarshado) - Monday, 13 December 2010, 10:06 GMT
Last edited by Balló György (City-busz) - Sunday, 08 September 2013, 00:01 GMT
Opened by Adrian Todd (solarshado) - Monday, 13 December 2010, 10:06 GMT
Last edited by Balló György (City-busz) - Sunday, 08 September 2013, 00:01 GMT
|
Details
Description:
After a kernel update a few weeks ago (I didn't notice version numbers...) ibam stopped working. Instead of the expected output it just dumped "No apm data available." I suspect the kernel update removed /proc/acpi/info. After examining ibam's source, I found that it tries to open "/sys/class/power_supply/BAT1/charge_full". A quick edit later so it tries "BAT0/energy_full" instead and it works fine. The problem is only where it determines which method of gathering data to use... Source file: ibam.inl, line 962 A proper fix would require a bit more effort; I know the names of battery devices vary, but I'm not sure what pattern there is to them. Upstream looks dead; last activity was over 3 months ago. Package versions: * ibam 0.5.2-2 * kernel26 2.6.36.2-1 (current, problem first appeared earlier) Known to affect x86_64, I see no reason it wouldn't affect i686 as well. Steps to reproduce: 1. install ibam from [community] 2. run ibam Fix: 1. download ibam source: http://prdownloads.sourceforge.net/ibam/ibam-0.5.2.tar.gz 2. edit line 962 of ibam.inl to open "/BAT{your number}/energy_full" 3. compile and run with "./ibam" (My first bug-report, sorry if it's i bit disorganized...) |
This task depends upon
Closed by Balló György (City-busz)
Sunday, 08 September 2013, 00:01 GMT
Reason for closing: Fixed
Additional comments about closing: ibam 0.5.2-6
Sunday, 08 September 2013, 00:01 GMT
Reason for closing: Fixed
Additional comments about closing: ibam 0.5.2-6
Who knows, maybe you could resurrect the beast :)
after a closer look at the sourceforge activity log, the last developer activity was almost a year and a half ago...
oh, and i made a patch. simple, not a great solution, but works for me.
"$ ls /sys/class/power_supply"
AFAIK it should work with the stock Arch kernel. Probably any system using sysfs.
I don't think upstream is active anymore; I've contacted the project leader via Sourceforge.
Thanks.