hwmontempsensor issue in dbus-sensor
Bruce Mitchell
bruce.mitchell at linux.vnet.ibm.com
Sat Jan 1 07:12:02 AEDT 2022
On 12/31/2021 09:30, Bruce Mitchell wrote:
> On 12/20/2021 10:29, Ed Tanous wrote:
>> On Sun, Dec 19, 2021 at 9:11 PM Kumar Thangavel
>> <kumarthangavel.hcl at gmail.com> wrote:
>>>
>>> Hi All,
>>>
>>> Gentle Reminder on this.
>>>
>>> Thanks,
>>> Kumar.
>>>
>>> On Thu, Dec 16, 2021 at 1:56 PM Kumar Thangavel
>>> <kumarthangavel.hcl at gmail.com> wrote:
>>>>
>>>> Hi All,
>>>>
>>>>
>>>> In dbus-sensors repo, I saw the patch for changes in Hwmon Temp Sensor.
>>>> https://github.com/openbmc/dbus-sensors/commit/544e7dc58cecef898fe7d684c3ba0fbce178cf2d#diff-bfc8d7ed4ade4b3519ad3b7fe091f9c79a60faf8a26f410c1568e5341b22b7ab
>>>>
>>
>> Bruce, this is your patch. Could you take a look at the below and
>> provide your input?
>>
>>>>
>>>>
>>>> While testing those changes in my platform, I found that each sensor
>>>> in hwmon temp has been creating twice.
>>>> After analyzed the patch, for below 2 paths SP_OUTLET_TEMP sensor is
>>>> created twice.
>>>>
>>>>
>>>> /sys/class/hwmon/hwmon2/temp2_input
>>>> /sys/class/hwmon/hwmon2/temp1_input
>>>>
>>>>
>>>> Before your change, hwmon temp sensor will check whether the path is
>>>> already exists or not.
>>>> If it exists, it will skip and proceed with next path.
>>>> https://github.com/openbmc/dbus-sensors/commit/544e7dc58cecef898fe7d684c3ba0fbce178cf2d#diff-bfc8d7ed4ade4b3519ad3b7fe091f9c79a60faf8a26f410c1568e5341b22b7abL96
>>>>
>>>>
>>>>
>>>> Could you please explain why it is creating twice in hwmon temp ?
>>>>
>>>>
>>>> Journalctl log before your changes applied :
>>>>
>>>>
>>>> Dec 31 16:01:32 yosemitev2 hwmontempsensor[286]: Path :
>>>> "/sys/class/hwmon/hwmon2/temp2_input"
>>>> Dec 31 16:01:32 yosemitev2 hwmontempsensor[286]: Type :
>>>> xyz.openbmc_project.Configuration.TMP421
>>>> Dec 31 16:01:32 yosemitev2 hwmontempsensor[286]: Name : SP_OUTLET_TEMP
>>>> Dec 31 16:01:32 yosemitev2 hwmontempsensor[286]: Dbus path :
>>>> /xyz/openbmc_project/sensors/temperature/SP_OUTLET_TEMP
>>>> Dec 31 16:01:32 yosemitev2 hwmontempsensor[286]: Dbus path :
>>>> /xyz/openbmc_project/sensors/temperature/SP_OUTLET_REMOTE_TEMP
>>>> Dec 31 16:01:32 yosemitev2 hwmontempsensor[286]: Path :
>>>> "/sys/class/hwmon/hwmon2/temp1_input"
>>>>
>>>>
>>>>
>>>> Journalctl log after your changes applied :
>>>>
>>>>
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Path :
>>>> "/sys/class/hwmon/hwmon2/temp2_input"
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Sensor type :
>>>> xyz.openbmc_project.Configuration.TMP421
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Name : SP_OUTLET_TEMP
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Path :
>>>> /xyz/openbmc_project/sensors/temperature/SP_OUTLET_TEMP
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Path :
>>>> /xyz/openbmc_project/sensors/temperature/SP_OUTLET_REMOTE_TEMP
>>>>
>>>>
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Path :
>>>> "/sys/class/hwmon/hwmon2/temp1_input"
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Sensor type :
>>>> xyz.openbmc_project.Configuration.TMP421
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Name : SP_OUTLET_TEMP
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Path :
>>>> /xyz/openbmc_project/sensors/temperature/SP_OUTLET_TEMP
>>>> Dec 31 16:01:54 yosemitev2 hwmontempsensor[327]: Path :
>>>> /xyz/openbmc_project/sensors/temperature/SP_OUTLET_REMOTE_TEMP
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Kumar.
>
> I will give it quick look today. Also today is my last day at IBM.
>
The problem I had to solve was that I was adding devices
(DPS310 and Si7020 type) that has more than one sensor type
per device, in this case under /sys/bus/iio/devices .
So the loop cannot continue after finding the first sensor of
the device. I have not seen p10bmc /sys/class/hwmon temperature
sensors being created twice, in this case the TMP75.
What is the entity-manager configuration for your system?
I suspect that the dbus-sensors Hwmon does not take into account
some detail that is needs to related to entity-manager.
More information about the openbmc
mailing list