Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some newer Thinkpads (especially T520, W520, X220, T420(s), L420) are not supported #2

Open
GoogleCodeExporter opened this issue Jul 11, 2015 · 14 comments

Comments

@GoogleCodeExporter
Copy link

In case of T520, X220, T420(s), L420 and probably some other newer models, 
thinkpad_acpi doesn't create a /proc/acpi/ibm/thermal file. Instead, the 
thermal sensors are provided via sysfs and hwmon. At the moment tpfand 
completely relies on /proc/acpi/ibm/thermal which should be fixed, as this 
might disappear in further thinkpad_acpi versions.


Original issue reported on code.google.com by [email protected] on 9 Sep 2011 at 7:26

@GoogleCodeExporter
Copy link
Author

benjy@W520:~$ cat /proc/acpi/ibm/thermal
cat: /proc/acpi/ibm/thermal: Datei oder Verzeichnis nicht gefunden
benjy@W520:~$ 

On Lenovo W520.

Original comment by [email protected] on 6 Nov 2011 at 8:21

@GoogleCodeExporter
Copy link
Author

The Lenovo X220 Tablet is affected by this, too.

I am using the following sensors with thinkfan:

    % find /sys/devices -type f -name "temp*_input"       
    /sys/devices/platform/coretemp.0/temp1_input
    /sys/devices/platform/coretemp.0/temp2_input
    /sys/devices/platform/coretemp.0/temp3_input
    /sys/devices/virtual/hwmon/hwmon0/temp1_input

Original comment by [email protected] on 29 Nov 2011 at 6:42

@GoogleCodeExporter
Copy link
Author

You should at least make the error message more clear for now, so that the user 
gets to know what is failing without any stracing.

Original comment by [email protected] on 29 Nov 2011 at 6:43

@GoogleCodeExporter
Copy link
Author

Hi,
Thanks for this effort in this piece of code, greatly appreciated !
I have a problem though, trynig to install it on linux mint 11, on a T420i.
The install log is : 
"
unable to set fanspeed, enable watchdog or read temperature Fatal error
please make sure you are root and a recent thinkpad_acpi module is loaded with 
fan_control=1 [fail]
"
plus, i have installed thinkpad_acpi from repositories, and :

arnaud@Arnaud-THINK /etc/modprobe.d $ cat thinkpad_acpi.conf 
options thinkpad_acpi fan_control=1

the 'old' tp-fancontrol script does not seem to be able to start either : 

arnaud@Arnaud-THINK /etc/modprobe.d $ sudo tp-fancontrol -qd
7116 (process ID) old priority 0, new priority -10
arnaud@Arnaud-THINK /etc/modprobe.d $ ps -A | grep 7116

let us know when you find out how to work-around this, and if you need further 
information or testing support !

thanks again.

Original comment by [email protected] on 16 Dec 2011 at 12:44

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 10 Jan 2012 at 11:49

  • Changed title: *Some newer Thinkpads (especially T520, W520, X220, T420(s), L420) are not supported *

@GoogleCodeExporter
Copy link
Author

Hello,

I just patched my tpfanco to support my Thinkpad X220 Tablet. You find my patch 
attached.

Greetings,
paalsteek

Original comment by [email protected] on 27 Nov 2012 at 7:18

Attachments:

@GoogleCodeExporter
Copy link
Author

Same error here on an X121e as arnolege although the module is loaded and 
/proc/acpi/ibm/thermal exists.

Original comment by [email protected] on 17 Dec 2012 at 10:38

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I am on Ubuntu 14.04 with a X220, can I safely apply the patch by 
[email protected] ? How do I do this?

Original comment by [email protected] on 14 Jan 2015 at 2:15

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

FYI, I created issue #10, which could be related to this issue / Stephan's 
patch.

Original comment by [email protected] on 18 Mar 2015 at 12:06

@GoogleCodeExporter
Copy link
Author

I have succesfully used stephan's patch on 14.04 for months. Thank you for the 
patch, Stephan!.
However, there seems to be an issue with (I believe) newer kernels. I have had 
it succesfully run on kernel 3.13 (run "uname -r" in terminal to check 
version), but it has stopped working now. Will post that issue later, first, 
here's the answer to Jakobru's question:

@Jakobru: you'd need to:

(1) download the tpfanco source code (see 
https://code.google.com/p/tpfanco/source/checkout)
(2) download stephan's patch
(3) apply the patch using the 'patch' command
(4) install tpfan-admin, tpfand, and tpfand-profiles, by following the README 
file in each of those folders.

Example with the necessary commands:
(1)
  $ cd ~/Downloads;
  $ svn checkout http://tpfanco.googlecode.com/svn/trunk/ tpfanco-read-only

This should have created the folder ~/Downloads/tpfanco-readonly

(2)
  download Stephan's patch, save it to ~/Downloads/tpfanco-readonly/

(3)
  $ cd ~/Downloads/tpfanco-readonly/
  $ patch -p1 < ./tpfand/src/tpfand/control.py 

(4)
  $ cd tpfand
  $ sudo make install-sysvinit
  $ cd ../tpfan-admin
  $ sudo make install
  $ cd ../tpfand-profiles
  $ sudo make install

(5) reboot

That should take care of the installation, although I don't remember whether 
the daemon will start automatically and whether you need to create menu entries 
yourself, etc..

Original comment by [email protected] on 18 Mar 2015 at 12:29

@GoogleCodeExporter
Copy link
Author

tl;dr: new patch, see attachment. Installation instructions per #12.


As stated in issue #10, Stephan's patch does not work on newer systems. I found 
the cause:

The system temperature inodes have been moved from

    /sys/devices/platform/coretemp.0/temp*_input (the location Stephan's patch uses)

to

    /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp*_input (the new location)

I created a patch (attached), based on Stephan's patch to account for this. The 
patch checks both locations (as well as the old /proc/acpi/ibm/thermal).

Additionally, tpfand will now correctly throw an error and refuse to start if 
all these three paths fail. This behaviour was already intended in Stephan's 
patch, but the patch contained a bug that caused the daemon to start anyway. 
This resulted in the fan(s) being stuck at 0 RPM, i.e. not rotating, causing 
CPU temperature to rise enormously under load, until emergeny measures to 
prevent overheating kicked in (e.g. throttling, powerclamp, laptop turning off).

The patched version is currently working fine on my laptop. Installation 
instructions are identical to those listed under #12 above.

P.S. to anyone who wants to further improve the patch: for higher robustness, 
it would be better to recursively look for the temp*_input inodes (starting at 
/sys/devices/platform/coretemp.0/), instead of using hard-coded paths. Since 
this was my first time programming in Python ever, and due to lack of time, I 
won't be implementing that. But if you'd like to, please do. This link may 
help: http://stackoverflow.com/a/2186565/

Original comment by [email protected] on 18 Mar 2015 at 9:02

Attachments:

@GoogleCodeExporter
Copy link
Author

Correction to #12:

The commands in (3) should be:

(3)
  $ cd ~/Downloads/tpfanco-readonly/
  $ patch -p1 < ./new_thinkpads.patch

Apologies for the spamming, shame you cannot edit comments.

Original comment by [email protected] on 18 Mar 2015 at 9:13

@tpfanco tpfanco locked and limited conversation to collaborators Jul 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant