After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 111089 - Battstat doesn't work with 2.4.20 ACPI
Battstat doesn't work with 2.4.20 ACPI
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: battery
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 114936 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-04-18 15:49 UTC by Alvaro del Castillo
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Solve the problem looking for the battery status info (1.11 KB, patch)
2003-04-18 15:51 UTC, Alvaro del Castillo
none Details | Review

Description Alvaro del Castillo 2003-04-18 15:49:48 UTC
Here is a patch to correct it
Comment 1 Alvaro del Castillo 2003-04-18 15:51:14 UTC
Created attachment 15833 [details] [review]
Solve the problem looking for the battery status info
Comment 2 Kevin Vandersloot 2003-04-19 13:53:29 UTC
Is this the same bug as #104160?
Comment 3 Manuel Clos 2003-04-22 19:06:43 UTC
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.
Comment 4 Kevin Vandersloot 2003-04-25 01:43:16 UTC
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?
Comment 5 Kevin Vandersloot 2003-06-25 23:57:37 UTC
*** Bug 114936 has been marked as a duplicate of this bug. ***
Comment 6 Kevin Vandersloot 2003-06-25 23:59:32 UTC
Alvaro. Can you respond to my question?
Comment 7 Kevin Vandersloot 2003-07-26 21:58:55 UTC
I went ahead and committed this patch. Hopefully it won't cause any
problems :)
Comment 8 Kevin Vandersloot 2003-07-28 15:08:30 UTC
Kjartaan: I meant that you should probably commit this patch to the
gnome-2-2 branch.
Comment 9 Alvaro del Castillo 2003-07-28 15:29:21 UTC
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.
Comment 10 Kevin Vandersloot 2003-07-28 18:42:51 UTC
Alvaro: That sounds reasonable. Could you make a patch?
Comment 11 Kjartan Maraas 2003-07-29 00:00:16 UTC
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 :-/
Comment 12 Kjartan Maraas 2003-07-29 00:01:34 UTC
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.
Comment 13 Kjartan Maraas 2003-10-05 23:06:49 UTC
I was confused and hadn't loaded ac.o and battery.o. Closing again.