<?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=Aij</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=Aij"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Aij"/>
	<updated>2026-04-06T12:44:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Tp_smapi&amp;diff=35408</id>
		<title>Tp smapi</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Tp_smapi&amp;diff=35408"/>
		<updated>2007-12-27T20:28:03Z</updated>

		<summary type="html">&lt;p&gt;Aij: /* Installation in Gentoo */ hdaps use flag is actually lower case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
The &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; kernel module exposes some features of the ThinkPad hardware/firmware via a &amp;lt;tt&amp;gt;sysfs&amp;lt;/tt&amp;gt; interface. Currently, the main implemented functionality is control of battery charging and extended battery status. It also includes an improved version of the [[HDAPS]] driver. The underlying hardware interfaces are [[SMAPI support for Linux|SMAPI]] and direct access to the embedded controller.&lt;br /&gt;
&lt;br /&gt;
For older ThinkPad models, see also [[tpctl]].&lt;br /&gt;
&lt;br /&gt;
{{WARN|This driver uses undocumented features and direct hardware access. It thus cannot be guaranteed to work and could conceivably damage your computer (though so far no incidents have been reported).}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
*Battery charge/discharge control&lt;br /&gt;
*Battery status information&lt;br /&gt;
&lt;br /&gt;
===Project Homepage / Availability===&lt;br /&gt;
* Project page: http://tpctl.sourceforge.net/&lt;br /&gt;
* You need to [http://sourceforge.net/project/showfiles.php?group_id=1212&amp;amp;package_id=171579 download] only the &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
====Installation from source====&lt;br /&gt;
You will need the kernel headers and makefiles corresponding to your current kernel version. On {{Fedora}}, this means {{cmdroot|yum install kernel-devel-$(uname -r)}} .&lt;br /&gt;
&lt;br /&gt;
:{{cmdroot|tar xzvf tp_smapi-0.33.tgz}}&lt;br /&gt;
:{{cmdroot|cd tp_smapi-0.33}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, either compile and load the driver within the current working directory (for testing):&lt;br /&gt;
:{{cmdroot|make load}}&lt;br /&gt;
OR compile and install into the kernel's module path:&lt;br /&gt;
:{{cmdroot|make install}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use the [[HDAPS]] driver, add &amp;lt;tt&amp;gt;HDAPS=1&amp;lt;/tt&amp;gt; to also patch the &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; for compatibility with &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; (this requires a kernel source tree matching the current kernel).&lt;br /&gt;
Again, either load the driver within the current working directory:&lt;br /&gt;
:{{cmdroot|1=make load HDAPS=1}}&lt;br /&gt;
OR install into the kernel's module path:&lt;br /&gt;
:{{cmdroot|1=make install HDAPS=1}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To prepare a stand-alone patch against the current kernel tree (including&lt;br /&gt;
a patch against &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; and new &amp;lt;tt&amp;gt;Kconfig&amp;lt;/tt&amp;gt; entries):&lt;br /&gt;
:{{cmdroot|make patch}}&lt;br /&gt;
&lt;br /&gt;
To delete all autogenerated files:&lt;br /&gt;
:{{cmdroot|make clean}}&lt;br /&gt;
&lt;br /&gt;
The original kernel tree is never modified by any these commands. &lt;br /&gt;
The {{path|/lib/modules}} directory is modified only by {{cmdroot|make install}}.&lt;br /&gt;
&lt;br /&gt;
====Installation in Gentoo====&lt;br /&gt;
The {{Gentoo}} portage system carries a [http://packages.gentoo.org/packages/?category=app-laptop;name=tp_smapi tp_smapi package], which follows the latest version pretty closely. On a Gentoo system, you can install and load as follows.&lt;br /&gt;
&lt;br /&gt;
If you use the [[HDAPS]] driver, do this first:&lt;br /&gt;
&lt;br /&gt;
* Configure &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; as module in your kernel&lt;br /&gt;
* Add the &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; use flag in {{path|/etc/make.conf}}&lt;br /&gt;
* {{cmdroot|rmmod hdaps}}&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
* {{cmdroot|emerge tp_smapi}} (or install tp_smapi with hdaps support manually, as above)&lt;br /&gt;
* {{cmdroot|echo &amp;quot;tp_smapi&amp;quot; &amp;gt;&amp;gt; /etc/modules.autoload.d/kernel-2.6}}&lt;br /&gt;
* {{cmdroot|echo &amp;quot;hdaps&amp;quot; &amp;gt;&amp;gt; /etc/modules.autoload.d/kernel-2.6}}&lt;br /&gt;
&lt;br /&gt;
Then reboot, or run:&lt;br /&gt;
* {{cmdroot|modprobe tp_smapi}}&lt;br /&gt;
* {{cmdroot|modprobe hdaps}}&lt;br /&gt;
&lt;br /&gt;
====Installation on Debian unstable (sid) or testing (lenny)====&lt;br /&gt;
Debian now contains the [http://packages.debian.org/tp-smapi packaged module source] for use with module-assistant.&lt;br /&gt;
&lt;br /&gt;
* {{cmdroot|apt-get install tp-smapi}}&lt;br /&gt;
* {{cmdroot|m-a -t a-i tp-smapi}}&lt;br /&gt;
&lt;br /&gt;
====Installation on Ubuntu/Debian====&lt;br /&gt;
Installation on Ubuntu or Debian is quite easy, but there are a few things to look after:&lt;br /&gt;
&lt;br /&gt;
To get your system ready for compiling code, install the build-essentials (as root, of course, as all of the following comands; Ubuntu users have to prepend 'sudo' to every line and enter their own password when prompted):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;apt-get install build-essential&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get tp_smapi to work, obtain the latest source as mentioned above and unpack it. If you want to use HDAPS, you need to install the kernel source matching te kernel you are running. To do so, issue this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;uname -r&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you the version of your current kernel. As Ubuntu adds '-generic' to the kernel-version, the following command works for Debian users only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;apt-get install linux-source-`uname -r`&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Ubuntu users use the kernel-version they got by the command before, e.g. 'linux-source-2.6.20'&lt;br /&gt;
&lt;br /&gt;
Now change to the tp_smapi dir:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd tp_smapi-X.YY&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt; (X.YY being the version-number of [[tp_smapi]])&lt;br /&gt;
and make and install tp_smapi as instructed above.&lt;br /&gt;
&lt;br /&gt;
If you get an error that the kernel version isn't matching (or that you need to set KSRC/KBUILD), please check that there is a symlink from the modules dir to the kernel source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;root@localhost:~#ls -l /lib/modules/2.6.20-16-generic&lt;br /&gt;
lrwxrwxrwx  1 root root     28 2007-02-02 08:39 source -&amp;gt; /usr/src/linux-source-2.6.20&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Create the link if the line above is not existent:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;root@localhost:~#ln -s /usr/src/linux-source-2.6.20 /lib/modules/2.6.20-16-generic/source&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the following will build and install the correct modules to their locations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;make install HDAPS=1&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
To make sure your system loads the modules at boot time, do this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;tp_smapi&amp;quot; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
echo &amp;quot;hdaps&amp;quot; &amp;gt;&amp;gt; /etc/modules&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
and update your initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;update-initramfs -u&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get tp_smapi running now, just load the modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;modprobe -a tp_smapi hdaps&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This description was tested on Kubuntu 'Feisty Fawn' and should work on all Debian-based distros with minor tweaks.&lt;br /&gt;
&lt;br /&gt;
'''EDIT:''' Works on Kubuntu 7.10 (&amp;quot;Gutsy Gibbon&amp;quot;), too&lt;br /&gt;
&lt;br /&gt;
===Battery charge control features===&lt;br /&gt;
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):&lt;br /&gt;
:{{cmdroot|echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh}}&lt;br /&gt;
:{{cmdroot|echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh}}&lt;br /&gt;
:{{cmdroot|cat /sys/devices/platform/smapi/BAT0/*_charge_thresh}}&lt;br /&gt;
{{HINT|Battery charging thresholds can be used to keep Li-Ion ad Li-Polymer batteries partially charged, in order to [[Maintenance#Battery_treatment|increase their lifetime]].}}&lt;br /&gt;
To prevent charging for 17 minutes (regardless of thresholds):&lt;br /&gt;
:{{cmdroot|echo 17 &amp;gt; /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes}}&lt;br /&gt;
{{HINT|Charge inhibiting can be used to reduce the power draw of the laptop, in order to use an under-spec power supply that can't handle the combined power draw of running and charging. It can also be used to control which battery is charged when [[How to use UltraBay batteries|using an Ultrabay battery]].}}&lt;br /&gt;
&lt;br /&gt;
To cancel charging preventation:&lt;br /&gt;
:{{cmdroot|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):&lt;br /&gt;
:{{cmdroot|echo 1 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge}}&lt;br /&gt;
{{HINT|This can be used to choose which battery is discharged when [[How to use UltraBay batteries|using an UltraBay battery]].}}&lt;br /&gt;
&lt;br /&gt;
To cancel forced discharge:&lt;br /&gt;
:{{cmdroot|echo 0 &amp;gt; /sys/devices/platform/smapi/BAT0/force_discharge}}&lt;br /&gt;
&lt;br /&gt;
===Battery status features===&lt;br /&gt;
To view extended battery status such as charging state, voltage, current, capacity, cycle count and model information:&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_percent&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_running_time&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/remaining_charging_time&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/barcoding&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/chemistry&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/serial&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/manufacture_date&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/first_use_date&lt;br /&gt;
# cat /sys/devices/platform/smapi/BAT0/temperature # in milli-Celsius&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 is also available, including some fields not listed above (in case you can figure them out):&lt;br /&gt;
&lt;br /&gt;
:{{cmdroot|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;
Note that the battery status readout conflicts with the stock [[HDAPS|hdaps]] driver, so if you use &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; you will need to load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; using {{cmdroot|1=make load HDAPS=1}} (see [[#Bundled hdaps driver|Bundled hdaps driver]] below).&lt;br /&gt;
&lt;br /&gt;
On [[ACPI]]-enabled systems, most of above information is also available through the files under {{path|/proc/acpi/battery}}. However, the ACPI interface does not include the instantaneous power and cycle count readouts, and does not work well when [[How to use UltraBay batteries|hotswapping UltraBay batteries]].&lt;br /&gt;
&lt;br /&gt;
===Other features===&lt;br /&gt;
&lt;br /&gt;
There is also [[sysfs]] attribute for making direct SMAPI requests to the SM BIOS firmware. Don't touch it unless you really know what you're doing. Example:&lt;br /&gt;
 # echo '211a 100 0 0' &amp;gt; /sys/devices/platform/smapi/smapi_request; cat /sys/devices/platform/smapi/smapi_request&lt;br /&gt;
 211a 34b b2 0 0 0 'OK'&lt;br /&gt;
The &amp;quot;4b&amp;quot; in the 2nd value, converted to decimal, is 75: the current charging stop threshold (stop_charge_thresh).&lt;br /&gt;
&lt;br /&gt;
===Bundled &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; driver===&lt;br /&gt;
&lt;br /&gt;
The tp_smapi package includes a modified version of the &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; Linux kernel driver used by the [[HDAPS]] system. To use &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; concurrently, you '''must''' use the modified version.&lt;br /&gt;
&lt;br /&gt;
To build the modified version, simply append the &amp;lt;tt&amp;gt;HDAPS=1&amp;lt;/tt&amp;gt; parameter to the &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; command (see [[#Installation|Installation]] above):&lt;br /&gt;
:{{cmdroot|1=make load HDAPS=1}}&lt;br /&gt;
or&lt;br /&gt;
:{{cmdroot|1=make install HDAPS=1}}&lt;br /&gt;
&lt;br /&gt;
If you don't do that, you will not be able to load &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt; (and its support module &amp;lt;tt&amp;gt;thinkpad_ec&amp;lt;/tt&amp;gt;) when &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; is loaded, and vice versa. You can use &amp;lt;tt&amp;gt;rmmod&amp;lt;/tt&amp;gt; to switch between these modules.&lt;br /&gt;
&lt;br /&gt;
Note that some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}), independently of &amp;lt;tt&amp;gt;tp_smapi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The modified &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; has several changes:&lt;br /&gt;
* The &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; driver in mainline kernels conflicts with the extended battery status (they use the same IO ports). The modified &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; coordinates this access through the bundled &amp;lt;tt&amp;gt;thinkpad_ec&amp;lt;/tt&amp;gt; driver.&lt;br /&gt;
* The modified &amp;lt;tt&amp;gt;hdaps&amp;lt;/tt&amp;gt; driver fixes reliability and improves support for recent ThinkPad models (*60 and newer), since unlike the mainline driver, it correctly follows the Embedded Controller communication protocol.&lt;br /&gt;
* Several other improvements, such as the ability to control the polling rate.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If you get &amp;quot;&amp;lt;tt&amp;gt;thinkpad_ec: no ThinkPad embedded controller!&amp;lt;/tt&amp;gt;&amp;quot; when trying to load the module on a supported model listed below, you should [[BIOS_Upgrade|upgrade your BIOS]]. Some early BIOS (like 1.x on the X31) don't handle the embedded controller.&lt;br /&gt;
&lt;br /&gt;
===Model-specific status===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 92%&amp;quot;&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&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;
! colspan=11 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; | &lt;br /&gt;
=====A series=====&lt;br /&gt;
|-&lt;br /&gt;
{{tp_smapi/model_status_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
! {{A22p}} 2629-USG&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{A30}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! colspan=11 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
=====G series=====&lt;br /&gt;
|-&lt;br /&gt;
{{tp_smapi/model_status_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
! {{G41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! colspan=11 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
=====R series=====&lt;br /&gt;
|-&lt;br /&gt;
{{tp_smapi/model_status_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} ||      ||  || No SMAPI BIOS&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{R50}}&lt;br /&gt;
| {{Cunk}} || {{Cno}}  || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{R50e}} 1834-JAG&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}} 18*&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.32 || 3.22 || Machine types 1829, 1830, 1831 and 1836&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}} 28*&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      || 1.29 || Machine types 2883, 2887, 2888, 2889, 2894 and 2495&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.33 || 1.29 ||&lt;br /&gt;
|-&lt;br /&gt;
! {{R60}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} ||{{Cyes}}  || {{Cno|text=}} 1 || 0.33 || ||&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
! colspan=11 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
=====T series=====&lt;br /&gt;
|-&lt;br /&gt;
{{tp_smapi/model_status_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T20}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} ||      ||  || Has SMAPI BIOS but no function is supported. EC LPC3 protocol fails.&lt;br /&gt;
|-&lt;br /&gt;
! {{T22}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} ||      ||  || Has SMAPI BIOS but no function is supported. EC LPC3 protocol fails.&lt;br /&gt;
|-&lt;br /&gt;
! {{T23}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T30}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}} 2373-AM9&lt;br /&gt;
| {{Cno}} || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.32 || 3.20 || EC v3.04&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}} 2373-KXU&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.32 || 3.21 || Stop charge threshold works in Windows, but dmesg says &amp;quot;__get_real_thresh: cannot get stop_thresh of bat=0: Function is not supported by SMAPI BIOS&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}} 2373-KUU&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}} 2686&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.33 || 1.27 ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes|text=}} 0 ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T60}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 7 || 0.32 ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T60p}} 8743-CTO&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.32 ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{T61}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 1 || 0.32 ||  || [http://ubuntuforums.org/showthread.php?p=3146719 ref]&lt;br /&gt;
|-&lt;br /&gt;
! {{T61p}} 6457-7XG&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 1 || 0.32 ||  || [http://ubuntuforums.org/showthread.php?p=3146719 ref]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=11 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
=====X series=====&lt;br /&gt;
|-&lt;br /&gt;
{{tp_smapi/model_status_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X20}} 2662-31G&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X30}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cunk}}  || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 3 || 0.32 || 2.08 || EC v1.62&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 3 || 0.32 ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X41_Tablet}}&lt;br /&gt;
| {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}}   || {{Cno|text=}} (see ref) || 0.32  || || [http://sourceforge.net/mailarchive/message.php?msg_name=4757BD30.8080808%40ugcs.caltech.edu ref] ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X60}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 ||      || 2.07 || EC v1.10, 2.6.20 issue (see discussion)&lt;br /&gt;
|-&lt;br /&gt;
! {{X60s}}&lt;br /&gt;
| {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{X61s}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 / 3 || 0.32 ||  || [http://www.slackwiki.org/ThinkPad_X61s ref] says 3 but conflicting report received&lt;br /&gt;
|-&lt;br /&gt;
! {{X60_Tablet}}&lt;br /&gt;
| {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cunk}} ||      ||  || [http://luke.no-ip.org/x60tablet/ ref] [http://rad.bioinfo.ulaval.ca/hardware/x60tablet ref]&lt;br /&gt;
|-&lt;br /&gt;
! {{X61_Tablet}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 || 0.32  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! colspan=11 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
=====Z series=====&lt;br /&gt;
|-&lt;br /&gt;
{{tp_smapi/model_status_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Z60m}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{Z60t}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{Z61m}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.32 ||  ||&lt;br /&gt;
|-&lt;br /&gt;
! {{Z61t}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} ||      ||  || [https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/45014 ref]&lt;br /&gt;
|-&lt;br /&gt;
! {{Z61p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cunk}} ||      ||  ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMAPI capabilities may depend on the BIOS version as well, so upgrading to the latest version of the BIOS might provide more SMAPI functions (especially true for long-lived BIOS with lots of releases, like the TP-1R).&lt;br /&gt;
&lt;br /&gt;
Please update the above and report your experience on the [[Talk:tp_smapi|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; error 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;
While at it, you may also want to add your laptop to the [[list of DMI IDs]].&lt;br /&gt;
&lt;br /&gt;
=====HDAPS axis orientation=====&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; The HDAPS axis orientation is set using the &amp;lt;tt&amp;gt;invert&amp;lt;/tt&amp;gt; module parameter (at load time) or sysfs attribute (at runtime). The tp_smapi's hdaps driver supports all 8 possible sensor orientations (inversion and swapping). You can use [[HDAPS#Visualisation_of_ThinkPad_orientation|hdaps visualisation]] to check if the settings is correct.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;invert&amp;lt;/tt&amp;gt; is an integer between 0 and 7, whose meaning is as follows. Let &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt; denote the hardware readouts. Let &amp;lt;tt&amp;gt;R&amp;lt;/tt&amp;gt; denote the laptop's roll (tilt left/right), and let &amp;lt;tt&amp;gt;P&amp;lt;/tt&amp;gt; denote the laptop's pitch (tilt forward/backward). The possible values are as follows:&lt;br /&gt;
    invert=0:   R= X  P= Y   (same as mainline)&lt;br /&gt;
    invert=1:   R=-X  P=-Y   (same as mainline)&lt;br /&gt;
    invert=2:   R=-X  P= Y   (new)&lt;br /&gt;
    invert=3:   R= X  P=-Y   (new)&lt;br /&gt;
    invert=4:   R= Y  P= X   (new)&lt;br /&gt;
    invert=5:   R=-Y  P=-X   (new)&lt;br /&gt;
    invert=6:   R=-Y  P= X   (new)&lt;br /&gt;
    invert=7:   R= Y  P=-X   (new)&lt;br /&gt;
&lt;br /&gt;
[[Category:Drivers]] [[Category:Patches]]&lt;br /&gt;
&lt;br /&gt;
===Tools using this driver===&lt;br /&gt;
&lt;br /&gt;
The driver's interface can be accessed directly through the files under {{path|/sys/devices/platform/smapi}}, or via the following tools:&lt;br /&gt;
* [[KThinkBat]] - display battery status on the KDE &amp;lt;tt&amp;gt;kicker&amp;lt;/tt&amp;gt; panel.&lt;br /&gt;
* [[gkrellm-ThinkBat]] - battery status plugin for Gkrellm2&lt;br /&gt;
* {{CodeRef|thinkpad-smapi.sh}} - script to display various SMAPI information using tp_smapi module.&lt;/div&gt;</summary>
		<author><name>Aij</name></author>
		
	</entry>
</feed>