Documentation/wmi/devices/dell-wmi-ddv.rst
.. SPDX-License-Identifier: GPL-2.0-or-later
Many Dell notebooks made after ~2020 support a WMI-based interface for retrieving various system data like battery temperature, ePPID, diagostic data and fan/thermal sensor data.
This interface is likely used by the Dell Data Vault software on Windows,
so it was called DDV. Currently the dell-wmi-ddv driver supports
version 2 and 3 of the interface, with support for new interface versions
easily added.
.. warning:: The interface is regarded as internal by Dell, so no vendor documentation is available. All knowledge was thus obtained by trial-and-error, please keep that in mind.
The Dell ePPID is used to uniquely identify components in Dell machines,
including batteries. It has a form similar to CC-PPPPPP-MMMMM-YMD-SSSS-FFF
and contains the following information:
The eppidtool <https://pypi.org/project/eppidtool>_ python utility can be used
to decode and display this information.
All information regarding the Dell ePPID was gathered using Dell support
documentation and this website <https://telcontar.net/KBK/Dell/date_codes>_.
The WMI interface description can be decoded from the embedded binary MOF (bmof)
data using the bmfdec <https://github.com/pali/bmfdec>_ utility:
::
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\0x409"), Description("WMI Function"), guid("{8A42EA14-4F2A-FD45-6422-0087F7A7E608}")] class DDVWmiMethodFunction { [key, read] string InstanceName; [read] boolean Active;
[WmiMethodId(1), Implemented, read, write, Description("Return Battery Design Capacity.")] void BatteryDesignCapacity([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(2), Implemented, read, write, Description("Return Battery Full Charge Capacity.")] void BatteryFullChargeCapacity([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(3), Implemented, read, write, Description("Return Battery Manufacture Name.")] void BatteryManufactureName([in] uint32 arg2, [out] string argr); [WmiMethodId(4), Implemented, read, write, Description("Return Battery Manufacture Date.")] void BatteryManufactureDate([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(5), Implemented, read, write, Description("Return Battery Serial Number.")] void BatterySerialNumber([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(6), Implemented, read, write, Description("Return Battery Chemistry Value.")] void BatteryChemistryValue([in] uint32 arg2, [out] string argr); [WmiMethodId(7), Implemented, read, write, Description("Return Battery Temperature.")] void BatteryTemperature([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(8), Implemented, read, write, Description("Return Battery Current.")] void BatteryCurrent([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(9), Implemented, read, write, Description("Return Battery Voltage.")] void BatteryVoltage([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(10), Implemented, read, write, Description("Return Battery Manufacture Access(MA code).")] void BatteryManufactureAceess([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(11), Implemented, read, write, Description("Return Battery Relative State-Of-Charge.")] void BatteryRelativeStateOfCharge([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(12), Implemented, read, write, Description("Return Battery Cycle Count")] void BatteryCycleCount([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(13), Implemented, read, write, Description("Return Battery ePPID")] void BatteryePPID([in] uint32 arg2, [out] string argr); [WmiMethodId(14), Implemented, read, write, Description("Return Battery Raw Analytics Start")] void BatteryeRawAnalyticsStart([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(15), Implemented, read, write, Description("Return Battery Raw Analytics")] void BatteryeRawAnalytics([in] uint32 arg2, [out] uint32 RawSize, [out, WmiSizeIs("RawSize") : ToInstance] uint8 RawData[]); [WmiMethodId(16), Implemented, read, write, Description("Return Battery Design Voltage.")] void BatteryDesignVoltage([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(17), Implemented, read, write, Description("Return Battery Raw Analytics A Block")] void BatteryeRawAnalyticsABlock([in] uint32 arg2, [out] uint32 RawSize, [out, WmiSizeIs("RawSize") : ToInstance] uint8 RawData[]); [WmiMethodId(18), Implemented, read, write, Description("Return Version.")] void ReturnVersion([in] uint32 arg2, [out] uint32 argr); [WmiMethodId(32), Implemented, read, write, Description("Return Fan Sensor Information")] void FanSensorInformation([in] uint32 arg2, [out] uint32 RawSize, [out, WmiSizeIs("RawSize") : ToInstance] uint8 RawData[]); [WmiMethodId(34), Implemented, read, write, Description("Return Thermal Sensor Information")] void ThermalSensorInformation([in] uint32 arg2, [out] uint32 RawSize, [out, WmiSizeIs("RawSize") : ToInstance] uint8 RawData[]); };
Each WMI method takes an ACPI buffer containing a 32-bit index as input argument, with the first 8 bit being used to specify the battery when using battery-related WMI methods. Other WMI methods may ignore this argument or interpret it differently. The WMI method output format varies:
The format of the output should be thoroughly checked, since many methods can return malformed data in case of an error.
The data format of many battery-related methods seems to be based on the
Smart Battery Data Specification, so unknown battery-related methods are
likely to follow this standard in some way.
Returns the design capacity of the battery in mAh as an u16.
Returns the full charge capacity of the battery in mAh as an u16.
Returns the manufacture name of the battery as an ASCII string.
Returns the manufacture date of the battery as an u16. The date is encoded in the following manner:
.. note:: The data format needs to be verified on more machines.
Returns the serial number of the battery as an u16.
Returns the chemistry of the battery as an ASCII string. Known values are:
Returns the temperature of the battery in tenth degree kelvin as an u16.
Returns the current flow of the battery in mA as an s16. Negative values indicate discharging.
Returns the voltage flow of the battery in mV as an u16.
Returns a manufacture-defined value as an u16.
Returns the capacity of the battery in percent as an u16.
Returns the cycle count of the battery as an u16.
Returns the ePPID of the battery as an ASCII string.
Performs an analysis of the battery and returns a status code:
0x0: Success0x1: Interface not supported0xfffffffe: Error/Timeout.. note:: The meaning of this method is still largely unknown.
Returns a buffer usually containing 12 blocks of analytics data. Those blocks contain:
.. note:: The meaning of this method is still largely unknown.
Returns the design voltage of the battery in mV as an u16.
Returns a single block of analytics data, with the second byte of the index being used for selecting the block number.
Supported since WMI interface version 3!
.. note:: The meaning of this method is still largely unknown.
Returns the WMI interface version as an u32.
Returns a buffer containing fan sensor entries, terminated
with a single 0xff.
Those entries contain:
Returns a buffer containing thermal sensor entries, terminated
with a single 0xff.
Those entries contain:
.. note:: TODO: Find out what the meaning of the last byte is.
The algorithm used to match ACPI batteries to indices is based on information which was found inside the logging messages of the OEM software.
Basically for each new ACPI battery, the serial numbers of the batteries behind indices 1 till 3 are compared with the serial number of the ACPI battery. Since the serial number of the ACPI battery can either be encoded as a normal integer or as a hexadecimal value, both cases need to be checked. The first index with a matching serial number is then selected.
A serial number of 0 indicates that the corresponding index is not associated with an actual battery, or that the associated battery is not present.
Some machines like the Dell Inspiron 3505 only support a single battery and thus ignore the battery index. Because of this the driver depends on the ACPI battery hook mechanism to discover batteries.
.. note:: The ACPI battery matching algorithm currently used inside the driver is outdated and does not match the algorithm described above. The reasons for this are differences in the handling of the ToHexString() ACPI opcode between Linux and Windows, which distorts the serial number of ACPI batteries on many machines. Until this issue is resolved, the driver cannot use the above algorithm.
Alternatively:
dell-wmi-ddv driver, use the force module param
if necessary.In case the DDV WMI interface version available on your Dell notebook is not
supported or you are seeing unknown fan/thermal sensors, please submit a
bugreport on bugzilla <https://bugzilla.kernel.org>_ so they can be added
to the dell-wmi-ddv driver.
See Documentation/admin-guide/reporting-issues.rst for further information.