[Bug 260214] [wine] acpi_battery should provide current/max battery charge in Wh

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 04 Dec 2021 13:23:37 UTC

            Bug ID: 260214
           Summary: [wine] acpi_battery should provide current/max battery
                    charge in Wh
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: damjan.jov@gmail.com

We currently have these power level related acpi_battery sysctls:
hw.acpi.battery.rate in mW
hw.acpi.battery.time in minutes
hw.acpi.battery.life in %

While discharging, the maximum battery capacity in Wh can be calculated from
those, as per below. But there is no way to determine current or maximum
battery capacity when not discharging, as time == -1, and rate could be 0.
Can't we have sysctls for that too? Windows and Linux and Mac provide this, and
Wine expects them.

Remaining capacity
= rate (mW) * time (minutes)
= (rate/1000 (Watts or Joules/second)) * (60*time (seconds))
= rate/1000*60*time (Joules)
= rate/1000*60*time/3600 (in Wh)

Total capacity = remaining capacity / life * 100 Wh

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