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 150899 - AC powered system says 'running on battery power'
AC powered system says 'running on battery power'
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: battery
git master
Other Linux
: Normal minor
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-24 01:16 UTC by Steve Fox
Modified: 2005-05-10 05:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
possible fix (886 bytes, patch)
2004-08-24 03:09 UTC, Danielle Madeley
none Details | Review
patch. (968 bytes, patch)
2005-05-08 19:24 UTC, Allison Karlitskaya (desrt)
accepted-commit_now Details | Review

Description Steve Fox 2004-08-24 01:16:49 UTC
When running the battery charge applet on a PC (no battery), the tooltip says
"System is running on battery power. Battery: Not present" which is obviously
contradictory. I believe the first sentence should be removed.
Comment 1 Danielle Madeley 2004-08-24 03:02:47 UTC
This combination (the technically impossible one) comes about if you have no
battery present (fair enough), but your AC status is offline (this is probably
considered the case if your /proc/acpi/ac_adapter is empty).

Personally I consider this to really be a bug in the linux ACPI code (your AC
adapter should report online, when on mains power). However it's probably
easiest to work around it.
Comment 2 Danielle Madeley 2004-08-24 03:09:34 UTC
Created attachment 30882 [details] [review]
possible fix

This patch might be enough to fix it. It seems to still allow it to operate
correctly on my laptop. I don't own a desktop computer to test it on though.

Can someone with a desktop please test this patch out.
Comment 3 Eion Robb 2005-03-02 00:38:11 UTC
I have a similar issue that fits under this bug's summary: when I first start 
the battery charge applet it always says that it is running on battery power 
(whether it is or not).  To fix it, I have to kill it.  Gnome informs me that 
the applet unexpectedly and would I like to restart it.  I say yes and from then 
on it works normally, even the next time i log-in/start the program.
Comment 4 Allison Karlitskaya (desrt) 2005-05-08 19:13:24 UTC
Davyd: you patch doesn't fix the problem on my desktop.
Comment 5 Allison Karlitskaya (desrt) 2005-05-08 19:24:49 UTC
Created attachment 46181 [details] [review]
patch.

The problem is not that hash == NULL, but rather that that code is never even
run (since the directory is empty, it doesn't even try to open any files).

This patch records whether or not we have an adaptor present and if not, then
assumes that we're on a desktop.

This works for me on my desktop:
"System is running on AC power
 No battery present"

My laptop (Powerbook) doesn't use ACPI so I need someone else to test this.
Comment 6 Danielle Madeley 2005-05-09 06:35:30 UTC
This looks fine.
Comment 7 Allison Karlitskaya (desrt) 2005-05-10 05:34:16 UTC
Fix commited to HEAD.