On Sat, May 14, 2011 at 01:37:51AM +0400, Vadim Zhukov wrote: > On 14 May 2011 c. 01:09:03 Christopher Zimmermann wrote: > > On 05/13/11 20:56, Alexander Polakov wrote: > > > * Marco Peereboom<sl...@peereboom.us> [110512 17:59]: > > >> On Thu, May 12, 2011 at 03:32:56PM +0200, Christopher Zimmermann wrote: > > >>> On 05/12/11 14:37, Vadim Zhukov wrote: > > >>>> Hello all. > > >>>> > > >>>> Here is a patch that allows for me to work on other things. :) > > >>>> Basically, it makes OS choose fan mode instead of firmware. Main > > >>>> feature here is enabling of "disengadged" mode when temperature > > >>>> goes critical, picking 80C as a "red line". Now I can fully load > > >>>> CPU on my X201i - say, "make -j 4" - and it still works instead > > >>>> of being powering off by acpitz(4). > > >> > > >> User space will not be allowed to play. I don't have a stinkpad so > > >> I can't test this but I do encourage people to play with this diff > > >> and report to the list. > > > > > > My thinkpad is AMD-powered, so 60 degrees is *normal* for it. With > > > this diff the fan is always running at max speed, generating lots of > > > noise. > > > > I think the THINKPAD_FANMODE_MAX part could be left out. The normal > > automatic should be able to set maximum speed at a model specific > > appropriate temperature. The important part is the disengaged mode, > > because the automatic regulation of the firmware is not able to set > > this mode. > > Received your letter just before rebooting new kernel. :) > New version acts as you say: place fan in disengadged mode on > critical overheat, and return to automatical firmware management > when temperature goes back to (more or less) normal. > > I also made temperature and fan mode sensors fill sensor status. > If anyone objects, I'll make this a separate diff, of course. > > -- > Best wishes, > Vadim Zhukov > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > > + sc->sc_sens[THINKPAD_SENSOR_FANRPM].value = ((hi << 8L) + lo); > + > + /* Update fan mode based on max temperature seen */ > + if (maxtmp > THINKPAD_TEMP_OUCH) { > + mode = THINKPAD_FANMODE_DISENGADGED; > + desc = "disengadged"; > + ss = SENSOR_S_CRIT; > + } else { > + mode = THINKPAD_FANMODE_AUTO; > + desc = "auto"; > + ss = SENSOR_S_OK; > + }
No actual comment on the diff right now, but please spell ``disengaged'' correctly. Cheers, -0- > + acpiec_write(sc->sc_ec, THINKPAD_ECOFFSET_FANMODE, 1, &mode); > + sc->sc_sens[THINKPAD_SENSOR_FANMODE].value = mode; > + sc->sc_sens[THINKPAD_SENSOR_FANMODE].status = ss; > + snprintf(sc->sc_sens[THINKPAD_SENSOR_FANMODE].desc, > + sizeof(sc->sc_sens[THINKPAD_SENSOR_FANMODE]), > + "fan mode: %s", desc); > } > > void > -- And on the seventh day, He exited from append mode.