! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
current_now may contain useful negative rates while discharging
Status:
RESOLVED: MOVED
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description xfce_bugzilla 2012-03-23 14:37:46 CET
Some battery drivers are reporting a negative rate in /sys/class/power_supply/BAT0/current_now (replace BAT0 with your battery) such as the bq27x00-battery driver and the kernel for the toshiba ac100 (tegra 2 soc). In the two cases, the current_now contains a useful rate (i.e. no error code).

A negative rate in current_now however, is interpreted by the xfce4-battery-plugin as an error such that remaining time is not displayed correctly.

This could be fixed by adding abs() panel-plugin/libacpi.c around line 793 together with considering the value -1000 as a not present rate.

The upower-daemon, for instance, also applies abs() to this value.

AFAIK, the acpi specification does not allow negative rates but int the linux power supply class documentation, there seems to be currently no statement about the sign.
Comment 1 Landry Breuil editbugs 2014-11-23 21:43:02 CET
Mass-reassign all bugs from florian@ to goodies-dev@, thanks for the maintenance work! (and sorry for the bugmail spam..)
Comment 2 Git Bot editbugs 2020-05-22 23:07:57 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/panel-plugins/xfce4-battery-plugin/-/issues/3.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #8594

Reported by:
xfce_bugzilla
Reported on: 2012-03-23
Last modified on: 2020-05-22

People

Assignee:
Xfce-Goodies Maintainers
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information