Im trying to get the CPU Voltage but without any success. I tried the OpenMonitorHardware but it seems like that there is no voltage sensor
public float GetCpuVoltage() {
Computer computer = new Computer(){ CPUEnabled = true };
computer.Open();
foreach(IHardware hardware in computer.Hardware) {
hardware.Update();
if(hardware.HardwareType == HardwareType.CPU) {
foreach(ISensor sensor in hardware.Sensors) {
if(sensor.SensorType == SensorType.Voltage) {
return (float)sensor.Value;
}
}
}
}
computer.Close();
}
The If statement will never be true since it only finds the Temperature, Power and Clock speed sensor.
Another try with Win32_Processor and Win32_Mainboard and pertty much every single Win32_XXX that could include it was unsuccessfull. There it either had no value or the documentation was wrong/old and the values you can pass in are false and put out an error. The closest i got with this was with this code here
foreach(ManagementBaseObject core in new ManagementObjectSearcher("Select * from Win32_Processor").Get()) {
var voltage = core["CurrentVoltage"];
}
The value i get is "10" which doesnt even make sense. I first thought it might be rounded so 1,357 might be rounded down to one but its not its a solid 10 no matter what i try.
After hours of trying and googeling i have no idea what to try anymore i even tried to download the source code from Open Hardware Monitor since in their programm it works but its too complicated for me to fully point down the origin and how they got the value.
If anyone needs i own a I5-8600k an Asus Z390 TUF GAMING-Plus and the Super IO Controller is the Nuvoton NCT6798D which should contain the information i need.
Please forgive any typing mistakes and thanks for helping in advance