Projektvorstellung: Tpfanco - Wartung und Paketierung von tp-fan

Myon

Member
Registriert
2 März 2007
Beiträge
795
Hi,

einige von euch werden sicherlich Thinkpad Fan Control (aka tpfand, tpfan-admin oder tp-fan) von S. Urban kennen. Da tp-fan leider seit Ubuntu Jaunty nicht mehr gewartet wird, waren ab Ubuntu 10.10 immer kompliziertere Anleitungen nötig, um das Ding doch zum Laufen zu bekommen. Da ich auf das Hacken von alten deb-Paketen keine Lust mehr habe und die Anleitungen mittlerweile sowieso größtenteils von mir stammen, habe ich nun mal beschlossen, ein Projekt zum Warten und Paketieren von tp-fan zu gründen:

http://code.google.com/p/tpfanco/

Die schlimmsten Launchpad Bugs von tp-fan sind gefixt, Pakete für Natty, Maverick und Lucid stehen zum Download bereit. Auch Kubuntu und Xubuntu werden unterstützt.

Ich habe zwar die Thinkpad Wiki Seite zu TPFC bereits aktualisiert, das offizielle Wiki ist jedoch das Googlecode-Wiki (derzeit nur auf Englisch). Dort finden sich auch Häufig gestellte Fragen und Installationshinweise.

Eine Launchpad-Seite mit PPA ist vorerst nicht geplant, das Paketieren für Nicht Debian basierte Distris müssen deren Benutzer wohl selbst übernehmen. Der Quellcode ist natürlich vorhanden, ebenso ein SVN Repository.

Wie kann man als Benutzer dem Projekt helfen?
Tests und Feedback seien erwünscht. Außerdem wäre es nett, wenn man gute Lüfterprofile für TP-Modelle einsenden könnte, für die es noch gar keine Profile gibt. Wie man das macht steht hier erklärt.

Gruß
Myon
 
Hi,

coole Sache! :thumbup:

Kannst Du nicht auch die üblichen Deb-Paketquellen, d.h. .dsc und .diff.gz bereitstellen? Dann kümmere ich mich ums Hochladen ins TPEX-PPA. Oder kann ich einfach das SVN auschecken?
 
Zuletzt bearbeitet:
Hi Myon,

erstmal danke für deine Arbeit.

Ich habe die Pakete auf einem neuen T520 mit frischem Ubuntu Natty gemäß Anleitung installiert (ja, auch neu gestartet), kann aber weder tpfand, noch tpfan-admin (logisch) starten. Manuelles Entladen und Laden des Kernelmoduls funktioniert zwar ohne Fehlermeldung, bringt aber auch keinen Erfolg.

Hast du eine Idee, was da schiefläuft?

Code:
root@thinkpad:/# /etc/init.d/tpfand restart
 * Restarting ThinkPad fan control daemon tpfand                                                                                                         tpfand 0.95 - Copyright (C) 2007-2008 Sebastian Urban
This program comes with ABSOLUTELY NO WARRANTY

WARNING: THIS PROGRAM MAY DAMAGE YOUR COMPUTER.
         PROCEED ONLY IF YOU KNOW HOW TO MONITOR SYSTEM TEMPERATURE.

Fatal error: unable to set fanspeed, enable watchdog or read temperature
             Please make sure you are root and a recent
             thinkpad_acpi module is loaded with fan_control=1

Code:
root@thinkpad:/# lsmod | grep thinkpad
thinkpad_acpi          73750  0 
snd                    55295  15 thinkpad_acpi,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
nvram                  14035  1 thinkpad_acpi

Code:
root@thinkpad:/# cat /etc/modprobe.d/tpfand.conf 
options thinkpad_acpi fan_control=1

Code:
root@thinkpad:/# uname -a
Linux thinkpad 2.6.38-11-generic-pae #48-Ubuntu SMP Fri Jul 29 20:51:21 UTC 2011 i686 i686 i386 GNU/Linux

Code:
root@thinkpad:/# modinfo thinkpad_acpi
filename:       /lib/modules/2.6.38-11-generic-pae/kernel/drivers/platform/x86/thinkpad_acpi.ko
license:        GPL
version:        0.24
description:    ThinkPad ACPI Extras
author:         Henrique de Moraes Holschuh <hmh@hmh.eng.br>
author:         Borislav Deianov <borislav@users.sf.net>
alias:          dmi:bvnIBM:bvrI[MU]ET??WW*
alias:          tpacpi
srcversion:     0B6457473BB90551EE1D20F
alias:          acpi*:LEN0068:*
alias:          acpi*:IBM0068:*
depends:        snd,nvram
vermagic:       2.6.38-11-generic-pae SMP mod_unload modversions 686 
parm:           experimental:Enables experimental features when non-zero (int)
parm:           debug:Sets debug level bit-mask (uint)
parm:           force_load:Attempts to load the driver even on a mis-identified ThinkPad when true (bool)
parm:           fan_control:Enables setting fan parameters features when true (bool)
parm:           brightness_mode:Selects brightness control strategy: 0=auto, 1=EC, 2=UCMS, 3=EC+NVRAM (uint)
parm:           brightness_enable:Enables backlight control when 1, disables when 0 (uint)
parm:           hotkey_report_mode:used for backwards compatibility with userspace, see documentation (uint)
parm:           volume_mode:Selects volume control strategy: 0=auto, 1=EC, 2=N/A, 3=EC+NVRAM (uint)
parm:           volume_capabilities:Selects the mixer capabilites: 0=auto, 1=volume and mute, 2=mute only (uint)
parm:           volume_control:Enables software override for the console audio control when true (bool)
parm:           index:ALSA index for the ACPI EC Mixer (int)
parm:           id:ALSA id for the ACPI EC Mixer (charp)
parm:           enable:Enable the ALSA interface for the ACPI EC Mixer (bool)
parm:           hotkey:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           bluetooth:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           video:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           light:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           cmos:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           led:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           beep:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           brightness:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           volume:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           fan:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           dbg_wlswemul:Enables WLSW emulation (uint)
parm:           wlsw_state:Initial state of the emulated WLSW switch (bool)
parm:           dbg_bluetoothemul:Enables bluetooth switch emulation (uint)
parm:           bluetooth_state:Initial state of the emulated bluetooth switch (bool)
parm:           dbg_wwanemul:Enables WWAN switch emulation (uint)
parm:           wwan_state:Initial state of the emulated WWAN switch (bool)
parm:           dbg_uwbemul:Enables UWB switch emulation (uint)
parm:           uwb_state:Initial state of the emulated UWB switch (bool)
 
Hi Crow,

danke für deine Rückmeldung. Kannst du denn den Lüfter per Hand kontrollieren, also über /proc/acpi/ibm/fan ?
Z.B. sollte
Code:
echo level 0 > /proc/acpi/ibm/fan
bewirken, dass der Lüfter gar nicht dreht, während man mit
Code:
echo level 7 > /proc/acpi/ibm/fan
auf die maximale Lüfterstufe schaltet (siehe hier)
 
Dass Sensoren aus einzelnen Dateien eingelesen werden kann man sicher implementieren, das Konfigurieren von lm-sensors müsste man aber dann dem Benutzer aufbürden. Ich schaue mal was ich tun kann.
 
Thread sticky.

@Myon:
Du weißt jetzt, was von mir als nächstes kommt? ;)
 
Ich nochmal,

ich denke, mit lm-sensors hat das gar nichts zu tun. Dieses setzt m.W. auch nur auf die gegebenen Dateien in /proc bzw. /sys auf und da hat sich offenbar einiges verändert.

So, wie es bei mir aussieht, gibt es nur einen (zwei?) Sensor(en) (bzw. nur einen, der abgefragt werden kann?).

Code:
root@thinkpad:/# find /sys -name "temp*"
/sys/devices/virtual/thermal/thermal_zone0/temp
/sys/devices/virtual/hwmon/hwmon0/temp1_input
/sys/devices/virtual/hwmon/hwmon0/temp1_crit
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/temperature
/sys/devices/pnp0/00:0a/temp_deactivated
Die ersten beiden zeigen dasselbe an, sind jedoch keine Links.

Code:
root@thinkpad:/# cat /sys/devices/virtual/hwmon/hwmon0/temp1_input
31000
Das entspricht wohl 31°C ?

Code:
root@thinkpad:/# cat /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/temperature
51
Was auch immer das zu bedeuten hat. Grafikkarte bei 51°C ?

Andernorts kann man unter anderem von diesen Dateien lesen, die bei mir aber bis auf den Letzten nicht existieren:

/sys/devices/platform/coretemp.0/temp1_input
/sys/devices/platform/coretemp.2/temp1_input
/sys/devices/virtual/hwmon/hwmon0/temp1_input

Da müsste man wohl einiges ändern und erweitern, um alle möglichen Fälle abzudecken, oder?
 
Andernorts kann man unter anderem von diesen Dateien lesen, die bei mir aber bis auf den Letzten nicht existieren:

/sys/devices/platform/coretemp.0/temp1_input
/sys/devices/platform/coretemp.2/temp1_input
/sys/devices/virtual/hwmon/hwmon0/temp1_input


Da müsste man wohl einiges ändern und erweitern, um alle möglichen Fälle abzudecken, oder?

Diese Dateien erscheinen, wenn man lm-sensors wie im von dir verlinkten Artikel einrichtet. Dabei wird ermittelt, welche thermische Sensoren vorhanden sind,
sodass die entsprechenden Module geladen werden können. Diese Module werden dann /etc/modules angefügt. Bei mir sind es z.B. coretemp und max6650. Sind sie geladen, so schaut bei mir das Ganze folgendermaßen aus:

Code:
/sys/devices/platform/coretemp.0/temp1_max
/sys/devices/platform/coretemp.0/temp1_label
/sys/devices/platform/coretemp.0/temp1_crit_alarm
/sys/devices/platform/coretemp.0/temp1_input
/sys/devices/platform/coretemp.0/temp1_crit
/sys/devices/platform/coretemp.1/temp1_max
/sys/devices/platform/coretemp.1/temp1_label
/sys/devices/platform/coretemp.1/temp1_crit_alarm
/sys/devices/platform/coretemp.1/temp1_input
/sys/devices/platform/coretemp.1/temp1_crit
/sys/devices/platform/thinkpad_hwmon/temp9_input
/sys/devices/platform/thinkpad_hwmon/temp10_input
/sys/devices/platform/thinkpad_hwmon/temp11_input
/sys/devices/platform/thinkpad_hwmon/temp12_input
/sys/devices/platform/thinkpad_hwmon/temp13_input
/sys/devices/platform/thinkpad_hwmon/temp14_input
/sys/devices/platform/thinkpad_hwmon/temp15_input
/sys/devices/platform/thinkpad_hwmon/temp16_input
/sys/devices/platform/thinkpad_hwmon/temp1_input
/sys/devices/platform/thinkpad_hwmon/temp2_input
/sys/devices/platform/thinkpad_hwmon/temp3_input
/sys/devices/platform/thinkpad_hwmon/temp4_input
/sys/devices/platform/thinkpad_hwmon/temp5_input
/sys/devices/platform/thinkpad_hwmon/temp6_input
/sys/devices/platform/thinkpad_hwmon/temp7_input
/sys/devices/platform/thinkpad_hwmon/temp8_input
/sys/devices/virtual/thermal/thermal_zone0/temp
/sys/devices/virtual/thermal/thermal_zone1/temp
/sys/devices/virtual/hwmon/hwmon0/temp1_input
/sys/devices/virtual/hwmon/hwmon0/temp1_crit
/sys/devices/virtual/hwmon/hwmon0/temp2_input
/sys/devices/virtual/hwmon/hwmon0/temp2_crit
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/temperature
/sys/devices/pnp0/00:0b/temp_deactivated

und ohne

Code:
/sys/devices/platform/thinkpad_hwmon/temp9_input
/sys/devices/platform/thinkpad_hwmon/temp10_input
/sys/devices/platform/thinkpad_hwmon/temp11_input
/sys/devices/platform/thinkpad_hwmon/temp12_input
/sys/devices/platform/thinkpad_hwmon/temp13_input
/sys/devices/platform/thinkpad_hwmon/temp14_input
/sys/devices/platform/thinkpad_hwmon/temp15_input
/sys/devices/platform/thinkpad_hwmon/temp16_input
/sys/devices/platform/thinkpad_hwmon/temp1_input
/sys/devices/platform/thinkpad_hwmon/temp2_input
/sys/devices/platform/thinkpad_hwmon/temp3_input
/sys/devices/platform/thinkpad_hwmon/temp4_input
/sys/devices/platform/thinkpad_hwmon/temp5_input
/sys/devices/platform/thinkpad_hwmon/temp6_input
/sys/devices/platform/thinkpad_hwmon/temp7_input
/sys/devices/platform/thinkpad_hwmon/temp8_input
/sys/devices/virtual/thermal/thermal_zone0/temp
/sys/devices/virtual/thermal/thermal_zone1/temp
/sys/devices/virtual/hwmon/hwmon0/temp1_input
/sys/devices/virtual/hwmon/hwmon0/temp1_crit
/sys/devices/virtual/hwmon/hwmon0/temp2_input
/sys/devices/virtual/hwmon/hwmon0/temp2_crit
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/temperature
/sys/devices/pnp0/00:0b/temp_deactivated


Da müsste man wohl einiges ändern und erweitern, um alle möglichen Fälle abzudecken, oder?

Alle möglichen Fälle abzudecken wäre schon sehr fehleranfällig. Da würde ich eher den Weg von Thinkfan gehen und den Benutzer explizit dazu auffordern, die Sensoren selber einzutragen.

Thread sticky.
@Myon:
Du weißt jetzt, was von mir als nächstes kommt? ;)
Außer Wiki fällt mir leider nichts mehr ein, aber darum hab ich mich ja eigentlich schon gekümmert ;)
 
Du hast den Punkt getroffen :thumbup:
Vielleicht solltest Du im Wiki-Artikel einen Verweis auf diesen Thread einbauen, solange das Projekt läuft ;)

[OT]
übrigens: ein schöner Erfahrungsbericht zu Linux auf Deinem 390
[OT]
 
Du hast den Punkt getroffen :thumbup:
Vielleicht solltest Du im Wiki-Artikel einen Verweis auf diesen Thread einbauen, solange das Projekt läuft ;)

[OT]
übrigens: ein schöner Erfahrungsbericht zu Linux auf Deinem 390
[OT]

[x] Done

@Myon
Aha²

Danke für den Hinweis, hat geklappt.
Wie gesagt, ich schaue mal, was man tun kann, wird schon etwas Zeit kosten, da tpfand derzeit komplett auf /proc/acpi/ibm/fan setzt und bei dessen Fehlen gleich den Dienst verweigert. Wahrscheinlich werde ich einfach irgendwo in /etc eine sensors.conf anlegen, in der entweder "/proc/acpi/ibm/fan" oder eben einzelne Sensoren stehen.
 
Hallo,

Ich bin so vorgegangen wie beschrieben. Habe die tpfanco Pakete installiert. Nur lässt sich das Problem auch nicht mit ein Neustart lösen.

http://code.google.com/p/tpfanco/wiki/Installation

Ich stoße genau auf das Problem. Weder tpfan-admin, noch Thinkpad Fan Control Gui, lässt sich starten. Immer die selbe Fehlermeldung:

"Unable to connect to ThinkPad Fan Control daemon (tpfand).

Please make sure you are running this program on a supported IBM/Lenovo ThinkPad,
a recent thinkpad_acpi module is loaded with fan_control=1 and tpfand has been started
."


Ubuntu 11.10, 3.0.0.11 Kernel, T420s
 
Hallo,

Ich bin so vorgegangen wie beschrieben. Habe die tpfanco Pakete installiert. Nur lässt sich das Problem auch nicht mit ein Neustart lösen.

http://code.google.com/p/tpfanco/wiki/Installation

Ich stoße genau auf das Problem. Weder tpfan-admin, noch Thinkpad Fan Control Gui, lässt sich starten. Immer die selbe Fehlermeldung:

"Unable to connect to ThinkPad Fan Control daemon (tpfand).

Please make sure you are running this program on a supported IBM/Lenovo ThinkPad,
a recent thinkpad_acpi module is loaded with fan_control=1 and tpfand has been started
."


Ubuntu 11.10, 3.0.0.11 Kernel, T420s
Ich sehe gerade, dass du ein T420s hast, damit bist du leider vom selben Bug wie Crow betroffen:
http://code.google.com/p/tpfanco/issues/detail?id=2
Bei tpfan ist die Quelle für Sensoren leider hart kodiert. Damit auch andere Quellen sauber und fehlerfrei ausgewertet werden können, bedarf es doch recht umfangreicher Änderungen an dem Code, der ja bekanntlich nicht von mir stammt. Zeitlich schaut es bei mir aber aktuell nicht so gut aus, da ich vor kurzem mit meiner Masterarbeit angefangen habe.

Daher muss ich bei deinem Modell zu thinkfan raten. Hier wird der Workaround für T420s beschrieben:
http://thinkpad-wiki.org/Thinkfan#K...29.2C_L420_mit_Ubuntu_11.04_.2F_Kernel_2.6.38
 
Ach, danke. Ich dachte, ich bin irgendwie davon verschont. Thinkfan bin ich am benutzen, dachte mir nur, dass eine nette GUI einfach intuitiver ist. Vielen dank aber für die schnelle Antwort. Da es fest vercodet ist, lässt sich ja scheinbar in den nächsten Monaten nichts dazu machen.

=) Finde echt super, wie viel Mühe du und Linrunner euch gibt..

Edit:

Kann man nicht einfach einen symlink zwischen den nicht vorhandenen Pfad und den /sys/.. von den aktuellen Modellen machen?
 
Leider nicht. Bei /proc/acpi/ibm/thermal bekommt man nämlich auf einmal alle Sensorenwerte:
Code:
#cat /proc/acpi/ibm/thermal
temperatures:   54 52 35 -128 25 -128 25 -128 44 49 55 -128 -128 -128 -128 -128
während es bei hwsensors ein Wert pro Pfad gilt:
Code:
#cat /sys/devices/virtual/hwmon/hwmon0/temp1_input
53000
#cat /sys/devices/virtual/hwmon/hwmon0/temp1_crit
127000
Zudem liefern manche Pfade dieselben Werte, während andere gar nichts zurückgeben. Wenns vollautomatisch gehen soll, müsste man quasi über alle Pfade iterieren und gucken, ob was brauchbares dabei rauskommt. Oder aber es wie bei Thinkfan machen und den Nutzer die Sensoren selber eintragen lassen.
 
Ah, herzlichen Dank. Hat bei mir wunderbar geklappt. Erfahrungsbericht folgt - ich geniesse gerade die Ruhe ;)
 
Also mir fällt auf, dass der Lüfter immerwieder kurz etwas hochdreht und dann wieder zum eingestellten Wert zurückgeht (das dauert lediglich etwa eine Sekunde).
Meine Einstellungen sehen so aus: http://www.abload.de/image.php?img=screenshot-thinkpadfanbqrw.png

Ich muss es noch etwas länger beobachten, aber es dürften nur ~150rpm Differenz sein - nur höre ich's sehr gut. Er dreht ganz schnell ~150rpm hoch und dann langsam wieder runter. Und das alle ~5 Sekunden. Ich weiss nur, dass dieses Verhalten bei z.B. TPFC unter Windows nicht zu beobachten ist.

Wenn ich weitere Informationen liefern soll, nur fragen.

Edit: Sorry für den Doppelpost.
 
Zuletzt bearbeitet:
  • ok1.de
  • thinkstore24.de
  • Preiswerte-IT - Gebrauchte Lenovo Notebooks kaufen
Zurück
Oben