Public bug reported:
Binary package hint: acpitool
In the source for acpitool 0.4.7, the definition of
Battery_Info->Technology as char[13] arbitrarily truncates the length of
the reported battery-technology, amongst other things. This leads to
acpitools reporting a battery-technology that is inconsistent with other
ACPI and hal tools which can lead to confusion when diagnosing battery-
related issues.
$ acpitool -Bv
Battery #1 : present
Remaining capacity : 15510 mWh, 26.87%
Design capacity : 57720 mWh
Last full capacity : 57720 mWh
Present rate : unknown
Charging state : discharging
Battery type : non-recharge, LiOn
At or around line 36 of src/acpitool.h:
struct Battery_Info {
int Battery_Present;
char Charging_State[12];
char Remaining_Cap[10];
char Design_Cap[10];
char LastFull_Cap[10];
char Present_Rate[10];
char Technology[13];
char Model[13];
char Serial[13];
char Bat_Type[13];
};
This limits the reported battery-technology to 13 bytes which will in
particular truncate the report of "non-rechargeable" to "non-recharge".
The reporting line in battery.cpp then displays the truncated message:
cout<<" Battery type : "<<Batt_Info[i]->Technology<<",
"<<Batt_Info[i]->Bat_Type<<endl;
On the face if it this looks cosmetic but when trying to diagnose an
ACPI problem where ACPI battery-technology is reported as "non-recharge"
but hal reports the battery as rechargeable, this truncation caused
confusion over where the reported string was originating and diverted
effort into determining where the various reports originated from.
** Affects: acpitool (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
Incorrect Truncation of Battery-Type report
https://bugs.launchpad.net/bugs/120708
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs