Skip to content

Feature: CPU power usage from intel-rapl #602

Open

Description

@adil192

Has this issue been covered in the Wiki?

  • I have read the Wiki and my issue is not covered.

Is there an existing issue reported already?

Describe the new feature you would like

While charging, the battery's power rate is positive (or +0.0W when fully charged).

I'd like to be able to see the power usage of the CPU, since +0.0W doesn't tell me much. This is possible at least with Intel CPUs.

It looks like Mission Center is able to do this by measuring the rate of change of /sys/class/powercap/intel-rapl:0/energy_uj:

Screenshots

The battery power rate is +0.0W:

Image

Mission Center shows my CPU's power usage is -24.2W:

Image

Anything else?

I think we should expose all the powercap entries including the other intel-rapl ones. On my laptop I have several energy values, though I don't know the difference between them.

❯ for f in /sys/class/powercap/*/energy_uj; do echo "$f:  $(cat $f)"; done
/sys/class/powercap/intel-rapl:0:0/energy_uj:        11069487836
/sys/class/powercap/intel-rapl:0:1/energy_uj:          648112110
/sys/class/powercap/intel-rapl:0:2/energy_uj:         2452401924
/sys/class/powercap/intel-rapl:0/energy_uj:          20214114572
/sys/class/powercap/intel-rapl:1/energy_uj:          27418821592
/sys/class/powercap/intel-rapl-mmio:0:0/energy_uj:    2452402840
/sys/class/powercap/intel-rapl-mmio:0/energy_uj:     20214134408

Activity

  1. adil192 commented on Oct 10, 2026

    @adil192
    ContributorAuthor

    FWIW hwmon/#601 can't see intel rapl power usage

  2. corecoding commented on Oct 17, 2026

    @corecoding
    Owner

    Are the above /sys/class/powercap/intel-rapl files readable by regular users? On my machine I have to use sudo to see the contents - which means Vitals can't pick up on them

  3. adil192 commented on Oct 17, 2026

    @adil192
    ContributorAuthor

    Oh apparently not. Mission Center set the permissions for me with its firsttime setup: https://gitlab.com/mission-center-devs/mission-center/-/wikis/Home/CPU

    ❯ cat /etc/udev/rules.d/99-powercap.rules
    SUBSYSTEM=="powercap", KERNEL=="intel-rapl*", RUN+="/usr/bin/chmod a+r /sys/%p/energy_uj"
  4. corecoding commented on Oct 18, 2026

    @corecoding
    Owner

    Unfortunately I don't have a machine that has power monitoring, can you check out the develop branch and see if it is working?

  5. pinned this issue on Oct 18, 2026
  6. adil192 commented on Oct 18, 2026

    @adil192
    ContributorAuthor

    Works for me on the current develop branch
    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions