Support in other languages: 
Reply
SCSI Port
rzrfreefr
Posts: 237
Registered: ‎10-11-2011
Location: france
0

Re: Correct fan regulation with a T420s in Kubuntu 11.10 Beta2 - Needed only kernel parametres.

I did try to monitor the fan speed, but I fear those infos are not available on g470's bios either on linux or windows ...

 

I suspect this is a bios issue because we have a very similar lspci ...

 

I made a screenshot  on that other thread :

 

http://forums.lenovo.com/t5/Lenovo-3000-and-Value-line/G470-fan-running-non-stop/m-p/566591#M32428

 

finally are you aware of those Intel SandyBridge bug ?

 

 

--
http://rzr.online.fr/q/lenovo# g470 s103t (Please Contact me if your s10-3T is booting win7 or support bluetooth, 3g)
Lenovo S10-3t | Model Name : 0651 | Mfg Date: 2010/06/08
Lenovo G470 | Model Name : 20078 | M fg Date: 11/03/23 | BIOS: 40CN23WW(V2.09) 06/20/2011 | CPU: i5-2410M | Linux version 3.3.4lenovog470+ (root@lap) (gcc version 4.6.3 (Debian 4.6.3-4) ) #8 SMP Tue May 1 10:23:48 CEST 2012
OS:GNU/Linux/Debian
MTJ
Fanfold Paper
MTJ
Posts: 21
Registered: ‎09-28-2011
Location: Sweden
0

Re: Correct fan regulation with a T420s in Kubuntu 11.10 Beta2 - Needed only kernel parametres.


@ Andy

Thanks, yes it was as I suspected the Firefox NoScript add-on that got in the way. I had allowed lenovo.com, but this message board is powered by something from lithium.com. So the "Options" menu had no content until I also allowed scripting from lithium. Probably why the line spacing got messed up as well...

@ rzrfreefr

That was quite a list of confusing failures. I'll have to ask some questions that you might think are stupid or obvious...


_1_

Regarding what in Win7 is called TZ00, it stands for Thermal Zone. In Linux we get a /sys entry governed by ACPI code. In olden times the entry landed in the /proc/acpi/ area, a place which now is deprecated. On a ThinkPad it could be seen in /proc/acpi/ibm/ (I don't have anything 'thermal' there myself). The most interesting TZ files in the /sys directory on my system are:

/sys/devices/virtual/hwmon/hwmon0/name (acpitz)
/sys/devices/virtual/hwmon/hwmon0/temp1_crit (98000) Machine shuts down if at 98 C ?
/sys/devices/virtual/hwmon/hwmon0/temp1_input (38000) Current temperature at sensor.

My machine must have that sensor close to the CPUs - or even inside the package - since the temperature generally is just a few degrees below CPU temps.

But, and here is the first QUESTION, do you see something like this in your boot logs?:

[    0.809349] thermal LNXTHERM:00: registered as thermal_zone0
[    0.809351] ACPI: Thermal Zone [THM0] (49 C)
 
The "thermal" kernel code can be compiled as a module, at least it could back when I rolled my own, but is rather important so distros tend to keep it in the kernel proper.

Your /usr/bin/sensors output from acpitz looks totally bogus. I've read somewhere that sensor programs which fail to read an expected file, can show 127 in different temp places. The "+0.0 C  (crit = +127.0 C)" just reeks of such a failure.

Since a program in Win7 also gave a TZ temp of zero degrees, I think we can rule out a misconfigured or buggy linux part. Agreed? What remains is - and this is pure speculation, I'm neither a kernel coder nor a computer engineer - A) Faulty sensor, B) No sensor physically present, but code left in BIOS/or-some-firmware to indicate an existence, C) Badly Buggy BIOS, D) Intentionally withheld/hidden temperature information <-- I stretched my imagination there... (/:8O{D-)

Do _any_ G470 machine display a working TZ sensor?

Though, as I see it, the lack of information from TZ is not overly dangerous. You have working CPU sensors, and they will trigger a computer shutdown should a thermal emergency occur.


_2_

The second QUESTION I'd like to ask is: Can the kernel module "thinkpad_acpi" be used on a G470?

Older supported models in the G series are G40 and G41 according to http://www.thinkwiki.org/wiki/Thinkpad-acpi Perhaps all they need is DMI IDs from newer models, see http://www.thinkwiki.org/wiki/List_of_DMI_IDs

If it isn't autoloadig you could try with the module parametre "force_load" (see "modinfo thinkpad_acpi" and full documentation should be in a directory of the kernel source). I've forgotten how one feeds parametres directly on the command line, but you can always put a file containing the line "options thinkpad-acpi force_load=1" in /etc/modprobe.d/thinkpad-acpi.conf If that works, then you really can start the fun by using the option "fan_control=1" as well.

The reason for my asking is that normal ACPI code is very limited when it comes to ThinkPads. Without the thinkpad_acpi module I don't think I would have _any_ fan control or information available. There are no boot log messages containing the word fan, Fan or FAN here... (ACPI has not loaded its "fan" module)

When I load the thinkpad_acpi module it creates two /sys entries:

/sys/devices/platform/thinkpad_acpi/
/sys/devices/platform/thinkpad_hwmon/

The first is where hotkeys, input, leds etc are kept. The second deals with the fan, where sensor programs can read the speed (from "fan1_input") and generic fan control can be exerted by echoing 0 (fan off) to 255 (auto? or full speed?) into the PWM Control file "pwm1". thinkpad_acpi also creates the old style /proc/acpi/ibm/ entry where a smarter fan control file resides. One can echo "level 0" to "level 7" into it, as well as "level auto" (which gives the default 4000 RPMs).

That smart control file is what I let the program "thinkfan" use - simply by not mentioning any fan file at all in the config.

And finally, a comment. In your command logs you executed "sudo pwmconfig". Look what happens if I do a sudo against that very low level controller:

loke@sleipner:~$ sudo echo 0 >/sys/devices/platform/thinkpad_hwmon/pwm1
bash: /sys/devices/platform/thinkpad_hwmon/pwm1: Permission denied

And the same file with another interface:

loke@sleipner:~$ sudo echo "level 0" >/proc/acpi/ibm/fan
bash: /proc/acpi/ibm/fan: Permission denied

No, we have to be _fully_ root to gain control (and thinkpad_acpi must have been loaded with "fan_control=1"):

loke@sleipner:~$ su
Password:
root@sleipner:/home/loke# echo "level 0" >/proc/acpi/ibm/fan

[waiting a while for the fan to spin down and the new speed to register]

root@sleipner:/home/loke# cat /proc/acpi/ibm/fan
status:         disabled
speed:          0
level:          0
commands:       level <level> (<level> is 0-7, auto, disengaged, full-speed)
commands:       enable, disable
commands:       watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))

root@sleipner:/home/loke# echo "level auto" >/proc/acpi/ibm/fan

[waiting]

root@sleipner:/home/loke# cat /proc/acpi/ibm/fan
status:         enabled
speed:          3919
level:          auto
commands:       level <level> (<level> is 0-7, auto, disengaged, full-speed)
commands:       enable, disable
commands:       watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))

While I did these echoings, the "thinkfan" program was unloaded. Otherwise it would silently have been killed...

PS. I see that you have a temperature sensor on your HD (WDC WD64 00B...). I have none with my SSD. If things work out with thinkpad_acpi and you try thinkfan, remember to list the HD sensor in the config file - or if it can be read with "hdparm" (be sure to read /usr/share/doc/thinkfan/README.gz as well as the example files). His temperature level examples are not particularly quiet or powerful, though. One can do much better ;-)

Also use an on screen monitor program for temperatures and fan speed, CPU, HDs, Lan etc. I love GKrellM(2) even though it is Gtk2-based (I let it update once per second) - right-click at the top to bring up full configuration, or on a 'Krell' to configure its visuals. With the "Aliens" skin (theme) it really looks like something out of this world...

PPS. You ask "finally are you aware of those Intel SandyBridge bug ?" I'm afraid that I don't know what you mean. I haven't read any of the links in the screenshot you provided. I've been busy thinking about and commenting on your system anomalies.

/MTJ


SCSI Port
rzrfreefr
Posts: 237
Registered: ‎10-11-2011
Location: france
0

Re: Correct fan regulation with a T420s in Kubuntu 11.10 Beta2 - Needed only kernel parametres.

[ Edited ]

hi thank you for your time I am curefuly  reading you and I will update my logs soon if it help out

 

Q1/ TZ00

 

I will try to find some G470 users to check out but I think this should belong to an other thread such as :

 

http://forums.lenovo.com/t5/Lenovo-3000-and-Value-line/G470-fan-running-non-stop/m-p/566591#M32428

 

 

Q2/ thinkpad_acpi.ko

 

It looks it is unsupported , btw the g470 seems to follow IdeaPad or Essential serie not Thinkpad so checkout that ideapad module ...

 

I will contact the thinkwiki commmunity anyway maybe it's better to continue this conversation in that place once its open again

 

here my update logs as promised

 

http://rzr.online.fr/q/sensor#module 

 

 

Q3 / Intel Bug

 

what I am talking about is :

 

http://www.intel.com/support/chipsets/6/sb/CS-032521.htm

 

As you can see on my screenshot I am affected ... but I did not figure out the consequences yet ...

 

Later online

 

 

 

 

 

 

 

--
http://rzr.online.fr/q/lenovo# g470 s103t (Please Contact me if your s10-3T is booting win7 or support bluetooth, 3g)
Lenovo S10-3t | Model Name : 0651 | Mfg Date: 2010/06/08
Lenovo G470 | Model Name : 20078 | M fg Date: 11/03/23 | BIOS: 40CN23WW(V2.09) 06/20/2011 | CPU: i5-2410M | Linux version 3.3.4lenovog470+ (root@lap) (gcc version 4.6.3 (Debian 4.6.3-4) ) #8 SMP Tue May 1 10:23:48 CEST 2012
OS:GNU/Linux/Debian
MTJ
Fanfold Paper
MTJ
Posts: 21
Registered: ‎09-28-2011
Location: Sweden
0

Re: Correct fan regulation with a T420s in Kubuntu 11.10 Beta2 - Needed only kernel parametres.

Have not read through your latest findings, but feel I must step in with a correction to your use of thinkfan.

 

The /proc/acpi/ibm/thermal is as I said not present on modern machines. We must specify each sensor individually. Here's how it looks on my T420s (from my /etc/thinkfan.conf)

 

---Quote---

# -------------------------------------------------------------------------
# Kernel modules "coretemp" and "thinkpad_acpi" must be loaded or built in!
# ThinkPad T420s sensors and fan ("ls -l /sys/class/hwmon/" examine links):

sensor /sys/devices/virtual/hwmon/hwmon0/temp1_input # Name = acpitz
sensor /sys/devices/platform/coretemp.0/temp1_input  # Label = Physical id 0
sensor /sys/devices/platform/coretemp.0/temp2_input  # Label = Core 0
sensor /sys/devices/platform/coretemp.0/temp3_input  # Label = Core 1

# Not specifying /sys/devices/platform/thinkpad_hwmon/pwm1 as the fan PWM
# control file, makes thinkfan try the thinkpad_acpi interface at
# /proc/acpi/ibm/fan so that we can use the simple level numbers 0 to 7
# (and 127 for disengaged).

---Unquote---

 

(NOT showing my extreme fan control levels - optimized for silence and power)

 

People who specify the PWM file (can be any machine, not only ThinkPads) use it like this:

 

fan /sys/devices/platform/thinkpad_hwmon/pwm1

 

But they must then find their own numbers from 0 to 255 for the different speeds.

 

/MTJ