Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
T420 and tp_smapi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
kaffeesurogat
n00b
n00b


Joined: 17 Sep 2011
Posts: 4

PostPosted: Sat Sep 17, 2011 9:02 pm    Post subject: T420 and tp_smapi Reply with quote

Hi all,

finally i got my T420 and gentoo is something like up and running. One thing is still missing.

The tp_smapi module doesn't seem to work. According to the following link

http://thinkpad-forum.de/threads/116122-tp_smapi-Ladeschwellen-auf-T420%28s%29-X220-...-Tester-gesucht

mr. specialist was able to add a patch to the tp_smapi module which isn't included in the unstable tc_smapi-0.40-r3 version.

Can somebody give me some hints how to install this patch with gentoo ?

Thanks,

Nico
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 608
Location: Würzburg, Deutschland

PostPosted: Mon Sep 19, 2011 1:20 pm    Post subject: Reply with quote

I did the same trick using a modified ebuild in a local overlay; basically, you have to add the T420 to the list of supported machines. I wanted to submit the change to the bug tracker, but didn't when I realized that not all functions work as expected (in particular, changing the charge thresholds). However, my main reason for installing it was the enhanced hdaps module which works fine.

Anyway, the patch you need is
Code:
--- a/thinkpad_ec.c     2011-06-25 18:38:10.149829023 +0200
+++ b/thinkpad_ec.c     2011-06-25 18:38:51.157829163 +0200
@@ -456,6 +456,7 @@
                TP_DMI_MATCH("IBM", "ThinkPad A30"),
                TP_DMI_MATCH("IBM", "ThinkPad T23"),
                TP_DMI_MATCH("IBM", "ThinkPad X24"),
+               TP_DMI_MATCH("LENOVO", "ThinkPad T420"),
                { .ident = NULL }
        };
        return dmi_find_substring(DMI_DEV_TYPE_OEM_STRING,
Clone the existing tp_smapi ebuild into your local overlay, add the patch to the files directory and then add it to the epatch command in src_prepare. If you did everything correctly (and don't forget ebuild digest ;) ), the modified ebuild will install the patched driver.
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 877
Location: Germany

PostPosted: Mon Oct 17, 2011 9:41 am    Post subject: Reply with quote

Hi.

I've also got some problems with my T420.
I followed the power saving guides on www.thinkpad-wiki.org so far and installed the tlp package.
For some reason, tlp-stat is saying thinkpad_acpi wasn't available
Code:

/proc/acpi/ibm/thermal = (thinkpad_acpi not available)

So I can't get a reading of my temperatures. However, in the kernel (3.0.6-gentoo), thinkpad acpi is set.
Can anyone help me there?

The other thing is tp_smapi. Emerging tp_smapi-0.40-r3 works, but upon modprobing thinkpad_ec, tp_smapi, I get
Code:

FATAL: Error inserting tp_smapi (/lib/modules/3.0.6-gentoo/extra/tp_smapi.ko): No such device


Is this the error you are getting as well and what the patch is for?
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 608
Location: Würzburg, Deutschland

PostPosted: Mon Oct 17, 2011 10:45 am    Post subject: Reply with quote

/proc/acpi/ibm/thermal doesn't exist for me either, but as I don't need it, I didn't try to find out why. Could be that the T420 does not support it anymore, or that the thinkpad_acpi driver needs to be upated for the newer models. tp_smapi won't work out of the box as it doesn't recognize the T420 as a supported device. The patch adds the T420 to the whitelist, enabling support. With the patch, you get limited tp_smapi support, but not everything works as it should (e.g. setting charge thresholds). However, the hdaps in the tp_smapi actually works with this patch and can be used to enable active disk protection using hdapsd.
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 877
Location: Germany

PostPosted: Mon Oct 17, 2011 2:18 pm    Post subject: Reply with quote

Thanks.
I think I'll wait for an updated version.
The laptop works so far and that's the most important thing.
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
sDoky
n00b
n00b


Joined: 14 Dec 2010
Posts: 28
Location: CZE

PostPosted: Sat Oct 22, 2011 9:22 am    Post subject: Reply with quote

I have found (do not know where) a patch for tp_smapi to work on my t420 (i5 sandy bridge). I cannot remember where have I gotten this ... I usually compile it by typing:
Code:
# make clean install HDAPS=1
The version from portage does not load for my machine (this does). If anyone could get this into portage (like an USE flag for tp_smapi for example), it would be sooo great. Cause I have to recompile this module every time I upgrade kernel, and then I have to overwrite those files with this ...

http://www.stud.fit.vutbr.cz/~xdokou10/tp_smapi-0.40_t420.tar.gz

EDIT: I have posted a reply to found bug on this matter
https://bugs.gentoo.org/show_bug.cgi?id=375697&list_id=523099
Back to top
View user's profile Send private message
Garg0yl3
n00b
n00b


Joined: 10 Nov 2011
Posts: 2

PostPosted: Thu Nov 10, 2011 6:21 am    Post subject: Lenovo T420 Reply with quote

Hi All,

I am about to purchase the T420 i5 with the intention of running Gentoo on it.

Do any of you have problems with heat/continuous fan with this laptop?
And also, what is the battery life like on Gentoo? Lastly, which kernel version
are you running?

Thanks heaps.

James
Back to top
View user's profile Send private message
sDoky
n00b
n00b


Joined: 14 Dec 2010
Posts: 28
Location: CZE

PostPosted: Thu Nov 10, 2011 6:43 am    Post subject: Reply with quote

Hi, I am running
Code:
sdoky-t420 ~ # uname -a
Linux sdoky-t420 3.0.7-gentoo #6 SMP PREEMPT Fri Nov 4 09:15:31 CET 2011 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux

I have the 6-cell battery, it does not last as much as on windows (concerning all power consuming tunings), but not much. This kernel about 4h, with powersave cpu governor and LCD set to 30% brightness.

Everything works, including fingerprint reader, webcam, stereo microphone, just everything ...

Great machine, go ahead and buy ;)

EDIT: the CPU goes up to 80°C (compiling for quite a while), but the laptop has great cooling system and it is neither loud, nor hot (on the surface).
The Lenovo dock, they sell separately does help cooling a little bit, though it is not needed (imho). I definetely recommend the dock as it turns your laptop into powerful desktop.
Back to top
View user's profile Send private message
CkoTuHa
n00b
n00b


Joined: 27 Mar 2009
Posts: 74

PostPosted: Thu Nov 10, 2011 8:12 am    Post subject: all having thinkpads Reply with quote

btw, all thinkpad ownwers perhaps should update their bioses to the most recent one.
they had issues with fan stalling/speeding and cpu temps escalating:
http://forum.lenovo.com/t5/T400-T500-and-newer-T-series/T420s-Fan-noise-Issue/td-p/443569

so go and update your bios, yeah
Back to top
View user's profile Send private message
Garg0yl3
n00b
n00b


Joined: 10 Nov 2011
Posts: 2

PostPosted: Thu Nov 10, 2011 9:53 am    Post subject: Reply with quote

Thanks for the info sDoky.. If you want to try improve your battery life under linux,
have a look here: http://www.fewt.com/2011/09/about-kernel-30-power-regression-myth.html

CkoTuHa, I checked out the thread on the lenovo forum you provided, but it seems that the BIOS
fix is not out yet.. the Lenovo staff said it should be released mid-Nov, that's for the T420s, not
sure when the fix for the T420 is coming out.
Back to top
View user's profile Send private message
Mr. M
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2004
Posts: 89
Location: USA

PostPosted: Fri Nov 11, 2011 10:55 pm    Post subject: Reply with quote

Setting the battery thresholds doesn't work using tp_smapi on T420/T420s, see this discussion:

https://github.com/evgeni/tp_smapi/issues/3

Reportedly, setting the thresholds using "tpacpi-bat" works (see link above). But I haven't tried it myself (I set the thresholds in Windows). Also, the BIOS update may fix this problem.
Back to top
View user's profile Send private message
Helmering
n00b
n00b


Joined: 13 Dec 2011
Posts: 60
Location: Italy

PostPosted: Tue Dec 13, 2011 12:40 pm    Post subject: Reply with quote

Hi forum,

Battery threshold start/stop using tpacpi-bat https://github.com/teleshoes/tpbattstat-applet/blob/master/tpacpi-bat now works flawlessly and persistant on my:

Thinkpad W520
BIOS 1.34

- As it is a single Perl-Script I copied it in /usr/bin/local and created some alias in /etc/bash/bashrc for faster controll.
- script requires (masked) acpi-call.

Cheers
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum