Vanilla-OS / vanilla-system-operator

VSO is an utility which allows you to perform maintenance tasks on your Vanilla OS installation.
GNU General Public License v3.0
31 stars 15 forks source link

acpi battery checks don't account for multiple batteries #7

Closed bketelsen closed 1 year ago

bketelsen commented 1 year ago

my Surface Laptop 3 reports two batteries, one of which is probably a bug, but the other is valid and fully charged.

vso's acpi check doesn't account for multiple batteries, which are common in surface devices, and other laptops.

Battery 0: Discharging, 0%, rate information unavailable
Battery 1: Full, 100%
root@vanilla:/etc/vso# 
mirkobrombin commented 1 year ago

I wonder if there is a more robust way of doing this check. Maybe reading directly from /sys

bketelsen commented 1 year ago

How about I write a go wrapper lib for upower?

mirkobrombin commented 1 year ago

This would be the perfect solution but will also take more time

bketelsen commented 1 year ago

but it would be my time, not yours :) another option that would be faster is to read /sys/class/power_supply directly. That might be just an hour or two of work.

mirkobrombin commented 1 year ago

but it would be my time, not yours :)

oh :eyes:

another option that would be faster is to read /sys/class/power_supply directly. That might be just an hour or two of work.

this is also a good option. At this point I would say that both are great solutions.

bketelsen commented 1 year ago

on second thought, this is too small for a useful package, I'll PR to this repo.