AMD Energy Driver Queued Ahead Of Linux 5.8 For Core/Package Power Sensors

Written by Michael Larabel in AMD on 25 May 2020 at 07:00 AM EDT. 8 Comments
AMD
Landing this weekend in hwmon-next ahead of the upcoming Linux 5.8 kernel cycle is the recently reported on "amd_energy" driver for supporting AMD Zen/Zen2 core and package energy sensors.

This is the recently reported on work of a Google engineer allowing AMD Zen CPUs to expose power usage on Linux via the Runtime Average Power Limiting (RAPL) framework. The amd_energy driver is making it to the Linux 5.8 kernel by way of the hardware monitoring "hwmon" subsystem thanks to work by AMD engineers following the prior Google patch series.

Having this reporting for modern AMD CPUs on Linux is something we have long wanted to see but something that hadn't been worked on by AMD for the Linux kernel while under Windows there is similar reporting via Ryzen Master, etc.

This amd_energy driver addition plus the recent community work on the k10temp driver now allows for good CPU thermal monitoring and core/package energy reporting under Linux. There still are some gaps on the thermal side, but at least in fairly good shape for those wanting to read those numbers under Linux.


The amd_energy driver is just over 400 lines of new code. Google engineers wrote this driver based on public AMD data sheets concerning the relevant MSRs. The numbers are reported via sysfs for those interested.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week