<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=80.58.10.107</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=80.58.10.107"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/80.58.10.107"/>
	<updated>2026-09-18T09:51:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:SMAPI_support_for_Linux&amp;diff=13463</id>
		<title>Talk:SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:SMAPI_support_for_Linux&amp;diff=13463"/>
		<updated>2005-12-17T22:02:53Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Feedback */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Feedback ==&lt;br /&gt;
&lt;br /&gt;
Someone reported cd_speed works on T42 but on mine, it doesn't: this is 2378DXU&lt;br /&gt;
&lt;br /&gt;
--[[User:eBug]] 22:55, 17 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Great, great work! Really! This completely rocks. I just stopped my battery from charging at 77% and restarted charging a bit later, no problems whatsoever. BTW, this is on kernel 2.6.14.3.&lt;br /&gt;
&lt;br /&gt;
--[[User:Spiney|spiney]] 21:25, 5 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
None of the fuctions is working on my T40, kernel 2.6.14-mm2.&lt;br /&gt;
&lt;br /&gt;
--[[User:Lammic|lammic]], 2005.12.05&lt;br /&gt;
&lt;br /&gt;
Works for me on a T41 running 2.6.12-10-686 (Ubuntu 5.10).&lt;br /&gt;
&lt;br /&gt;
--[[User:berndtnm|berndtnm]], 2005.12.06&lt;br /&gt;
&lt;br /&gt;
Including stop_charge_thresh? That one seems to be missing on the T42p.&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 00:46, 7 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
tp_smapi works just fine on an R52 with Ubuntu Breezy stock kernel.&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 12:52, 7 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
''To set the thresholds for starting and stopping battery charging (in percent of current capacity):''&lt;br /&gt;
&lt;br /&gt;
'''current''' really? That'd be weird, I'd expect it to be percent of '''total''' capacity.&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 14:39, 7 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Current full charge capacity&amp;quot;, as opposed to &amp;quot;current remaining capacity&amp;quot; or &amp;quot;designed full charge capacity&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 15:05, 7 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Battery features don't work with my T41p. I can't check this with windows. Can anybody try these features?&lt;br /&gt;
&lt;br /&gt;
-- Nils, 7 Dec 2005&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Nils, does cdrom_speed work for you on the T41p? Could you provide the details requested in the README (dmesg etc.)?&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 21:57, 7 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
CDRom Speed seems to work. (I see no warnings, but I have to do a speed test.) Now, I've send all outputs to the email-address in the readme.&lt;br /&gt;
&lt;br /&gt;
-- Nils, 8 Dec 2005&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
All the features except the stop_charge_thresh seem to work here on a t42p. &lt;br /&gt;
One note, the start_charge_thresh seems to really be stop_charge_thresh. Ie, If I set that to lower than my current battery %, it will never charge, &lt;br /&gt;
and if I set it to 100 the battery charges all the way. &lt;br /&gt;
&lt;br /&gt;
--[[User:Nirik|Nirik]] 16 Dec 2005&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Nirik, &amp;quot;all the features&amp;quot; as of which version? For example, do the force_discharge{1,2} in tp_smapi 0.12 also work for you? See the table in the article page. About start_charge, that's odd. Can you send me a log of what you did, what was the result a what was the dmesg output for each operation?&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 14:16, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
System T40p:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fairlight:/sys/devices/platform/smapi/BAT0# echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
fairlight:/sys/devices/platform/smapi/BAT0# echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
fairlight:/sys/devices/platform/smapi/BAT0# dmesg   &lt;br /&gt;
tp_smapi: req_in: BX=2118 CX=100 DI=0 SI=0&lt;br /&gt;
tp_smapi: req_out: AX=8680 BX=2118 CX=100 DX=b2 DI=0 SI=0 ret=-38&lt;br /&gt;
tp_smapi: SMAPI error: Function is not supported by SMAPI BIOS (func=2118)&lt;br /&gt;
tp_smapi: cannot get force_discharge1 of battery 0: Function is not supported by SMAPI BIOS&lt;br /&gt;
tp_smapi: req_in: BX=2104 CX=100 DI=0 SI=0&lt;br /&gt;
tp_smapi: req_out: AX=80 BX=2103 CX=100 DX=78 DI=0 SI=0 ret=0&lt;br /&gt;
tp_smapi: cannot get force_discharge2 of battery 0: bx=2103&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So it seems force_discharge1 is not supported at all. But force_discharge2? By the way, i think wiki is a _very_ good idea for collecting information, but not for discussion. I would prefer a maillinglist. We can use sourceforge.&lt;br /&gt;
&lt;br /&gt;
--[[User|StefanSchmidt]]&lt;br /&gt;
&lt;br /&gt;
force_discharge2 is indicating a real error condition (bx=2103 which has bit 0x02 on), but I have no idea what the error is or how to fix it. Sorry. If you can trigger this function under Windows and have SoftICE or equivalent, maybe it can be worked out.&lt;br /&gt;
&lt;br /&gt;
About the Wiki discussion, I'm not sure a mailing list is justified yet, but you can use the linux-thinkpad list or the e-mail address in the README. &lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 21:42, 16 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
OK, then i use linux-thinkpad to get more people involved. I'am away the next weeks, but i hope to find some time to hacking on tp_smapi.&lt;br /&gt;
&lt;br /&gt;
--[[User:StefanSchmidt]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Changing the CD speed when the CD is being accessed will hang your computer==&lt;br /&gt;
&lt;br /&gt;
I don't have this problem on my T40p. CDROM is mounted and file on CD is opened. Change speed do '''not''' hang my system.&lt;br /&gt;
&lt;br /&gt;
-- Stefan Schmidt&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
An open file looks fine if you're not reading/writing at that point. But my T43 does hangs on this:&lt;br /&gt;
 # dd if=/dev/scd0 of=/dev/null &amp;amp;&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/cdrom_speed&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 16:41, 7 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
OK, sorry. I was to fast. My system hangs on this commands, too. :(&lt;br /&gt;
&lt;br /&gt;
-- Stefan Schmidt&lt;br /&gt;
&lt;br /&gt;
Works well. Great.&lt;br /&gt;
&lt;br /&gt;
T42 2373-8zh. Working :cdrom_speed and start_charge_thresh. Untest : inhibit_charge_minutes.&lt;br /&gt;
&lt;br /&gt;
-- Haifeng Chen&lt;br /&gt;
&lt;br /&gt;
cdrom_speed works on my T40.&lt;br /&gt;
&lt;br /&gt;
-- [[User:Lammic|lammic]], 2005.12.09&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;thinkpad&amp;quot; module kernel compatibility ==&lt;br /&gt;
&lt;br /&gt;
Ajunge, how do you compile the &amp;quot;thinkpad&amp;quot; module compile on kernel &amp;gt;=2.6.9? The latest thinkpad version (5.8) still uses &amp;quot;get_cpu_ptr&amp;quot; and &amp;quot;set_cpu_ptr&amp;quot;, which were removed in 2.6.9.&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 13:53, 10 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Kernel Patch? ==&lt;br /&gt;
&lt;br /&gt;
Hello Thinker,&lt;br /&gt;
&lt;br /&gt;
would it be possible to provide the SMAPI support as kernel patch as well? Something along the lines of: (0.12 against 2.6.15-rc5)&lt;br /&gt;
&lt;br /&gt;
''(deleted, see below for how to create a patch file)''&lt;br /&gt;
&lt;br /&gt;
Deleted the tp_smapi.c file at the end, out of obvious reasons, and I'm not sure about the placement in the ACPI section, OTOH there it would be found easily next to ibm_acpi.&lt;br /&gt;
&lt;br /&gt;
Providing a patch would help when recompiling the kernel often, I hate recompiling external modules every time (even got me a kernel-upgrade script to do most of it automatically). But of course it's up to you. :)&lt;br /&gt;
&lt;br /&gt;
--[[User:Spiney|spiney]] 09:52, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I'll be glad to add this, but I don't want to go through additional manual steps in the release process (there are already quite a few). Can you add a &amp;quot;make patch&amp;quot; functionality to the Makefile, or something of the sort, to automatically generate a full patch (including tp_smapi.c) against current kernel sources?&lt;br /&gt;
&lt;br /&gt;
Also, this shouldn't be under drivers/acpi, since it doesn't use ACPI at all (that's why I didn't make it a patch to ibm_acpi). I think the right place is drivers/firmware, like the dell_rbu driver for Dell laptops.&lt;br /&gt;
&lt;br /&gt;
BTW, the convention for kernel patches is to start them once level higher:&lt;br /&gt;
  diff -Nurp kernel-2.6.14-vanilla kernel-2.6.14-patched&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 17:12, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Of course it's from the wrong level, as usual I was just lazy/inattentive. And at one point I'll remember who likes what patch format, promise. ;)&lt;br /&gt;
&lt;br /&gt;
A patch target as in &amp;quot;create a new file holding a correct diff to current kernel source&amp;quot; would be rather difficult, since line numbers might change etc., but applying the patch should be straighforward with a bit of sed. Of course I could just do that, create a patch with the diff command and then apply the new patch file in reverse. ;)&lt;br /&gt;
&lt;br /&gt;
--[[User:Spiney|spiney]] 18:36, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
If it does that on a local copy (no changes the original kernel tree) and cleans up after itself, that's fine with me. :-)&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 18:50, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Ok, here's a shell script that creates the patch, feel free to use it under the terms of the GPL. For example call it from your Makefile with the patch target: (I didn't want to put all the script into the Makefile, since the rules about escaping in Makefiles, well, escape me ;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
KDIR=/lib/modules/$(uname -r)/build&lt;br /&gt;
FDIR=drivers/firmware&lt;br /&gt;
OPWD=$(pwd)&lt;br /&gt;
&lt;br /&gt;
TMPDIR=$(mktemp -d)&lt;br /&gt;
cd $TMPDIR&lt;br /&gt;
&lt;br /&gt;
mkdir -p a/$FDIR&lt;br /&gt;
cp $KDIR/$FDIR/{Kconfig,Makefile} a/$FDIR&lt;br /&gt;
cp -r a b&lt;br /&gt;
sed -i -e '/endmenu/i\&lt;br /&gt;
config IBM_SMAPI\&lt;br /&gt;
        tristate &amp;quot;IBM ThinkPad SMAPI Support&amp;quot;\&lt;br /&gt;
        depends on X86\&lt;br /&gt;
        ---help---\&lt;br /&gt;
        This adds SMAPI support on IBM ThinkPads, mostly used for battery\&lt;br /&gt;
        charge control. For more information about this driver see\&lt;br /&gt;
        &amp;lt;http://www.thinkwiki.org/wiki/SMAPI_support_for_Linux&amp;gt; .\&lt;br /&gt;
\&lt;br /&gt;
        If you have an IBM ThinkPad laptop, say Y or M here.\&lt;br /&gt;
' b/$FDIR/Kconfig&lt;br /&gt;
sed -i -e '$a\&lt;br /&gt;
obj-$(CONFIG_IBM_SMAPI)            += tp_smapi.o' b/$FDIR/Makefile&lt;br /&gt;
cp $OPWD/tp_smapi.c b/$FDIR&lt;br /&gt;
diff -Nurp a b &amp;gt; $OPWD/tp_smapi-$(uname -r).patch&lt;br /&gt;
rm -r a b&lt;br /&gt;
cd $OPWD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BTW, [http://qbnz.com/highlighter/ GeSHi]-based syntax-highlighting would be great...&lt;br /&gt;
&lt;br /&gt;
--[[User:Spiney|spiney]] 19:28, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Ah, neat sed foo. How about [http://tpctl.sourceforge.net/tmp/Makefile this] escapade, then? &lt;br /&gt;
&lt;br /&gt;
What's the sed spell needed to replace the Makefile's&lt;br /&gt;
 VER  := 0.13&lt;br /&gt;
with auto-parsing of&lt;br /&gt;
 #define TP_VERSION &amp;quot;0.13&amp;quot;&lt;br /&gt;
from tp_smapi.c?&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 20:37, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Hmm, something like&lt;br /&gt;
 VERFROMC=$(sed -ne 's/^#define TP_VERSION &amp;quot;\(.*\)&amp;quot;/\1/gp' tp_smapi.c)&lt;br /&gt;
 sed -i -e &amp;quot;s/^VER := .*$/VER := $VERFROMC/&amp;quot; Makefile&lt;br /&gt;
should do (untested, from the top of my head, maybe the temporary variable isn't even necessary?). And neat Makefile wizardry, at one point I'll learn the syntax.&lt;br /&gt;
&lt;br /&gt;
--[[User:Spiney|spiney]] 20:44, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Makefile escaping is horrible, keep avoiding it... Anyway, the updated [http://tpctl.sourceforge.net/tmp/Makefile make patch] seems to do the right thing.&lt;br /&gt;
&lt;br /&gt;
--[[User:Thinker|Thinker]] 21:36, 16 Dec 2005 (CET)&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13469</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13469"/>
		<updated>2005-12-17T21:55:58Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13461</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13461"/>
		<updated>2005-12-17T21:55:36Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cno}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13460</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13460"/>
		<updated>2005-12-17T21:49:50Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13459</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13459"/>
		<updated>2005-12-17T21:48:10Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13458</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13458"/>
		<updated>2005-12-17T21:45:43Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cno}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13457</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13457"/>
		<updated>2005-12-17T21:39:35Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13456</id>
		<title>SMAPI support for Linux</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13456"/>
		<updated>2005-12-17T21:37:41Z</updated>

		<summary type="html">&lt;p&gt;80.58.10.107: /* Model-specific status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some&lt;br /&gt;
hardware control functionality that is not exposed by any other interface (e.g., ACPI).&lt;br /&gt;
&lt;br /&gt;
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; for older ThinkPads, and &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; for newer ones.&lt;br /&gt;
&lt;br /&gt;
{{WARN|These drivers use undocumented features and direct hardware access. They thus cannot be guaranteed to work, and may cause arbitrary damage&lt;br /&gt;
(especially on models they weren't tested on).}}&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the  implemented functionality is control of battery charging (this is useful for [[Maintenance#Battery_Treatment|increasing battery lifetime]] or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging), and control of CD/DVD speed.&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to donwnload only the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 tp_smapi kernel module].&lt;br /&gt;
&lt;br /&gt;
====Installation====&lt;br /&gt;
&lt;br /&gt;
To compile and load the module:&lt;br /&gt;
&lt;br /&gt;
 # tar xzvf tp_smapi-0.12.tgz&lt;br /&gt;
 # cd tp_smapi-0.12&lt;br /&gt;
 # make load&lt;br /&gt;
&lt;br /&gt;
To install permanently (optional):&lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
 # modprobe tp_smapi&lt;br /&gt;
&lt;br /&gt;
====Battery charge control features====&lt;br /&gt;
&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
&lt;br /&gt;
 # echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh&lt;br /&gt;
 # echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;
 40 &lt;br /&gt;
 70&lt;br /&gt;
&lt;br /&gt;
To unconditionally inhibit charging for 17 minutes:&lt;br /&gt;
&lt;br /&gt;
 # echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To cancel charge inhibiting:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes&lt;br /&gt;
&lt;br /&gt;
To force battery discharging even if connected to AC, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
(Probably only one of these will work on your laptop; please check the dmesg output to see which one, and update the status below.)&lt;br /&gt;
&lt;br /&gt;
To cancel forced disharge, use one of these:&lt;br /&gt;
&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge1&lt;br /&gt;
 # echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Battery status features====&lt;br /&gt;
&lt;br /&gt;
To view exteded battery status (see below about conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/installed&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/cycle_count &lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_capacity&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/design_voltage&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacturer&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/model&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/ac_connected&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The raw status data, including some fields not in the above (in case&lt;br /&gt;
you can figure them out):&lt;br /&gt;
&lt;br /&gt;
 # cat /sys/devices/platform/smapi/BAT0/dump  &lt;br /&gt;
&lt;br /&gt;
In all of the above, replace &amp;lt;tt&amp;gt;BAT0&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;BAT1&amp;lt;/tt&amp;gt; to address the 2nd battery.&lt;br /&gt;
&lt;br /&gt;
====Optical drive control features====&lt;br /&gt;
&lt;br /&gt;
To control the speed of the optical drive:&lt;br /&gt;
 # echo 0 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # slow&lt;br /&gt;
 # echo 1 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # medium&lt;br /&gt;
 # echo 2 yes_crash_my_computer &amp;gt; /sys/devices/platform/smapi/cd_speed # fast&lt;br /&gt;
 # cat /sys/devices/platform/smapi/cd_speed&lt;br /&gt;
 2&lt;br /&gt;
{{WARN|Changing the CD speed simultaneously with a read or write to the CD will '''hang your computer'''. This feature is thus disabled by default, but can be enabled using &amp;lt;tt&amp;gt;#define PROVIDE_CD_SPEED&amp;lt;/tt&amp;gt;. The safe way to set the drive speed is using &amp;lt;tt&amp;gt;hdparm -E num&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x num&amp;lt;/tt&amp;gt; for CD-ROM, and [http://safari.iki.fi/speedcontrol.c speedcontrol -x num] for DVD.}}&lt;br /&gt;
&lt;br /&gt;
====Other features====&lt;br /&gt;
&lt;br /&gt;
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control and fan control. See the included README file for more information.&lt;br /&gt;
&lt;br /&gt;
====Conflict with &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
The extended battery status function conflicts with the [[HDAPS|hdaps]] kernel module (they use the same IO ports). If you load &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; will disable its battery status functions (and log a message in the kernel log). If you load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; first, &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; will refuse to load. Use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between the two.&lt;br /&gt;
&lt;br /&gt;
Some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}).&lt;br /&gt;
&lt;br /&gt;
The charging control files (&amp;lt;tt&amp;gt;*_charge_thresh&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inhibit_charge_minutes&amp;lt;/tt&amp;gt;) don't have this problem.&lt;br /&gt;
&lt;br /&gt;
====Model-specific status====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+&amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; feature support matrix&lt;br /&gt;
|-&lt;br /&gt;
! &amp;amp;times; &lt;br /&gt;
! &amp;lt;tt&amp;gt;start_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_&amp;lt;br /&amp;gt;thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_&amp;lt;br /&amp;gt;minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge1&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                           &amp;lt;tt&amp;gt;force_&amp;lt;br /&amp;gt;discharge2&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                                                     battery status files&amp;lt;br \&amp;gt;&amp;lt;font size=&amp;quot;-2&amp;quot;&amp;gt;(see notice about &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; above)&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cno}}  || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}}  || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives a &amp;quot;&amp;lt;tt&amp;gt;not supported&amp;lt;/tt&amp;gt;&amp;quot; or &amp;quot;&amp;lt;tt&amp;gt;not implementeded&amp;lt;/tt&amp;gt;&amp;quot; when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the &amp;lt;tt&amp;gt;dmesg&amp;lt;/tt&amp;gt; output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.&lt;br /&gt;
&lt;br /&gt;
==Using the &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt; module==&lt;br /&gt;
&lt;br /&gt;
This solution consists of a module, called &amp;lt;tt&amp;gt;thinkpad&amp;lt;/tt&amp;gt;, and a user-space tool caled &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt;. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. Kernel 2.6.9 and newer is unsupported; for kernel 2.6.3 and newer you need &amp;lt;tt&amp;gt;tpctl&amp;lt;/tt&amp;gt; &amp;gt;=4.14 and &amp;lt;tt&amp;gt;thinkpad &amp;lt;/tt&amp;gt; &amp;gt;=5.5. For details, see the [http://tpctl.sourceforge.net/README README] and [http://tpctl.sourceforge.net/SUPPORTED-MODELS list of supported models].&lt;br /&gt;
&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to download the [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=29354t thinkpad module] and [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=1204 tpctl userspace tool].&lt;br /&gt;
* There is also an optional GUI: [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=99929 configure-thinkpad].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]] [[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>80.58.10.107</name></author>
		
	</entry>
</feed>