monitorets icon indicating copy to clipboard operation
monitorets copied to clipboard

Feature request: Power draw

Open lightonflux opened this issue 2 years ago • 3 comments
trafficstars

I would really like to see power consumption in W. Maybe with the current value as a label. So instead of "Power Draw" the label would be "12W" for the total power consuption of the system.

Problem is i don't know where to get this info. On laptops you can check /sys/class/power_supply/BAT0/power_now¹ but this does not work when plugged in or on a desktop.

1: https://unix.stackexchange.com/questions/10418/how-to-find-power-draw-in-watts

lightonflux avatar Dec 29 '22 17:12 lightonflux

According to that same stackexchange question, one could use voltage_now and current_now to derive the power consumption. In my desktop I have both available under /sys/class/power_supply/ucsi-source-psy-0-00081/.

Problem is, both are reporting 0. Can you check if you have something similar exposed and reporting something other than 0? Also, what OS and hardware setup do you have?

jorchube avatar Dec 30 '22 11:12 jorchube

I have three symlinks in power_supply:

» ls        
AC@  BAT0@  hidpp_battery_0@

BAT0 has only ./voltage_now. The other two have nothing.

The OS is Fedora (Linux 6.0) and the hardware is a Thinkpad X13 Gen 2 AMD.

And i cannot find a common interface that reports the power draw. sensors reports at least voltage:

amdgpu-pci-0500
Adapter: PCI adapter
vddgfx:      849.00 mV 
vddnb:       874.00 mV 
edge:         +41.0°C  
PPT:         1000.00 uW 

BAT0-acpi-0
Adapter: ACPI interface
in0:          17.27 V  

lightonflux avatar Dec 31 '22 16:12 lightonflux

I don't see how this can be done in a consistent way, but I'll keep an eye on it.

jorchube avatar Jan 07 '23 11:01 jorchube