[Bug 260214] acpi_battery: Should provide current/max battery charge in Wh (wine expects them)
Date: Sun, 05 Dec 2021 03:47:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260214
--- Comment #2 from Damjan Jovanovic <damjan.jov@gmail.com> ---
(In reply to Kubilay Kocak from comment #1)
There's only 6 sysctls in hw.acpi.battery, and they're useful to compare
between a working battery on a new laptop, and a broken battery on an old
laptop, while charging and discharging, so I'll post them inline:
Broken Working Working
battery battery battery
AC power discharging AC power
hw.acpi.battery.info_expire 5 5 5
hw.acpi.battery.units 1 1 1
hw.acpi.battery.state 0 1 2
hw.acpi.battery.rate 0 11959 0
hw.acpi.battery.time -1 97 -1
hw.acpi.battery.life 0 72 44
time == -1 and rate == 0 can't be used to calculate battery capacity Wh while
charging (not that they're particularly accurate even when discharging; the
life% especially lacks sufficient granularity).
Yes, the ioctl is better, but /dev/acpi is owned by root:operator, and even
though it's
crw-rw-r--
when I successfully open it as non-root user with O_RDONLY, the ioctl() gets:
ioctl: Operation not permitted
--
You are receiving this mail because:
You are the assignee for the bug.