GNOME Bugzilla – Bug 111089
Battstat doesn't work with 2.4.20 ACPI
Last modified: 2004-12-22 21:47:04 UTC
Here is a patch to correct it
Created attachment 15833 [details] [review] Solve the problem looking for the battery status info
Is this the same bug as #104160?
Not, this is not the same bug as 104160. Anyway, bug 104160 is better for my comments. This patch is also needed along with the one I have attached to bug 104160.
I'm not sure this patch works correctly. Is it true that for acpi_ver < (gulong)20020208 the batt_state_state should be "status"? Did this change in the 20020208 version or a later version?
*** Bug 114936 has been marked as a duplicate of this bug. ***
Alvaro. Can you respond to my question?
I went ahead and committed this patch. Hopefully it won't cause any problems :)
Kjartaan: I meant that you should probably commit this patch to the gnome-2-2 branch.
Kmaraas sorry for not answer you before. I think the best solution isn't to look for differents files with the battery state depending in the kernel acpi version. We have 2 possible files so the best solution is try open file A (state) and if it fails, try to open file B (status). Maybe I can send a patch with this corrections. Cheers and thanks for your work and your time.
Alvaro: That sounds reasonable. Could you make a patch?
This is how my /proc/acpi looks: [kmaraas@localhost acpi]$ ls alarm button embedded_controller fadt power_resource asus dsdt event info sleep [kmaraas@localhost acpi]$ cat info version: 20030619 states: S0 S3 S4 S5 [kmaraas@localhost power_resource]$ pwd /proc/acpi/power_resource [kmaraas@localhost power_resource]$ ls C0E4 C158 C16C C170 C174 C17D C1EE C1EF C1F0 C1F1 I can't even find a file that gives me remaining battery in here :-/
One last thing: the file 'state' looks like this: [kmaraas@localhost power_resource]$ cat C0E4/state state: on system level: S0 order: 0 reference count: 0 Reopening this since there's discussion going on here still.
I was confused and hadn't loaded ac.o and battery.o. Closing again.