Ubuntu – How to monitor the VCore voltage

16.04cpulm-sensorsoverclockingsensors

I have built a new PC and being cheap I have not bought Windows so I am trying Linux for the first time with Ubuntu 16.04. I understand lm-sensors is the standard method to access the information I want, which is really just the voltages, particularly VCore. I would like to be able to monitor the VCore voltage to facilitate overclocking (as my motherboard does not allow fixed voltage I can't monitor for dangerous voltages by the automatic VID).

I have the following relevant packages installed: lm-sensors (v. 1:3.4.0-2), libsensors4 (v. 3:4.0-2), libsensors-applet-plugin0 (v. 3.0.0+git5-0.1ubuntu1)

The CPU is i5-6600K and the motherboard is ASRock Z170A-X1/3.1

I ran sensors-detect and the only sensor it found was coretemp. This was added to my modules and it works fine for the temperatures. Here is a sample output from running sensors:

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +47.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:         +46.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:         +47.0°C  (high = +80.0°C, crit = +100.0°C)
Core 2:         +34.0°C  (high = +80.0°C, crit = +100.0°C)
Core 3:         +45.0°C  (high = +80.0°C, crit = +100.0°C)

I would love to achieve the standard behaviour (more information), such as shown here or here.

I suspect that an additional sensor is needed to access the voltages because most of the guides show sensors-detect resulting in more modules being added than just coretemp. In my case, there was one unknown device found, which it suspects could be a sensor….

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found unknown chip with ID 0xd121
    (logical device B has address 0x290, could be sensors)
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

I used dmesg to look at the mentioned address 0x290 in the kernel ring buffer and found this line, which is mostly incomprehensible to me but I put here for your information.

[    0.206389] system 00:00: [io  0x0290-0x029f] has been reserved

Additionally, I have other applications which are limited in the information that they are able to show. For example, I-NEX, which is somewhat like CPU-Z on Windows (suggest something better if you know it), is limited to basic CPUID stuff such as the processor id string, lithography, socket type, features supported, etc. Nothing is reported for the CPU VCore and other fields. Clock speed, BLCK speed, multiplier, turboclock are reported as the stock values regardless of my BIOS overclock settings (incorrect as I am able to monitor CPU speed with System Monitor). Tools like this probably all rely on lm-sensors, which I think is at the root of my problem here, so this is not too surprising.

I have also tried running CPU-Z using WINE but it results in essentially the same situation: shows the basic CPUID stuff but not the more detailed sensor stuff I am looking for. This is after an error occur during initialization: error code 0x2(2).

Is it just a case of an unsupported motherboard? If so, will support ever be added? Is there some way I could manually add support? Is there any alternative to lm-sensors? Is there another way to, e.g., manually get closer to hardware level and access the voltage somehow via bash? Should I just essentially try reinstalling different versions/distros? If so, will I necessarily lose this installation and its files?

Best Answer

Wine won't let you reach the ring0 of your processor. The place where privilege instructions can be executed.

Linux provides a kernel module msr.ko which allows to read/write model specific registers described in the Intel Architectures Software Developer Manuals. Same with AMD into its BIOS and Kernel Developer's Guide

https://software.intel.com/en-us/articles/intel-sdm

http://developer.amd.com/resources/developer-guides-manuals/

For the 6600K, you may luckily find voltage information into its datasheets. PCI will be queried to get values.

You will program algorithms with the help of the MSR registers and the leaves of the CPUID instruction to get the processor Turbo ratios, and estimate the BCLK with two TSC reads, sampled on an interval.

Turbo frequency is the product of the Ratio and the Base Clock

I've programmed CoreFreq which beside vcore will display frequencies and the idle states. Feel free to dig the algorithms in the source code:

https://github.com/cyring/CoreFreq

Related Question