| 1 |
Kernel driver power_meter |
| 2 |
========================= |
| 3 |
|
| 4 |
This driver talks to ACPI 4.0 power meters. |
| 5 |
|
| 6 |
Supported systems: |
| 7 |
|
| 8 |
* Any recent system with ACPI 4.0. |
| 9 |
|
| 10 |
Prefix: 'power_meter' |
| 11 |
|
| 12 |
Datasheet: https://uefi.org/specifications, section 10.4. |
| 13 |
|
| 14 |
Author: Darrick J. Wong |
| 15 |
|
| 16 |
Description |
| 17 |
----------- |
| 18 |
|
| 19 |
This driver implements sensor reading support for the power meters exposed in |
| 20 |
the ACPI 4.0 spec (Chapter 10.4). These devices have a simple set of |
| 21 |
features--a power meter that returns average power use over a configurable |
| 22 |
interval, an optional capping mechanism, and a couple of trip points. The |
| 23 |
sysfs interface conforms with the specification outlined in the "Power" section |
| 24 |
of Documentation/hwmon/sysfs-interface.rst. |
| 25 |
|
| 26 |
Special Features |
| 27 |
---------------- |
| 28 |
|
| 29 |
The `power[1-*]_is_battery` knob indicates if the power supply is a battery. |
| 30 |
Both `power[1-*]_average_{min,max}` must be set before the trip points will work. |
| 31 |
When both of them are set, an ACPI event will be broadcast on the ACPI netlink |
| 32 |
socket and a poll notification will be sent to the appropriate |
| 33 |
`power[1-*]_average` sysfs file. |
| 34 |
|
| 35 |
The `power[1-*]_{model_number, serial_number, oem_info}` fields display |
| 36 |
arbitrary strings that ACPI provides with the meter. The measures/ directory |
| 37 |
contains symlinks to the devices that this meter measures. |
| 38 |
|
| 39 |
Some computers have the ability to enforce a power cap in hardware. If this is |
| 40 |
the case, the `power[1-*]_cap` and related sysfs files will appear. |
| 41 |
For information on enabling the power cap feature, refer to the description |
| 42 |
of the "force_on_cap" option in the "Module Parameters" chapter. |
| 43 |
To use the power cap feature properly, you need to set appropriate value |
| 44 |
(in microWatts) to the `power[1-*]_cap` sysfs files. |
| 45 |
The value must be within the range between the minimum value at `power[1-]_cap_min` |
| 46 |
and the maximum value at `power[1-]_cap_max (both in microWatts)`. |
| 47 |
|
| 48 |
When the average power consumption exceeds the cap, an ACPI event will be |
| 49 |
broadcast on the netlink event socket and a poll notification will be sent to the |
| 50 |
appropriate `power[1-*]_alarm` file to indicate that capping has begun, and the |
| 51 |
hardware has taken action to reduce power consumption. Most likely this will |
| 52 |
result in reduced performance. |
| 53 |
|
| 54 |
There are a few other ACPI notifications that can be sent by the firmware. In |
| 55 |
all cases the ACPI event will be broadcast on the ACPI netlink event socket as |
| 56 |
well as sent as a poll notification to a sysfs file. The events are as |
| 57 |
follows: |
| 58 |
|
| 59 |
`power[1-*]_cap` will be notified if the firmware changes the power cap. |
| 60 |
`power[1-*]_interval` will be notified if the firmware changes the averaging |
| 61 |
interval. |
| 62 |
|
| 63 |
Module Parameters |
| 64 |
----------------- |
| 65 |
|
| 66 |
* force_cap_on: bool |
| 67 |
Forcefully enable the power capping feature to specify |
| 68 |
the upper limit of the system's power consumption. |
| 69 |
|
| 70 |
By default, the driver's power capping feature is only |
| 71 |
enabled on IBM products. |
| 72 |
Therefore, on other systems that support power capping, |
| 73 |
you will need to use the option to enable it. |
| 74 |
|
| 75 |
Note: power capping is potentially unsafe feature. |
| 76 |
Please check the platform specifications to make sure |
| 77 |
that capping is supported before using this option. |