Ticket #2305 (closed defect: worksforme)

Opened 4 years ago

Last modified 3 years ago

pwmconfig and fancontrol incorrectly report "hwmon1/device/pwm1 stuck to 0"

Reported by: ticket Owned by: khali
Priority: minor Milestone: 3.0.3
Component: fancontrol Version: 3.0.1
Keywords: Cc: jonathanrrogers@…

Description

On my system running linux 2.6.24-11 on an Asus A8V-E SE motherboard with a w83627ehf sensor chip, I see "hwmon1/device/pwmN stuck to 0" for N=1 to 3 when I run pwmconfig from lm_sensors-3.0.1. However, I have no problem setting /sys/class/hwmon/hwmon1/device/pwm1 to any value from 0 to 255 using echo and it stays there.

Even stranger, adding a single echo command to the pwmdisable function in the pwmconfig script causes it to work correctly. It does not seem to be a timing problem, since replacing the echo with "sleep 1" doesn't have the same effect. Adding the single echo to the fancontrol script's pwmdisable function allows it to reset the fan to full speed when it is killed.

I have no idea what is causing this problem or why adding a single echo to the script fixes it. I'm not even sure if it should be considered a bug in the scripts, the kernel driver, or what. I only discovered the fix because I added an echo line for debugging.

Attachments

pwmconfig_echo.patch Download (252 bytes) - added by ticket 4 years ago.
makes pwmconfig work on my system

Change History

Changed 4 years ago by ticket

makes pwmconfig work on my system

Changed 4 years ago by ticket

I was slightly wrong about fancontrol's behavior, but I did discover that the root of the problem in both scripts is related to trying to set pwmN_enable to 0, which results in " write error: Invalid argument" (which had been suppressed in the scripts). For some reason that I don't grasp, that error causes the script to fail a few lines later unless I add an extra echo in the right place. In the fancontrol script, it actually causes a syntax error, which makes no sense to me at all.

So, I'm still not sure if this is a bug in the scripts, the kernel driver (maybe it should never cause that error?), or even bash.

Changed 4 years ago by khali

  • owner changed from somebody to khali
  • status changed from new to assigned
  • version set to 3.0.1
  • milestone set to 3.0.2

Thanks for reporting and thanks for the hint. We had a similar report:
 http://lists.lm-sensors.org/pipermail/lm-sensors/2008-February/022400.html
I could never understand what was going on.

My first suspect is definitely bash, as the pwmconfig code looks all correct to me. I can't reproduce the problem here, with the same driver (w83627ehf). Which version of bash are you using exactly (version number and distribution)?

If would be great if you could try a different version of bash... for example a self-built bash 2.05b, which is known to behave properly. If the problem goes away, this will definitely point to a bug in the version of bash you were using.

Changed 4 years ago by khali

Jonathan, any news on this? Did you test with a different version of bash? I would be great if we could solve this problem in lm-sensors 3.0.2.

Also, I am curious if you were running pwmconfig with sudo?

Changed 4 years ago by khali

Yet another report of the same problem:
 http://lists.lm-sensors.org/pipermail/lm-sensors/2008-April/022812.html
Ubuntu 7.10 again.

Jonathan, what distribution are you running?

Changed 4 years ago by khali

Jonathan, any news on this? I can't fix this bug without your help.

Changed 4 years ago by khali

  • milestone changed from 3.0.2 to 3.0.3

Changed 3 years ago by khali

  • status changed from assigned to closed
  • resolution set to worksforme

No news for 4 months -> closing. Please reopen if you can reproduce the problem and have additional information to help fix it.

Note: See TracTickets for help on using tickets.