<?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=NikoEhrenfeuchter</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=NikoEhrenfeuchter"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/NikoEhrenfeuchter"/>
	<updated>2026-05-06T03:26:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=SMAPI_support_for_Linux&amp;diff=13260</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=13260"/>
		<updated>2005-12-14T17:33:52Z</updated>

		<summary type="html">&lt;p&gt;NikoEhrenfeuchter: /* added X24 tp_smapi information */&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.10.tgz&lt;br /&gt;
 # cd tp_smapi-0.10&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;
====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'''. Provide the &amp;lt;tt&amp;gt;yes_crash_my_computer&amp;lt;/tt&amp;gt; string as above to acknowledge this (and make sure the CD is not in use). The &amp;lt;tt&amp;gt;hdparm -E&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;eject -x&amp;lt;/tt&amp;gt; commands might also work for you, and are safer (but have no effect for DVD on some models, such as ThinkPad T43).}}&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_thresh&amp;lt;/tt&amp;gt; &lt;br /&gt;
!           &amp;lt;tt&amp;gt;stop_charge_thresh&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                      &amp;lt;tt&amp;gt;inhbit_charge_minutes&amp;lt;/tt&amp;gt;&lt;br /&gt;
!                                  &amp;lt;tt&amp;gt;cd_speed&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}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R50p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R51}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{R52}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T40p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T41p}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cyes}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42}}&lt;br /&gt;
| {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T42p}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{T43p}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X24}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X31}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X32}}&lt;br /&gt;
| {{Cno}}  || {{Cno}}  || {{Cno}}  || {{Cunk}} || {{Cunk}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X40}}&lt;br /&gt;
| {{Cyes}} || {{Cno}}  || {{Cyes}} || {{Cunk}} || {{Cyes}}&lt;br /&gt;
|-&lt;br /&gt;
! {{X41}}&lt;br /&gt;
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{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>NikoEhrenfeuchter</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Problem_with_high_pitch_noises&amp;diff=1530</id>
		<title>Problem with high pitch noises</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Problem_with_high_pitch_noises&amp;diff=1530"/>
		<updated>2005-02-02T13:48:34Z</updated>

		<summary type="html">&lt;p&gt;NikoEhrenfeuchter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information on strange high pitch, low volume noises emitted by ThinkPads.&lt;br /&gt;
&lt;br /&gt;
==Problem description==&lt;br /&gt;
Even though ThinkPads are known as very silent notebooks, they tend to emit different, mostly high pitch noises in certain circumstances. The noises are of low volume and hence not realized by everyone or at least tolerated by most people. However, there are those with &amp;quot;bat like ears&amp;quot; that hear them and might be annoyed by that.&lt;br /&gt;
&lt;br /&gt;
==Affected Models==&lt;br /&gt;
Noises have been experienced in the following situations:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#DDDDDD;&amp;quot; | situation&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#DDDDDD;&amp;quot; | noise description&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#DDDDDD;&amp;quot; | affected models&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
ThinkPad suspended to RAM&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
constant high pitch noise&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[:Category:T42p | T42p]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
ThinkPad connected to power and switched off, with battery fully charged&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
constant high pitch noise&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[:Category:T41p | T41p]]&lt;br /&gt;
**2373-GHG&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
moving windows or just the mouse in xorg&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
strange noise like a rapid series of very short high pitch noises adding to a constant kind of whistling (only as long as the movement goes)&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[:Category:T41p | T41p]]&lt;br /&gt;
**2373-GHG&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
Thinkpad connected to power or working on battery, also when suspended to RAM&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
High pitch noise also when HD is powered down.&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[:Category:T23 | T23]]&lt;br /&gt;
**2647-DG4&lt;br /&gt;
*[[:Category:X24 | X24]]&lt;br /&gt;
**2662-MWG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Affected Operating Systems==&lt;br /&gt;
*Linux, all flavours&lt;br /&gt;
&lt;br /&gt;
==Status==&lt;br /&gt;
Similar phenomena was experienced with models from the T2x aera, like i.e. on the [[:Category:T23 | T23]]. On these models the problem was related to the graphics circuitry and occured especially or only while making use of DirectDraw funktions. IBM was able to fix it through a BIOS upgrade.&lt;br /&gt;
&lt;br /&gt;
It is likely that the noises discovered on recent models are related to the graphics chip as well.&lt;br /&gt;
&lt;br /&gt;
==Solutions==&lt;br /&gt;
From Martin Steigerwald: I made the observation that I get at least less high pitch noises on my ThinkPad T23 when I do not use the two ACPI modules &amp;quot;processor&amp;quot; and &amp;quot;thermal&amp;quot; (depends on the first one). I have no clue, why. Anyone with similar experiences?&lt;br /&gt;
&lt;br /&gt;
Niko Ehrenfeuchter: I'm experiencing the same here on my X24. Removing the &amp;quot;processor&amp;quot; module also stops the pitch noise, which does ONLY occur when setting the CPU to maximum speed (using cpufreq). On low speed it's completely silent, even having loaded the processor module.&lt;br /&gt;
&lt;br /&gt;
[[Category:T23]] [[Category:X24]] [[Category:T41p]] [[Category:T42p]]&lt;/div&gt;</summary>
		<author><name>NikoEhrenfeuchter</name></author>
		
	</entry>
</feed>