sensors-applet ignores /etc/sensors3.conf

Bug #230850 reported by ingo
4
Affects Status Importance Assigned to Milestone
lm-sensors (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Ubuntu-Hardy amd64 (GNOME desktop)

I have installed lm-sensors and corresponding 'sensors-applet' for the GNOME-Panel.
MB (ASUS M2N-E) contains IT8716F chip controlled by module 'it87'.

The sensors output and readings are configured by /etc/sensors3.conf.
However this configuration is not reflected in the sensor-applet. Keyword like 'ignore' should suppress invalid values, but still appear,
calibration/calculation of voltages is not performed according to 'compute' statements.
I carefully calibrated my sensor readings under Feisty and OpenSUSE with matched 'compute' statements in the config-file, but sensors applet in Hardy just ignores that and always displays kind of 'raw values' regardless what I do in sensors3.conf.

Revision history for this message
Richard Seguin (sectech) wrote :

Assigned issue to sensors-applet

Revision history for this message
Alex Murray (alexmurray) wrote :

The version of sensors-applet in Hardy uses libsensors3, which seems to have a habit of naming the sensors slightly differently than the previous version of libsensors. So if the name of the sensors is different, your previous configuration may not be applied. sensors-applet does not read libsensors3.conf directly, it is done via libsensors. So if there is indeed a bug, it is in libsensors (or lm-sensors package) not sensors-applet.

Revision history for this message
ingo (ingo-steiner) wrote :

> libsensors3, which seems to have a habit of naming the sensors slightly differently than previous version

I can exlude that:
Hardy was a fresh install on an empty partition, no old configuration was migrated. I did just edit 'sensors3.conf and changed:

original paragraph (regarding voltages):
--------------------------------------------------
# Voltages

    label in0 "VCore"
    label in1 "VDDR"
    label in2 "+3.3V" # VCC3
    label in3 "+5V" # VCC
    label in4 "+12V"
# label in5 "-12V"
# label in6 "-5V"
    label in7 "5VSB" # VCCH
    label in8 "VBat"

    compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1)
    compute in4 ((30/10)+1)*@ , @/((30/10)+1)
# compute in5 (1+232/56)*@ - 4.096*232/56 , (@ + 4.096*232/56)/(1+232/56)
# compute in6 (1+120/56)*@ - 4.096*120/56 , (@ + 4.096*120/56)/(1+120/56)
    compute in7 ((6.8/10)+1)*@ , @/((6.8/10)+1)

calibrated (edited) content:
----------------------------------
# Voltages

    label in0 "VCore"
# label in1 "VDDR"
    label in1 "+3.3V"
# label in2 "+3.3V" # VCC3
    label in3 "+5V" # VCC
    label in4 "+12V"
# label in5 "-12V"
# label in6 "-5V"
    label in7 "5VSB" # VCCH
    label in8 "VBat"

ignore in2
ignore in5
ignore in6

    compute in0 (@-0.1)*1.25 , @/1.25+0.1
    compute in1 @+0.12 , @-0.12
    compute in3 ((6.8/10)+1)*(@+0.12) , @/((6.8/10)+1)-0.12
    compute in4 ((30/10)+1)*(@+0.12) , @/((30/10)+1)-0.12
# compute in5 (1+232/56)*@ - 4.096*232/56 , (@ + 4.096*232/56)/(1+232/56)
# compute in6 (1+120/56)*@ - 4.096*120/56 , (@ + 4.096*120/56)/(1+120/56)
    compute in7 ((6.8/10)+1)*(@+0.12) , @/((6.8/10)+1)-0.12
    compute in8 @+0.12 , @-0.12

This modification did in no way alter the displayed values in sensors-applet (I even rebooted to make changes effective).

Revision history for this message
Richard Seguin (sectech) wrote :

I am rejecting this bug because it seems that the newer versions of lib3sensors has made changes to there configuration file that it reads, this would be an enhancement not a bug.

Changed in sensors-applet:
status: New → Invalid
Revision history for this message
Richard Seguin (sectech) wrote :

Rather changes in libsensors3

Revision history for this message
ingo (ingo-steiner) wrote :

Please kill me, if my change in sensors3.conf for it8716 chip
from
  compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1) (orginal content)
into
  compute in3 ((6.8/10)+1)*(@+0.12) , @/((6.8/10)+1)-0.12 (my calibrated version)

is not according to documentation and is not supposed to result in a different reading.

Terefore I have set it back to 'confirmed'

Changed in sensors-applet:
status: Invalid → Confirmed
Richard Seguin (sectech)
Changed in sensors-applet:
importance: Undecided → Low
Revision history for this message
Richard Seguin (sectech) wrote :

Okay... if your confident that it's a bug then we will keep moving forward... What value are you expecting and what values are you getting? If I post this problem up stream they will want examples.

Thanks,

Richard Seguin

Revision history for this message
Richard Seguin (sectech) wrote :

* Re-assigned to lm-sensors

Revision history for this message
ingo (ingo-steiner) wrote :

What value are you expecting and what values are you getting?

if I change
  compute in3 ((6.8/10)+1)*@
into
  compute in3 ((6.8/10)+1)*(@+0.12)

I expect the displayed voltage to be increased by (0.12*1.68) = 0.2 volts. This is a compensation for the voltage drop on the wiring of the motherboard. The very same formula performed correctly under Feisty (of course with a different version of libsensors und sensors.conf). In Hardy this change does not alter a single digit - nothing happens.

I actually do not know whether it is due to libsensors3, because it seems to evaluate the formula in sensors3.conf at least once during installation (if not the displayed values would be factor 1.68 to low). But libsensors3 does not seem to respect changes made later on, even not after reboot.
Maybe the initial/original values are compiled in?
Or a copy of the original is stored in a different place and not updatet?

Revision history for this message
ingo (ingo-steiner) wrote :

Maybe you also want to know why I applied that correction:
it also affects the limit-settins. If 5 volts nominal is reported as only 4.8 volts it is already cose to the lower (warning) limit of -5%, in volts 4.75 and may cause invalid warnings.
The second formula after the colon in the same line is for the reverse calculation only.

Ingo

Revision history for this message
ingo (ingo-steiner) wrote :

Did another test:

just changed the line:
  compute in3 ((6.8/10)+1)*@
into
  compute in3 @

this is correctly reflected in the sensors reading:
I get the raw-value of that sensor with 2.85 volts - fine. So conclusion is:

a) libsensors(3) respects the configuration file sensors3.conf, but
b) it is unable to perform the more difficult calculation correctly as the version in Feisty did.

So it is definitely a lm-sensors bug or which part of it ever is responsible for calculations.

Best regards,
Ingo

Revision history for this message
ingo (ingo-steiner) wrote :

I think I now got the root cause:

libsensors in Hardy only calculates with integer values as input. There seems to be no rounding, instead decimal digits are just cut off.
So it makes absolutely no difference whether I put 6.8 or 6.0 or 6.9 into the formula in sensors3.conf.
But it results in a big jump of output-value if I change from 6.9 to 7.0.
This was different previously and is not documented anywhere. I guess it is not intentionally, because in Debian-Lenny all is ok and it was ok in Feisty.

Hope we get that fixed soon, so I can base my formula on reality and not on dirty hacks to overcome the precision deficiency.

Best regards,
Ingo

Revision history for this message
ingo (ingo-steiner) wrote :

I verified the bug by replacing libsensors.so.4.0.0 as installed from Hardy-repository by
libsensors.so.4.0.2 as it comes with Debian-Lenny:
all is correct now, calculates perfectly with my calibrated sensors3.conf.

Attention:
the calculation error in libsensors.so.4.0.0 does not only affect my modification, it affects all the sensors in sensors3.conf which operate with decimal numbers containing non-integer values. So many of the reported sensor values are faulty!!!

At that occasion I also updated libsensors.so.3.1.4 to libsensors.so.3.1.5. This library is used/required by some other tools like apcupsd and probably also is faulty.

Please update repository and apt data-base!

Richard, thanks for your patience,
Ingo

Revision history for this message
ingo (ingo-steiner) wrote :

package libsensors4 needs update to replace faulty libsensors.so.4.0.0 by libsensors.so.4.0.2

Changed in lm-sensors:
status: Confirmed → Fix Committed
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

I do show libsensors.so.4.0.2 used in Jaunty 9.04 (development version). Does this fix the issues here?

Thanks for helping improve Ubuntu.

Revision history for this message
ingo (ingo-steiner) wrote :

Sorry, but I cannot tell you for Jaunty nor Intrepid, because I have not installed them - Hardy will survive both;-)

In Hardy-amd64 I am currently happy with 'libsensors.so.4.0.2' for hardware monitoring with it87 (lm-sensors) - it calculates correctly instead of just skipping decimals.

Besides that I also have installed 'libsensors.so.3.1.5' because it is required by 'apcupsd' which I use as well.

Best regards,
Ingo

Przemek K. (azrael)
Changed in lm-sensors (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.