dbus-sensors icon indicating copy to clipboard operation
dbus-sensors copied to clipboard

[issue] Manul fan control is flaky

Open huangalang opened this issue 1 year ago • 8 comments

hello users:

we are noticing there's a chance that set pwm value via FanSensor property will fail and it's easy to reproduce the issue

/test log as bellow/

=================================================================== root@test-machine:/sys/bus/i2c/devices/15-002f/hwmon/hwmon4# busctl set-property xyz.openbmc_project.FanSensor /xyz/openbmc_project/control/fanpwm/fan0_pwm xyz.openbmc_project.Control.FanPwm Target t 75 root@test-machine:/sys/bus/i2c/devices/15-002f/hwmon/hwmon4# cat pwm1 75

root@test-machine:/sys/bus/i2c/devices/15-002f/hwmon/hwmon4# busctl set-property xyz.openbmc_project.FanSensor /xyz/openbmc_project/control/fanpwm/fan0_pwm xyz.openbmc_project.Control.FanPwm Target t 90 root@test-machine:/sys/bus/i2c/devices/15-002f/hwmon/hwmon4# cat pwm1 75 -> issue

it should not happen because usually resp is updated properly via following line https://github.com/openbmc/dbus-sensors/blob/master/src/PwmSensor.cpp#L132

but we found when the issue happens , the program will match following condition checking https://github.com/openbmc/dbus-sensors/blob/master/src/PwmSensor.cpp#L127

and when it happens , the pwm value can be passed down to sysfs attribute does anyone come accross the same issue?

thanks

huangalang avatar May 18 '23 07:05 huangalang