scaphandre icon indicating copy to clipboard operation
scaphandre copied to clipboard

Initiating power usage evaluation of screens

Open bpetit opened this issue 1 year ago • 4 comments

Problem

Today Scaphandre can be useful mostly for servers (even if there is still work todo on hard drives, fans, etc.). Laptops, and desktop computers are not properly covered as is doesn't allow to get data on screens nor their power usage (which is a pretty important part of power usage, especially for external screens). To be able to give insights about power usage in the laptop/desktop world, being able to at least estimate the power used by screens and add it to the metrics would be necessary.

Solution

As a first step, we could at least gather the list of screens detected on the system (their manufacturer/size and technology), then apply an estimation based on specialized litterature (like an energy per inch impact factor). Even if the estimated power usage metric is not used, gathering the informations regarding the screen(s) would be useful for estimations made outside of scaphandre.

Alternatives

Every insight or idea on this is welcome, please comment.

Additional context

This would be one of the needed steps to be able to make power usage metrics accessible to less technical people, through a GUI for example (now that we can run scaphandre on windows...)

bpetit avatar Mar 28 '23 10:03 bpetit

Note that on some recent laptops, the consumption of the whole machine*, including the screen, is reported by RAPL in intel-rapl:1. *or almost: I've used a powermeter to compare

TheElectronWill avatar Mar 29 '23 16:03 TheElectronWill

Note that on some recent laptops, the consumption of the whole machine*, including the screen, is reported by RAPL in intel-rapl:1. *or almost: I've used a powermeter to compare

@TheElectronWill

This is very new information to me and I have never head that RAPL will report such values. Can you cat the name that this domain is assigned to?

cat "/sys/class/powercap/intel-rapl:1/name"
  1. How do you even reliably measure the power consumption of a laptop through a power meter? How do you remove buffer effects from the battery and the AC/DC converter?

ArneTR avatar Apr 09 '23 19:04 ArneTR

This is very new information to me and I have never head that RAPL will report such values. Can you cat the name that this domain is assigned to?

cat "/sys/class/powercap/intel-rapl:1/name"

It's psys. See some info here or here.

  1. How do you even reliably measure the power consumption of a laptop through a power meter? How do you remove buffer effects from the battery and the AC/DC converter?

I've done two things:

  • plug laptop -> adapter -> powermeter -> socket, wait for the battery to be fully charged, then note down the consumption of the laptop over some period of time
  • unplug the laptop, wait a bit and look at the discharge rate

There are certainly more precise methods, but it was enough to determine that psys was giving information about the whole system.

TheElectronWill avatar Apr 10 '23 09:04 TheElectronWill

On a laptop you can get also some approximation with the battery drainage that you can get with

upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep W

(There is probably some lower level API that upower uses).

arthurzenika avatar May 23 '23 08:05 arthurzenika