setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument Hi
Thanks for the reply I was giving up hope :) > My guess would be that thinkfan gets corrupted data from 'somewhere', > and then some lack of bounds or type checking messes up other internal > variables and leads to corrupt data being written out. To be more 'scientific' I tried first to make thinkfan print cur_lvl value when workign, so I patched system.c code like this: diff --git a/system.c b/system.c index 43d7515..86eb492 100644 --- a/system.c +++ b/system.c @@ -127,6 +127,7 @@ void setfan_ibm() { errcnt |= ERR_FAN_SET; } else { + report(LOG_INFO, LOG_INFO, "cur_lvl = %s\n", cur_lvl); if (unlikely(write(ibm_fan, cur_lvl, l) < l)) { prefix = "\n"; report(LOG_ERR, LOG_ERR, MSG_ERR_FANCTRL); And the result is (as expected), something like this: sleeptime=5, tmax=96, last_tmax=96, biased_tmax=96 -> fan="level 3" cur_lvl = level 3 cur_lvl = level 3 cur_lvl = level 3 sleeptime=5, tmax=71, last_tmax=104, biased_tmax=71 -> fan="level 7" cur_lvl = level 7 cur_lvl = level 7 cur_lvl = level 7 sleeptime=2, tmax=104, last_tmax=70, biased_tmax=155 -> fan="level 3" cur_lvl = level 3 While when thinkfan is 'broken' the output is something like this: cur_lvl = Cleaning up and resetting fan control. cur_lvl = D Cleaning up and resetting fan control. cur_lvl = d Cleaning up and resetting fan control. cur_lvl = ê Cleaning up and resetting fan control. cur_lvl = T Cleaning up and resetting fan control. These are all from different runs since thinkfan crashes each time (strange charachters may look different on may terminal, but I think the point is that cur_lvl points to sequence of bytes all messed up). > Can you try to monitor /proc/acpi/ibm/thermal with > a script or so and see if anything weird is going on? I did that and I could not see nothing unusual on my /proc/acpi/ibm/thermal, except that one sensor (the 10th, counting from 0) jumps up and down between 100 and -100, some sensors are always 0 and the other looks like real temperaturs; though I couldn't find out what are all about, I just guess that 0 and 2 are my two cpu cores (This is an i3 with 2 cores, 4 with hiperthreading). For completeness: I'm experimenting this issue on a Thinkpad Edge 11' dmidecode -s bios-version 86ET33WW (1.17 ) I did a bios upgrade some month ago, but this was happending before. I'm diving now a little more into thinkfan source code (slowly, because it is a long time I don't read C). I will see if I can spot the source of those strange chars. Thanks Marco -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org