Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2018 01:53:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 229818] apm(8) The total battery percentage is incorrect for multiple batteries
Message-ID:  <bug-229818-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229818

            Bug ID: 229818
           Summary: apm(8) The total battery percentage is incorrect for
                    multiple batteries
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: kd-dev@pm.me
 Attachment #195185 text/plain
         mime type:

Created attachment 195185
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D195185&action=
=3Dedit
Produce the total battery percentage from the capacity totals rather than t=
he
other percentages

The total "Remaining battery life" field is the average of the
per-battery "Remaining battery life" fields, rather than the
percentage of the remaining battery life relative to the
maximum battery life.

Contrived expected output:

        APM version: 1.2
        APM Management: Disabled
        AC Line status: off-line
        Battery Status: high
        Remaining battery life: 50%
        Remaining battery time:  4:00:00
        Number of batteries: 2
        Battery 0:
                Battery Status: high
                Remaining battery life: 100%
                Remaining battery time:  3:00:00
        Battery 1:
                Battery Status: low
                Remaining battery life: 20%
                Remaining battery time:  1:00:00

Contrived example output:

        APM version: 1.2
        APM Management: Disabled
        AC Line status: off-line
        Battery Status: high
        Remaining battery life: 60%
        Remaining battery time:  4:00:00
        Number of batteries: 2
        Battery 0:
                Battery Status: high
                Remaining battery life: 100%
                Remaining battery time:  3:00:00
        Battery 1:
                Battery Status: low
                Remaining battery life: 20%
                Remaining battery time:  1:00:00


The included patch changes the way that value is generated to be from
the sum-totals of the current and last-full battery capacities.  This
replaces the current behavior of averaging the percentages produced from
each battery.

The included patch was tested on an amd64 version of
FreeBSD 12.0-CURRENT r336075.  It builds and runs
without any warnings nor errors.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229818-227>