Closed masroof-maindak closed 1 year ago
The percentage is read from /sys/class/power_supply/<bat name>/capacity
. Does it match with acpi
? If it doesn't, which value is the most accurate?
The percentage is read from
/sys/class/power_supply/<bat name>/capacity
. Does it match withacpi
? If it doesn't, which value is the most accurate?
The output of acpi -b does not match with that in the provided path, no. I3status' value is accurate according to the path it's supposed to be checking but I have no idea which value to refer to as the end user.
Edit: Even though the path's value is 83, and acpi's is 99, my charger's light is green, implying that my laptop is full. I therefore have reason to believe that acpi's output is correct and something's wrong with /sys/class/power_supply/<bat name>/capacity
but I have no idea how that's even possible.
Quite frankly, I'm at a loss for words. If it matters, I'm using a 2014 Macbook Pro on EndeavourOS so it MIGHT be a faulty battery issue?
Apparently this was reported in #1410, but wasn't really resolved. This can be easily solved with a simple option to ignore capacity
and force-calculate the percentage from charge_now/charge_full
or energy_now/energy_full
(it might make sense to make it the default, after all acpi
and upower
do that). In the mean time you can use the upower driver, which seems to account for that.
Apparently this was reported in #1410, but wasn't really resolved. This can be easily solved with a simple option to ignore
capacity
and force-calculate the percentage fromcharge_now/charge_full
orenergy_now/energy_full
(it might make sense to make it the default, after allacpi
andupower
do that). In the mean time you can use the upower driver, which seems to account for that.
Well that certainly makes sense. Thanks for the explanation. Just not quite sure what you meant by the 'upower driver' though. I have it installed already but I'm not sure how to 'link' it with i3status-rs if that's what you were insinuating.
I mean you can make the battery block use upower instead of sysfs:
[[block]]
block = "battery"
driver = "upower"
This is exactly what I was wondering, thanks a ton.
Fixed in 8f7e76c