Vitals
Vitals copied to clipboard
Battery/Voltage showing No Data though GNOME Power Statistics fully populated
Describe the bug I read the wiki entry about how Vitals polls the /proc/sys/ directory. However, GNOME Power Statistics fully populates power information for my platform, though I'm not sure what/how it reads this.
To Reproduce Steps to reproduce the behavior:
- Go to Vitals
- Click on Voltage or Battery
- Observe No Data
- Open GNOME Power Statistics
- Observe full data
Expected behavior Vitals will be able to report battery/voltage information that my platform is reporting to GNOME.
Screenshots

Desktop (please complete the following information): Alpine Linux Edge 3.14.1 with Linux-LTS GNOME 40.4
If you go into Vitals settings, you can change the battery slot that it references. There is a cog icon near battery. Please let me know if you tried this.
Yep, I tried BAT0 through CMB0. No change.
Is it possible I'm missing a library/program? I do know that with my EliteBook 2740p, Vitals under Alpine Linux GNOME reported everything just fine.
Can you share some of your directory and sub directories under /sys/class/power_supply/ ?
$ ls /sys/class/power_supply/
ADP1@ BAT0@
ls /sys/class/power_supply/ADP1/
device@ power/ subsystem@ wakeup48/ online type uevent
ls /sys/class/power_supply/BAT0/
device@ cycle_count power_now uevent
power/ energy_full present voltage_min_design
subsystem@ energy_full_design serial_number voltage_now
alarm energy_now status
capacity manufacturer technology
capacity_level model_name type
If you take a look at the link below, you can see the alternate path when the file/sensor "charge_full" doesn't exist. The alternate path checks files energy_full, voltage_min_design, energy_full_design, voltage_now, power_now, and energy_now. According to your screenshot, you do have those files so it should be working on BAT0.
https://github.com/corecoding/Vitals/blob/c2656f895ab5f6c7e27cdc49149ea54bee23b393/sensors.js#L304-L331
It is really hard to debug an issue like this when I don't have access to your hardware. If you want to attempt to debug it yourself, the first thing you have to do is use global.log('testing'); for example to step through the code to see if it is even getting to that section. With Gnome, it is a little hard to debug especially when using Wayland, as each change to sensors.js you have to restart Gnome Shell to see those changes. The output of global.log goes to /var/log/messages (or syslog)
I am having the same issue.
I have changed how the battery status is checked in the app. This was part of issue #301. The change wasn't intended to address this ticket, but there is a chance it might. If this doesn't fix this ticket, as I said above I will need someone to create a PR with code changes, as I don't have access to your hardware/system. Going to close this ticket, hoping that the issue above fixes it - otherwise I'll open this ticket back up when I see a PR.