Vitals icon indicating copy to clipboard operation
Vitals copied to clipboard

Battery/Voltage showing No Data though GNOME Power Statistics fully populated

Open Saijin-Naib opened this issue 4 years ago • 6 comments
trafficstars

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:

  1. Go to Vitals
  2. Click on Voltage or Battery
  3. Observe No Data
  4. Open GNOME Power Statistics
  5. Observe full data

Expected behavior Vitals will be able to report battery/voltage information that my platform is reporting to GNOME.

Screenshots image

Desktop (please complete the following information): Alpine Linux Edge 3.14.1 with Linux-LTS GNOME 40.4

Saijin-Naib avatar Aug 20 '21 06:08 Saijin-Naib

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.

corecoding avatar Aug 20 '21 13:08 corecoding

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.

Saijin-Naib avatar Aug 20 '21 19:08 Saijin-Naib

Can you share some of your directory and sub directories under /sys/class/power_supply/ ?

corecoding avatar Sep 20 '21 12:09 corecoding

$ 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

Saijin-Naib avatar Sep 20 '21 15:09 Saijin-Naib

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)

corecoding avatar Oct 04 '21 11:10 corecoding

I am having the same issue.

stark1tty avatar Feb 22 '22 22:02 stark1tty

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.

corecoding avatar Dec 11 '22 00:12 corecoding