https://www.thinkwiki.org/w/api.php?action=feedcontributions&user=SpeedEvil&feedformat=atomThinkWiki - User contributions [en]2024-03-28T09:21:11ZUser contributionsMediaWiki 1.31.12https://www.thinkwiki.org/w/index.php?title=How_to_reduce_power_consumption&diff=50483How to reduce power consumption2011-02-08T11:31:18Z<p>SpeedEvil: /* intel wireless */</p>
<hr />
<div>Reducing system power consumption will extend battery life, reduce system<br />
temperature and (on some models) reduce system fan noise.<br />
Power consumption can be greatly improved from a stock distribution configuration<br />
to a fine tuned system. The general rules are :<br />
* Unload drivers for unused devices (ie. USB 1.1, Yenta/PCMCIA, Wireless, IRDA, Bluetooth, ...)<br />
* Reduce polling on devices (drives, USB subsystem, nvram, use SATA AN, ...)<br />
* Reduce hard drive activity<br />
* Reduce LCD brightness to the minimum you can stand<br />
* Reduce CPU wakeups, so it can stay longer in deep power saving c-states<br />
* Make use of every hardware devices availables power saving features (AHCI ALPM, USB autosuspend, Alsa and Wireless powersaving modes, HPET timers, ...)<br />
<br />
==Tools==<br />
Arjan van de Ven's [[PowerTOP]] utility<br />
is a gold mine to improve energy efficiency, but is almost only CPU-oriented. This tool helps to easily detect<br />
the top power offenders, both userland and kernel modules, which prevent the use of CPU power saving mechanisms and sometime suggest <br />
fixes accordingly.<br />
PowerTOP users collected some [http://www.lesswatts.org/projects/powertop/known.php tips & tricks]<br />
and an informative [http://www.lesswatts.org/projects/powertop/faq.php faq].<br />
<br />
Alternatively (or complementary) to PowerTOP, running <code>strace -p $(pidof yourapp)</code> <br />
for all your favorite or background running applications while they are expected to be <br />
idle, will show the misbehaviors.<br />
<br />
Beside CPU wakeups, disks spins are also power hungry. To detect what make your disk spinning,<br />
<br />
<code><br />
sysctl vm.block_dump=1<br />
</code><br />
<br />
will list all applications causing disks wakeups on the kernel's dmesg.<br />
Other useful tools for this purpose are blktrace, iostat and lm-profiler<br />
(from laptop-mode-tools suite).<br />
<br />
See also [[#Misbehaving Userland]].<br />
<br />
==BIOS settings==<br />
===Enabling Power Management===<br />
Some Thinkpad BIOS (like 2.08 BIOS on {{X40}}) offer two very lame options,<br />
with a very misleading online help (saying "Usually not needed"). That's<br />
<br />
<code><br />
CPU power management: (default disabled)<br />
PCI bus power management: (default disabled)<br />
</code><br />
<br />
You should indeed ''enable'' them, else the deepest C3 and C4 ACPI C-states<br />
are disabled.<br />
<br />
===Disabling I/O Ports===<br />
The BIOS (at least version 3.11 on {{X200}}) can also be used to disable I/O ports, like PCMCIA/CardBus. Although this requires a reboot to change settings, using the BIOS rather than a configuration file will survive distribution changes and may make it easier to remember how to re-enable a port. Disabling these devices can reduce power consumption by several watts.<br />
<br />
==CPU==<br />
Look at:<br />
* [[How to make use of Dynamic Frequency Scaling]]<br />
* [[Pentium M undervolting and underclocking]]<br />
<br />
A good thing to keep in mind is that every CPU wakeup, even if it's for<br />
a trivial light job, reduce the time the CPU stays on a deep power<br />
saving C-state (like C3 or C4). Therefore you should ensure your applications<br />
stay really idle when they meant to be idle (track shorts select timeouts<br />
in loop, etc. with [[PowerTOP]]).<br />
<br />
Also note that manually locking the CPU in the lowest P-state (frequency) <br />
available is '''not''' an efficient way to improve battery lifetime. This will<br />
cause the CPU to stay longer in C0 (power hungry C-state) doing hard work when <br />
there is something to do, while it could have done this work faster by augmenting<br />
the CPU freq, and returned back faster to a deeper, economic, C-state and to a<br />
lower frequency (P-state).<br />
The best is to let the kernel select the appropriates CPU frequencies by itself<br />
with the help of in kernel CPU governors.<br />
Have a look at [http://www.bughost.org/pipermail/power/2007-May/000166.html this explanation]<br />
from Intel's kernel developer Arjan van de Ven.<br />
<br />
==Kernel settings and patches==<br />
<br />
===General settings===<br />
The 2.6.21 kernel brought some very effective changes (like [[dynticks]]). <br />
Later, 2.6.24-rc2 brought a lot of other power efficiency improvements. <br />
If it's not already on your distribution and you value power efficiency, <br />
you may think about compiling a recent kernel yourself. <br />
<br />
Here are a few options (beside the ACPI and APM related one) that matter to <br />
reduce power consumption or to help diagnosing consumers:<br />
<br />
<code><br />
# From PowerTOP's FAQ:<br />
CONFIG_NO_HZ<br />
CONFIG_HIGH_RES_TIMERS<br />
CONFIG_HPET<br />
CONFIG_HPET_TIMER<br />
CONFIG_CPU_FREQ_GOV_ONDEMAND<br />
CONFIG_USB_SUSPEND<br />
CONFIG_SND_AC97_POWER_SAVE<br />
CONFIG_SND_HDA_POWER_SAVE<br />
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=3<br />
CONFIG_TIMER_STATS<br />
CONFIG_ACPI_BATTERY<br />
CONFIG_CPU_FREQ_STAT<br />
CONFIG_INOTIFY<br />
<br />
# Not from the PowerTOP FAQ:<br />
CONFIG_BLK_DEV_IO_TRACE<br />
CONFIG_X86_ACPI_CPUFREQ<br />
CONFIG_X86_SPEEDSTEP_CENTRINO depreciated as of kernel 2.6.24, use CONFIG_X86_ACPI_CPUFREQ<br />
CONFIG_X86_SPEEDSTEP_ICH<br />
CONFIG_X86_SPEEDSTEP_SMI<br />
CONFIG_CPU_IDLE<br />
CONFIG_CPU_IDLE_GOV_LADDER<br />
CONFIG_CPU_IDLE_GOV_MENU<br />
</code><br />
<br />
Those options are already in Fedora Core 7 and Ubuntu Gutsy (not Feisty) default i686 kernels.<br />
PowerTOP FAQ also suggest to '''disable'''<br />
CONFIG_IRQBALANCE and CONFIG_ACPI_DEBUG.<br />
<br />
Also, you need to properly set APM and ACPI. Look at:<br />
* [[Power Management]]<br />
* [[How to make use of Power Management features]]<br />
<br />
=== Kernel boot and module loading options ===<br />
If you have an Intel chipset ICH5 or later (cf. lspci output), as in most modern Thinkpads, you should<br />
be using the integrated HPET timer (saves about 30 CPU wake ups per second). To see if<br />
hpet is enabled on your laptop:<br />
<br />
<code><br />
grep hpet /proc/timer_list<br />
</code><br />
<br />
If this does not display "Clock Event Device: hpet", then add <br />
<br />
<code><br />
hpet=force<br />
</code><br />
<br />
{{WARN|The ICH4 does have an HPET, but it is disabled for a good reason: Intel didn't test/validade it! Use of the ICH4 HPET is '''not''' recommended}}<br />
<br />
to your kernel boot options (usualy in /boot/grub/menu.lst or lilo.conf). <br />
Note that "hpet=force" is only available by default in 2.6.24-rc2 and above <br />
(or as a separated patch for 2.6.22 and 2.6.23, see below).<br />
<br />
On modern ThinkPads the HPET timer is automatically detected and enabled. On certain older machines hpet=force is required such as on the following machines:<br />
* {{T30}}, {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}<br />
* {{X22}}, {{X23}}, {{X24}}, {{X30}}, {{X31}}, {{X40}}<br />
* {{A31}}<br />
<br />
{{HELP|please add your ThinkPad to the above list, if <nowiki>hpet=force</nowiki> was required}}<br />
<br />
===Useful Patches===<br />
<br />
Thomas Gleixner High Resolution Timers (hrt) patchset brings many improvements,<br />
like the cpuidle work and Udo A. Steinberg and Venki Pallipadi "force<br />
enable HPET" patches (non HPET timers causes about 20-40 CPU wakeups/second, but<br />
HPET is often hidden by the BIOS due to Windows XP deficiencies). Those are <br />
fully merged in 2.6.24-rc1 vanilla kernel.<br />
See http://www.tglx.de/projects/hrtimers/<br />
<br />
Kristen Carlson Accardi from Intel has a patchset to turn on "Aggressive<br />
Link Power Management" (ALPM) for the AHCI driver (for SATA bus). Also from<br />
Accardi, SATA Asynchronous Notification (SATA AN), alows SATA link to notify<br />
media insertions (thus avoid hal polling the cdrom). Those patches were merged <br />
in 2.6.24-rc2 kernel (AN needs also support in hal to be used).<br />
See: http://www.kernel.org/pub/linux/kernel/people/kristen/patches/SATA/alpm/<br />
<br />
As of now (2.6.24-rc8), the linux kernel doesn't support PCI Express power <br />
management (aka PCIe ASPM, aka PCIe LPM). Shaohua Li from Intel submited a <br />
patch on LKML (http://lkml.org/lkml/2008/1/17/544 ) though, and reported it <br />
to reduce power consumption by 1.3 watts for a system with three PCIe links.<br />
<br />
The [[HDAPS]] disk protection systems can reduce battery life. <br />
Matthew Garrett provides [http://www.linuxpowertop.org/patches/hdaps.patch a patch]<br />
that prevents hdaps kernel module to generate interrupts when<br />
this feature isn't used.<br />
<br />
===Useful sysctls===<br />
The meaning of those settings is explained case by case on the relevant <br />
sections of this document. But for convenience sake, we group them here too.<br />
<br />
Note that the "ondemand" scaling governor is recommended by Intel developers<br />
for energy efficiency: it's expected to be more efficient than the "powersave"<br />
governor, or than userspace daemons (like cpufreq-utils, cpufreqd, powernowd...).<br />
Look [http://www.bughost.org/pipermail/power/2007-May/000071.html here],<br />
[http://www.bughost.org/pipermail/power/2007-May/000073.html here], or<br />
[http://www.bughost.org/pipermail/power/2007-May/000166.html here] for a<br />
kernel developer explanation about "ondemand" being better on modern Intel CPUs.<br />
<br />
The "link_power_management_policy" tunable won't be available unless you<br />
run a 2.6.24-rc2 or more kernel, or applied Kirsten patchset, have an Intel <br />
AHCI compatible chipset, and use SATA drives.<br />
<br />
<code><br />
echo 5 > /proc/sys/vm/laptop_mode<br />
echo 0 > /proc/sys/kernel/nmi_watchdog<br />
echo Y > /sys/module/snd_ac97_codec/parameters/power_save<br />
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings<br />
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs<br />
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done<br />
# those sysctl's are only available if you have an AHCI compatible SATA <br />
# controler and use kernel > 2.6.24-rc2 (or use Kristen ALPM patchset) : <br />
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy<br />
echo min_power > /sys/class/scsi_host/host1/link_power_management_policy<br />
</code><br />
<br />
If you're running a kernel older than 2.6.22 do this. Not needed for kernels 2.6.22 onward:<br />
<br />
<code><br />
cd /sys/devices/system/cpu/cpu0/cpufreq<br />
cat ondemand/sampling_rate_max > ondemand/sampling_rate<br />
</code><br />
<br />
==ATA drives==<br />
Hard drives and CDRom drives spinning is very costly. To improve battery<br />
lifetime, you should reduce disks access (or devices polling) the more you<br />
can. <br />
<br />
===Hard Drives===<br />
<br />
The files access time update, while mandated by POSIX, is causing lots of<br />
disk write access; even accessing files on disk cache may wake the ATA or USB<br />
bus. If you don't use this feature, disable it by adding the <tt>relatime</tt><br />
option to all relevant lines in the /etc/fstab, for example:<br />
/dev/sda1 / ext3 relatime,errors=remount-ro 0 1<br />
<br />
(On older kernels you may need to use <tt>noatime</tt> instead of <tt>relatime</tt>.)<br />
<br />
Also consider merely using a larger value for the <tt>commit</tt> option. This defines how often changed data is written to the disk (it is cached until then). The default value is 5 seconds.<br />
<br />
See man mount(8) for details on how the <tt>rel/noatime</tt> and <tt>commit</tt> options work.<br />
<br />
Use laptop_mode to reduce disk usage by delaying and grouping writes. You should enable<br />
it, at least while on battery. See [[Laptop-mode]] for more details:<br />
<br />
<code><br />
echo 5 > /proc/sys/vm/laptop_mode<br />
</code><br />
<br />
The default kernel dirty page writeback frequency is very conservative. On<br />
a laptop running on battery, one might find more appropriate to reduce it:<br />
<br />
<code><br />
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs<br />
</code><br />
<br />
Some power saving hard drives features can be activated with hdparm (beware<br />
that "-B 1" may reduce your drive lifetime, if you have lot of intermittent<br />
disk activity causing lots of heads load/unloads: so reduce I/O activity first,<br />
as explained above, in order to get longer disks idling periods).<br />
For more details look at [[How to make use of Power Management features]] :<br />
<br />
<code> <br />
hdparm -B 1 -S 12 /dev/sda # and/or any other disk device<br />
</code><br />
<br />
====SATA Link Power Management====<br />
On kernels 2.6.24 and new this enables SATA Link Power Management:<br />
<code><br />
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy<br />
echo min_power > /sys/class/scsi_host/host1/link_power_management_policy<br />
</code><br />
<br />
Disable it by replacing <code>min_power</code> with <code>max_performance</code>.<br />
<br />
On Ubuntu Hardy Heron with a 2.6.24-16 kernel, a suspend/resume cycle is much quicker if you disable SATA Link Power Management before initiating the suspend. As of Intrepid Ibex and kernel 2.6.27, this should be fixed. ([https://bugs.launchpad.net/linux/+bug/234047 Launchpad bug 234047], [http://bugzilla.kernel.org/show_bug.cgi?id=10817 Kernel bug 10817])<br />
<br />
====Laptop Mode Tools====<br />
<br />
The [http://samwel.tk/laptop_mode/ Laptop Mode Tools] utility implements many of the above power-saving measures from disks, and some others.<br />
<br />
===Optical drive===<br />
The optical drive is reported to consume power even when not accessed. See <br />
<br />
* [[How to hotswap UltraBay devices|Eject the UltraBay optical drive]], or just turn off its power supply (i.e., run the appropriate eject script but leave the drive inserted).<br />
* [[How to set optical drive speed|Reduce the spinning speed of the optical drive]].<br />
<br />
The hald daemon polling tends to maintain the ATA buses out of power saving<br />
modes, and to wakeup CDROM drive (except if you have a kernel >= 2.6.24, hal >= 0.5.10,<br />
and SATA AN compatible devices). If you have a recent hald version, you<br />
can stop this polling when on battery:<br />
<br />
<code><br />
hal-disable-polling --device /dev/scd0 # or whatever your CD drive is<br />
</code><br />
<br />
start polling again when on ac:<br />
<code><br />
hal-disable-polling --enable-polling --device /dev/scd0 # or whatever your CD drive is<br />
</code><br />
<br />
<br />
If your hald is not recent enough, consider suspending it when running on battery. Some moderns SATA buses and drivers supports a notification mechanism (SATA AN - Asynchronous Events Notifications) that obsolete the need for polling on modern hardware; support for this feature had been merged in Linux 2.6.24-rc1 and HAL 0.5.10.<br />
<br />
==LCD Backlight/Brightness==<br />
The LCD backlight is one of the very major power drain. <br />
Reducing brightness to the lowest readable<br />
level will save a lot of battery lifetime. Also, don't forget to configure<br />
your screen saver to shutdown the screen backlight (rather than displaying some<br />
eye candy), when no activity for a few minutes.<br />
<br />
You can also let the system [[automatically reduce brightness]] after a <br />
period of inactivity.<br />
<br />
If you're choosing your Thinkpad laptop model, keep in mind that the screen<br />
size affect the battery time greatly: more power needed for larger screens.<br />
<br />
The very recent, but xorg standard way to control backlight from CLI is<br />
using xbacklight. ie. to set backlight at half the brightness:<br />
<br />
<code><br />
xbacklight -set 50<br />
</code><br />
<br />
You should configure the DPMS to shutdown the screen when idle (rather than<br />
displaying a fancy but power consuming screensaver). ie. to turn off the<br />
display after 5 minutes of idling:<br />
<br />
<code><br />
xset +dpms<br />
xset dpms 0 0 300<br />
</code><br />
<br />
==Graphic controllers==<br />
All xorg Thinkpad graphics chipsets drivers (ati, radeon, fglrx, i810) have<br />
the same bug causing very frequent CPU wakeups when DRI is activated, even<br />
when you don't use any 3D application.<br />
This problem is partly fixed on xorg git tree but not released as of xorg<br />
7.2. If you value more battery than 3D, you should disable DRI: put this on<br />
the /etc/X11/xorg.conf "Device" of you graphic controller:<br />
<br />
<code><br />
Option "NoDRI"<br />
</code><br />
<br />
Also be sure that DPMS is working: <code>grep DPMS /var/log/Xorg.0.log</code><br />
should output "DPMS enabled". If not, put <code>Option "DPMS"</code> in your config.<br />
See the section above about how to enable dpms driven display power saving.<br />
<br />
On recent xrandr/xorg versions, you can disable the TV output (or any other detected<br />
as connected but not used outputs) when you're not using it: it's known to consume power. <br />
<br />
<code> <br />
xrandr # see all displays listed here, but that you don't actually use and disable them. <br />
xrandr --output TV --off # for instance (if "xrandr" above listed a connected output named "TV" that you don't use)<br />
</code><br />
<br />
When you don't have an external monitor plugged, disable CRT and DVI output <br />
(for some, this can make a difference in power usage) : <br />
<code> <br />
echo crt_disable > /proc/acpi/ibm/video<br />
echo dvi_disable > /proc/acpi/ibm/video<br />
</code> <br />
<br />
Some drivers have specials power saving mode, and/or allows underclocking the GPU. See also:<br />
* [[How to make use of Graphics Chips Power Management features]], or with [[Rovclock]] on ATI.<br />
* [[Problem with high power drain in ACPI sleep]]<br />
<br />
==USB Subsystem==<br />
The kernel support an efficient USB 2.0 power saving feature if you enabled<br />
CONFIG_USB_SUSPEND. This may not trigger in when you have an USB device<br />
plugged (and beside, USB devices tends to suck power on their own), so avoid<br />
using such devices when on battery. To enable it by default, you must add the line <br />
<code><br />
options usbcore autosuspend=1<br />
</code><br />
to your <tt>/etc/modprobe.conf</tt> or add it to (and create if necessary) the file <tt>/etc/modprobe.d/usbcore</tt> depending on how your distribution organises modprobe configuration. <br />
<br />
If on the other hand, you have <tt>usbcore</tt> built into your kernel, you can add this in the kernel boot options (ie. in grub's menu.lst):<br />
<br />
<code><br />
usbcore.autosuspend=1<br />
</code><br />
<br />
or at runtime, per device, with:<br />
<br />
<code><br />
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done <br />
for i in /sys/bus/usb/devices/*/power/level; do echo auto > $i; done<br />
</code><br />
<br />
USB 1.1 is worst. It needs polling the bus frequently, hence can't really go<br />
in a low power mode when you enabled it, even if you don't have any device<br />
plugged. You'd better remove it when you don't use a 1.1 device:<br />
<br />
<code><br />
rmmod uhci_hcd<br />
</code><br />
<br />
If you don't intend to use any device needing USB 1.1 (unfortunately, the built-in bluetooth and fingerprint-reader are USB 1.1 devices), the USB 1.1 support can also be totally avoided. On Debian and derivatives, just do:<br />
<br />
<code><br />
echo "blacklist uhci_hcd" >> /etc/modprobe.d/blacklist<br />
</code><br />
<br />
==PCMCIA/CardBus==<br />
Same for PCMCIA/CardBus. Some users experiences interrupts clouds (sometime up to <br />
several thousands interrupts/second) causing CPU wakeups, thus totally preventing <br />
the CPU to reach lower C-states. <br />
If you don't use PCMCIA, you may disable it the same way (unloading seems insufficient<br />
to restore the system properly, you have to boot without it):<br />
<br />
<code><br />
echo "blacklist pcmcia" >> /etc/modprobe.d/blacklist<br />
echo "blacklist yenta_socket" >> /etc/modprobe.d/blacklist<br />
</code><br />
<br />
==Sound==<br />
<br />
ALSA has a power saving feature that should be enabled on your kernel<br />
(CONFIG_SND_AC97_POWER_SAVE). Note that this low power mode won't trigger in<br />
unless you muted all sound inputs (micro, line in etc.). This feature has<br />
to be activated with:<br />
<br />
<code><br />
amixer set Line mute nocap<br />
amixer set Mic mute nocap<br />
echo Y > /sys/module/snd_ac97_codec/parameters/power_save<br />
</code><br />
<br />
<br />
===Intel HD Audio===<br />
<br />
If you have Intel HD audio as your onboard sound controller, substitute the following for the last line in the above sequence:<br />
<br />
<code><br />
echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller<br />
</code><br />
<br />
You also may wish to decrease the sound poweroff timeout to something shorter, like 1 second after last playback:<br />
<br />
<code><br />
echo 1 > /sys/module/snd_hda_intel/parameters/power_save<br />
</code><br />
<br />
===Additional Tweaks===<br />
<br />
You can unload all sound related modules when you are on <br />
battery, or mute the sound system (echo mute > /proc/acpi/ibm/volume).<br />
<br />
See also [[How to enable audio codec power saving]].<br />
<br />
==Wireless Interface==<br />
===intel wireless===<br />
Wireless network consume a lot of power.<br />
To save power, you can kill the Wi-Fi radio when it's not in use:<br />
<br />
<code><br />
echo 1 > /sys/bus/pci/devices/*/rf_kill<br />
</code><br />
<br />
If you need Wi-Fi, you can also reduce power consumption (at the price of<br />
performances) by activating the power saving modes:<br />
<br />
<code><br />
iwpriv eth1 set_power 5<br />
</code><br />
<br />
For drivers using the new Wi-Fi kernel framework (mac80211/cfg80211), <br />
the canonical way to do this is now:<br />
<br />
<code><br />
for i in /sys/bus/pci/devices/*/power_level ; do echo 5 > $i ; done<br />
</code><br />
<br />
Most drivers, like ipw2200, that don't use the new mac80211 framework place the<br />
interfaces in aggressive scanning mode when they are not associated with any <br />
Access Point, even when the interface is down (more info about this on Intel's<br />
[http://www.lesswatts.org/tips/wireless.php LessWatts] website).<br />
This behavior consumes a lot of power, even more than when the interface<br />
is plain active and in use. But this can disabled at module's load time :<br />
<br />
<code><br />
rmmod ipw2200<br />
modprobe ipw2200 associate=0<br />
</code><br />
<br />
You can fix this setting by placing the following in /etc/modprobe.d/options <br />
(Debian/Ubuntu) or in /etc/modprobe.conf (Red Hat/Fedora):<br />
<br />
<code><br />
options ipw2200 associate=0<br />
</code><br />
<br />
Reducing beacon intervals on your Access Point to 1 per second will also<br />
reduce network card interrupts, therefore power savings. This shouldn't have<br />
negatives side effects.<br />
<br />
In recent kernels, the powersaving on the intel ipw3945 has been disabled, as<br />
for some it is unstable. For others it worked just fine.<br />
<br />
See [http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.33.y.git;a=blobdiff;f=drivers/net/wireless/iwlwifi/iwl-3945.c;h=e413bd35bc411a1113177f1576538eb0ac26f00c;hp=4609323d8436dc9e22c74be2f1f3cf5e97785cb2;hb=bc45a67079c916a9bd0a95b0b879cc0f259bac6e;hpb=b7bb1756cb6a610cdbac8cfdad9e79bb5670b63b this patch]. You may wish to try changing '.broken_powersave=true' to false, in /usr/src/linux/drivers/net/wireless/iwlwifi/iwl-3945.c if you wish to enable powersave.<br />
<br />
See also, to activate power saving on the wireless network card:<br />
* For [[Intel PRO/Wireless 2200BG Mini-PCI Adapter]] and [[Intel PRO/Wireless 2915ABG Mini-PCI Adapter]], see instructions for the [[ipw2200]] driver.<br />
* For [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]], see the [http://ipw3945.sourceforge.net/README.ipw3945 ipw3945 driver README]<br />
<br />
==Ethernet Controler==<br />
If you don't use Wake-on-LAN, you should disable it for your network card,<br />
because it sucks a lot of power:<br />
<br />
<code><br />
ethtool -s eth0 wol d<br />
</code><br />
<br />
If you can, try to reduce useless network activity on your ethernet<br />
segment, coming to your NIC (ie. uneeded broadcasts), those cause <br />
interrupts and CPU wakeups.<br />
<br />
Forcing 100Mbps full-duplex speed on a gigabit ethernet NIC can also save a lot of power (~1W) on most network workloads. This also reduces components temperature (e.g., [[Thermal Sensors|thermal sensor]] 0xC0 on the {{T43}} cools down by 5 degree between 1000Mbps and 100Mbps, and another 1 degree for 10Mbps).<br />
<br />
<code><br />
ethtool -s eth0 autoneg off speed 100<br />
</code><br />
<br />
Note, however, that if the network device on the other side has auto-negotiation enabled (which is very common) and you turn auto-negotiation off, the other side will assume half-duplex mode and you will experience a significant loss of performance.<br />
<br />
==Bluetooth==<br />
When you don't need bluetooth, disable it. Because of its radio, <br />
bluetooth is not power friendly.<br />
<br />
<code><br />
hciconfig hci0 down ; rmmod hci_usb<br />
echo disable > /proc/acpi/ibm/bluetooth<br />
</code><br />
<br />
==Modem==<br />
When was the last time you used your analog modem? If you can't remember, you probably just don't need it. If it is on a separate module in your laptop, simply remove it. Store it in a ESD safe place (like the bag in which your last addon card or hard drive was packed), in case you should need it again. This won't save you a lot of power and weight, but why carry something around you never use.<br />
<br />
==System Fans==<br />
Fans consumes power when running, so you may look at the [[ACPI fan control script]].<br />
<br />
==Misbehaving Userland==<br />
You should avoid using Beagle, Compiz, Beryl, XMMS, gnome-power-manager<br />
and Evolution while on battery.<br />
Look at the PowerTOP's [http://www.linuxpowertop.org/known.php known problems]<br />
list.<br />
<br />
Deactivate desktop animations (blinking cursor on the terms, animated wallpapers, ...): they cause regular X (therefore kernel and CPU) wakeups.<br />
<br />
In short, while on battery, you should stop all applications that don't really stay idle when you're not using them. This means applications that:<br />
* Wakes up the CPU too often (by polling something, because of too short select() timeouts, ...)<br />
* Access the disks at regular intervals<br />
* Access an hardware bus (USB, ATA, ...) at regular intervals<br />
To find those offenders run:<br />
* <code>strace -p $(pidof yourapp)</code> # for all your running applications<br />
* <code>powertop</code><br />
* <code>dstat -t -c --power --top-cpu --top-io --top-bio --top-latency --top-cputime</code><br />
* <code>sysctl vm.block_dump=1</code> # and look at dmesg<br />
* <code>ps aux | awk '{print$10,$11}' | sort -n</code> # will list all running softs sorted by used cpu time<br />
Please, don't forget to fill a bug when you find such a misbehaving software.<br />
{{NOTE|Not all software is evil, buggy or badly written. Some produce regular activity because they have to, in order to provide their intented functionality. Think twice before filling bugs about this.}}<br />
<br />
==See Also==<br />
* [[How to measure power consumption]]<br />
* [[Script for monitoring power consumption]]<br />
* Battery [[maintenance]]<br />
<br />
==External resources==<br />
* [http://www.free-it.de/archiv/talks_2005/paper-11017/paper-11017.html ''Current trends in Linux Kernel Power Management''], Dominik Brodowski, 2005<br />
* [http://www.linuxpowertop.org PowerTOP] website<br />
* [http://www.gentoo.org/doc/en/power-management-guide.xml Power Management Guide] from the Gentoo Linux documentation<br />
* [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-November/030478.html When/where/what for low power consumption?] (thread on Linux-Thinkpad)<br />
* Intel's [http://www.lesswatts.org/ LessWatts] "''Saving power on Linux''" website<br />
* ''8 hours of battery life on your lap(top)'' ([http://atrey.karlin.mff.cuni.cz/~pavel/swsusp/8hours.odp ODP]/[http://atrey.karlin.mff.cuni.cz/~pavel/swsusp/8hours.pdf PDF]), a presentation by Pavel Machek<br />
<br />
<br />
[[Category:600X]] [[Category:A20m]] [[Category:A20p]] [[Category:A21e]] [[Category:A21m]] [[Category:A21p]] [[Category:A22e]] [[Category:A22m]] [[Category:A22p]] [[Category:A30]] [[Category:A30p]] [[Category:A31]] [[Category:A31p]] [[Category:i1200]] [[Category:i1300]] [[Category:i1620]] [[Category:G40]] [[Category:G41]] [[Category:R30]] [[Category:R31]] [[Category:R32]] [[Category:R40]] [[Category:R40e]] [[Category:R50]] [[Category:R50e]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:R60]] [[Category:R60e]] [[Category:T20]] [[Category:T21]] [[Category:T22]] [[Category:T23]] [[Category:T30]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:T61]] [[Category:X20]] [[Category:X21]] [[Category:X22]] [[Category:X23]] [[Category:X24]] [[Category:X30]] [[Category:X31]] [[Category:X32]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:X61]] [[Category:X61s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Z61t]] [[Category:Z61e]] [[Category:TransNote]]</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=Tp_smapi&diff=50332Tp smapi2011-01-22T11:12:30Z<p>SpeedEvil: /* X series */ tested on my x60s</p>
<hr />
<div>{| width="100%"<br />
|style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" | __TOC__<br />
|style="vertical-align:top" |<br />
The <tt>tp_smapi</tt> kernel module exposes some features of the ThinkPad hardware/firmware via a <tt>sysfs</tt> interface. Currently, the main implemented functionality is control of battery charging and extended battery status. The tp_smapi software package 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.<br />
<br />
This driver uses undocumented features and direct hardware access, so it may work unreliably or even damage your hardware; but so far no such damage has been reported.<br />
|}<br />
<br />
===Features===<br />
*<tt>tp_smapi</tt> driver<br />
**Battery charge/discharge control<br />
**Battery status information<br />
*<tt>hdaps</tt> driver (compared with the standard <tt>hdaps</tt> driver)<br />
**Improved stability<br />
**Improved model support<br />
**Improved functionality<br />
<br />
===Project Homepage / Availability===<br />
* Project page: http://tpctl.sourceforge.net/<br />
* Download page: http://sourceforge.net/projects/tpctl/files/tp_smapi<br />
* You need to download only the <i>tp_smapi</i> package.<br />
<br />
===Installation===<br />
====Installation from source====<br />
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)}} .<br />
<br />
:{{cmdroot|tar xzvf tp_smapi-0.40.tgz}}<br />
:{{cmdroot|cd tp_smapi-0.40}}<br />
<br />
Then, either compile and load the driver within the current working directory (for testing):<br />
:{{cmdroot|make load}}<br />
OR compile and install into the kernel's module path:<br />
:{{cmdroot|make install}}<br />
<br />
If you use the [[HDAPS]] driver, add <tt>HDAPS=1</tt> to also patch the <tt>hdaps</tt> for compatibility with <tt>tp_smapi</tt> (this requires a kernel source tree matching the current kernel).<br />
Again, either load the driver within the current working directory:<br />
:{{cmdroot|1=make load HDAPS=1}}<br />
OR install into the kernel's module path:<br />
:{{cmdroot|1=make install HDAPS=1}}<br />
<br />
To prepare a stand-alone patch against the current kernel tree (including<br />
a patch against <tt>hdaps</tt> and new <tt>Kconfig</tt> entries):<br />
:{{cmdroot|make patch}}<br />
<br />
To delete all autogenerated files:<br />
:{{cmdroot|make clean}}<br />
<br />
The original kernel tree is never modified by any these commands. <br />
The {{path|/lib/modules}} directory is modified only by {{cmdroot|make install}}.<br />
<br />
====Installation in Gentoo====<br />
The {{Gentoo}} portage system carries a [http://packages.gentoo.org/package/app-laptop/tp_smapi tp_smapi package], which follows the latest version pretty closely. On a Gentoo system, you can install and load as follows.<br />
<br />
If you use the [[HDAPS]] driver, do this first:<br />
<br />
* Disable the <tt>hdaps</tt> module in your kernel configuration (Device Drivers &rarr; Hardware Monitoring Support &rarr; IBM Hard Drive Active Protection System)<br />
* Rebuild and install the kernel<br />
* Add the <tt>hdaps</tt> use flag in {{path|/etc/make.conf}}<br />
* {{cmdroot|rmmod hdaps}}<br />
<br />
Then:<br />
* {{cmdroot|emerge tp_smapi}} (or install tp_smapi with hdaps support manually, as above)<br />
* {{cmdroot|echo "tp_smapi" >> /etc/modules.autoload.d/kernel-2.6}}<br />
* {{cmdroot|echo "hdaps" >> /etc/modules.autoload.d/kernel-2.6}}<br />
<br />
Then reboot, or run:<br />
* {{cmdroot|modprobe tp_smapi}}<br />
* {{cmdroot|modprobe hdaps}}<br />
<br />
'''NOTE:''' If {{cmdroot|modprobe}} fails and dmesg says something about <tt>__stack_chk_fail()</tt>, you probably just compiled your modules with <tt>-fstack-protector</tt> and/or <tt>-fstack-protector-all</tt> without having a kernel that supports it. You can either configure your kernel to have <tt>CC_STACKPROTECTOR</tt> enabled (in ''Processor type and features'' if you use {{cmdroot|make menuconfig}}) or edit your <tt>make.conf</tt> (or, if you're using paludis, your <tt>/etc/paludis/bashrc</tt>) and remove <tt>-fstack-protector</tt> and <tt>-fstack-protector-all</tt> from your <tt>CFLAGS</tt>. If you choose to enable it in the kernel, be aware that you need a patched GCC for it (and I do not know if the gcc in stage3 is patched).<br />
<br />
====Installation on Debian unstable (sid), testing (squeeze) or stable (lenny)====<br />
Debian now contains the [http://packages.debian.org/tp-smapi packaged module source] and prebuilt modules for Debian kernels.<br />
<br />
If you use a stock Debian kernel, you can install the tp_smapi modules with:<br />
* {{cmdroot|apt-get install tp-smapi-modules-`uname -r`}}<br />
* in order to make sure the modules package is kept in sync with the kernel one, you may also want to install the <code>tm-smapi-modules-2.6-686</code> or <code>tm-smapi-modules-2.6-amd64</code> package, depending on your architecture <br />
<br />
If you use a custom kernel, you can build tp_smapi with module-assistant:<br />
* {{cmdroot|aptitude install tp-smapi-source}}<br />
* {{cmdroot|m-a -t a-i tp-smapi}}<br />
<br />
====Installation on Debian unstable (sid) or testing (squeeze) (kernel >=2.6.32-5)====<br />
You can use 'dkms' on Debian unstable (sid) or testing (squeeze) (kernel >=2.6.32-5) (Note: If installation seems ineffective, confirm your have the linux-headers of your kernel installed, purge tp-smapi-dkms and reinstall.)<br />
* {{cmdroot|aptitude install tp-smapi-dkms}}<br />
<br />
====Installation on openSUSE====<br />
openSUSE provides rpm packages. Look for them at the package search: [http://software.opensuse.org/search/], search for the package named "tp_smapi".<br />
<br />
A step-by-step guide on how a relative linux newbie installed tp_smapi on a Thinkpad W500 running openSuse 11.1 using YAST Software Manager is available [http://forums.opensuse.org/hardware/laptop/417254-tp_smapi-lenovo-thinkpad-t400-t500-w500-step-step.html#post2005932 here]<br />
<br />
In case you are taking the hard way around, while compiling on 11.0, make complained about not being able to locate the kernel sources. It worked for me after I did this:<br />
<pre><nowiki>cp /usr/include/linux/aio_abi.h /lib/modules/`uname -r`/build/include/linux/</nowiki></pre><br />
<br />
====Installation on Ubuntu====<br />
Ubuntu ships tp_smapi in their <tt>linux-ubuntu-modules-*</tt> package for Hardy, so you don't have to build it yourself. Please note that they have renamed tp_smapi's modified <tt>hdaps</tt> module to <tt>hdaps_ec</tt> so that the two can coexist. You should load <tt>hdaps_ec</tt>, not <tt>hdaps</tt>.<br />
<br />
Ubuntu Intrepid and Jaunty, however, lack the <tt>hdaps_ec</tt> module, as reported [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/297213 here]. It will not be included again until said [[#Bundled hdaps driver|bundled hdaps driver]] is merged into mainline.<br />
<br />
=====Installation on Ubuntu Jaunty=====<br />
I have posted my experiences [http://meandmyubuntu.blogspot.com/2009/05/getting-hdasp-to-work-on-jaunty.html here]<br />
<br />
=====Installation on Ubuntu Karmic=====<br />
Ubuntu does not ship the precompiled module tp_smapi any more. However the source code is still present in the repository. It can be installed through module-assistant :<br />
:{{cmdroot|aptitude install tp-smapi-source}}<br />
:{{cmdroot|module-assistant prepare tp-smapi}}<br />
:{{cmdroot|module-assistant auto-install tp-smapi}}<br />
:{{cmdroot|modprobe tp-smapi}}<br />
<br />
=====Installation on Ubuntu Lucid=====<br />
The Karmic solution above works well.<br />
<br />
As an alternative, one can use the dkms flavour of the packages via<br />
:{{cmdroot|aptitude install tp-smapi-dkms}}<br />
:{{cmdroot|modprobe tp_smapi}}<br />
<br />
{{HINT|This appears to be the ideal solution. A description of DKMS, from [http://linux.dell.com/projects.shtml#dkms Dell]: "DKMS stands for Dynamic Kernel Module Support. It is designed to create a framework where kernel dependent module source can reside so that it is very easy to rebuild modules as you upgrade kernels."}}<br />
<br />
====Installation on older Ubuntu/Debian====<br />
Installation on Ubuntu or Debian is quite easy, but there are a few things to look after:<br />
<br />
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):<br />
<pre><nowiki>apt-get install build-essential</nowiki></pre><br />
<br />
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:<br />
<pre><nowiki>uname -r</nowiki></pre><br />
This will give you the version of your current kernel. <br />
Debian users execute the following:<br />
<pre><nowiki>apt-get install linux-source-`uname -r`</nowiki></pre><br />
Ubuntu users execute the following using the kernel-version only (exclude -XX-generic; e.g. 'linux-source-2.6.20'):<br />
<pre><nowiki>apt-get install linux-source-`uname -r`</nowiki></pre><br />
<br />
Be sure to unpack the source file. The easiest way is to open Nautilus as root:<br />
<pre><nowiki>sudo nautilus</nowiki></pre><br />
Then browse to /usr/src/ and extract the source file to that directory.<br />
<br />
Now change to the tp_smapi dir:<br />
<pre><nowiki>cd tp_smapi-X.YY</nowiki></pre> (X.YY being the version-number of [[tp_smapi]])<br />
and make and install tp_smapi as instructed above.<br />
<br />
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:<br />
<pre><nowiki>root@localhost:~#ls -l /lib/modules/2.6.20-16-generic<br />
lrwxrwxrwx 1 root root 28 2007-02-02 08:39 build -> /usr/src/linux-source-2.6.20</nowiki></pre><br />
Create the link if the line above does not exist:<br />
<pre><nowiki>root@localhost:~#ln -s /usr/src/linux-source-2.6.20 /lib/modules/2.6.20-16-generic/build</nowiki></pre><br />
<br />
Now the following will build and install the correct modules to their locations:<br />
<pre><nowiki>make install HDAPS=1</nowiki></pre><br />
To make sure your system loads the modules at boot time, do this:<br />
<pre><nowiki>echo "tp_smapi" >> /etc/modules<br />
echo "hdaps" >> /etc/modules</nowiki></pre><br />
and update your initramfs:<br />
<pre><nowiki>update-initramfs -u</nowiki></pre><br />
<br />
To get tp_smapi running now, just load the modules:<br />
<pre><nowiki>modprobe -a tp_smapi hdaps</nowiki></pre><br />
<br />
This description was tested on Kubuntu 'Feisty Fawn' and should work on all Debian-based distros with minor tweaks.<br />
<br />
'''EDIT:''' Works on Kubuntu 7.10 ("Gutsy Gibbon"), too<br />
<br />
===Battery charge control features===<br />
{{NOTE|Not all Thinkpad ECs support these charge control features. If you get the message "Operation not supported" when trying to cat for the status of a given parameter, it means your controller does not support that feature.}}<br />
<br />
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):<br />
:{{cmdroot|echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh}}<br />
:{{cmdroot|echo 70 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh}}<br />
:{{cmdroot|cat /sys/devices/platform/smapi/BAT0/*_charge_thresh}}<br />
{{HINT|Battery charging thresholds can be used to keep Li-Ion and Li-Polymer batteries partially charged, in order to [[Maintenance#Battery_treatment|increase their lifetime]].}}<br />
To prevent charging for 17 minutes (regardless of thresholds):<br />
:{{cmdroot|echo 17 > /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes}}<br />
{{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]].}}<br />
<br />
To cancel charging preventation:<br />
:{{cmdroot|echo 0 > /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes}}<br />
<br />
To force battery discharging (even if connected to AC):<br />
:{{cmdroot|echo 1 > /sys/devices/platform/smapi/BAT0/force_discharge}}<br />
{{HINT|This can be used to choose which battery is discharged when [[How to use UltraBay batteries|using an UltraBay battery]]. For example, see the {{CodeRef|tp-bat-balance}} script.}}<br />
<br />
To cancel forced discharge:<br />
:{{cmdroot|echo 0 > /sys/devices/platform/smapi/BAT0/force_discharge}}<br />
<br />
====Making the settings permanent on reboot====<br />
<br />
If you always use the same type of battery, then you may want the same settings to be configured each time you boot the machine.<br />
<br />
If you use various types of battery, then you may want to consider writing some scripts to detect the battery type and apply the appropriate settings.<br />
<br />
=====Debian=====<br />
<br />
It is not necessary to create your own init.d script or modify /etc/rc.local - you just need the package sysfsutils:<br />
:{{cmdroot|apt-get install sysfsutils}}<br />
<br />
Now, put your desired settings in /etc/sysfs.conf:<br />
<br />
<pre><nowiki># cat >> /etc/sysfs.conf << EOF<br />
# For a LiIon battery in a Thinkpad<br />
devices/platform/smapi/BAT0/start_charge_thresh = 50<br />
devices/platform/smapi/BAT0/stop_charge_thresh = 80<br />
EOF</nowiki></pre><br />
<br />
The init script supplied by sysfsutils will load these settings on each boot.<br />
<br />
===Battery status features===<br />
To view extended battery status such as charging state, voltage, current, capacity, cycle count and model information:<br />
<br />
<pre><br />
# cat /sys/devices/platform/smapi/BAT0/installed<br />
# cat /sys/devices/platform/smapi/BAT0/state # idle/charging/discharging<br />
# cat /sys/devices/platform/smapi/BAT0/cycle_count<br />
# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current<br />
# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average<br />
# cat /sys/devices/platform/smapi/BAT0/power_now # instantaneous power<br />
# cat /sys/devices/platform/smapi/BAT0/power_avg # last minute average<br />
# cat /sys/devices/platform/smapi/BAT0/last_full_capacity<br />
# cat /sys/devices/platform/smapi/BAT0/remaining_percent<br />
# cat /sys/devices/platform/smapi/BAT0/remaining_running_time<br />
# cat /sys/devices/platform/smapi/BAT0/remaining_charging_time<br />
# cat /sys/devices/platform/smapi/BAT0/remaining_capacity<br />
# cat /sys/devices/platform/smapi/BAT0/design_capacity<br />
# cat /sys/devices/platform/smapi/BAT0/voltage<br />
# cat /sys/devices/platform/smapi/BAT0/design_voltage<br />
# cat /sys/devices/platform/smapi/BAT0/manufacturer<br />
# cat /sys/devices/platform/smapi/BAT0/model<br />
# cat /sys/devices/platform/smapi/BAT0/barcoding<br />
# cat /sys/devices/platform/smapi/BAT0/chemistry<br />
# cat /sys/devices/platform/smapi/BAT0/serial<br />
# cat /sys/devices/platform/smapi/BAT0/manufacture_date<br />
# cat /sys/devices/platform/smapi/BAT0/first_use_date<br />
# cat /sys/devices/platform/smapi/BAT0/temperature # in milli-Celsius<br />
# cat /sys/devices/platform/smapi/ac_connected<br />
</pre><br />
<br />
The raw status data is also available, including some fields not listed above (in case you can figure them out):<br />
<br />
:{{cmdroot|cat /sys/devices/platform/smapi/BAT0/dump}}<br />
<br />
In all of the above, replace <tt>BAT0</tt> with <tt>BAT1</tt> to address the 2nd battery.<br />
<br />
Note that the battery status readout conflicts with the stock [[HDAPS|hdaps]] driver, so if you use <tt>hdaps</tt> you will need to load <tt>tp_smapi</tt> using {{cmdroot|1=make load HDAPS=1}} (see [[#Bundled hdaps driver|Bundled hdaps driver]] below).<br />
<br />
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]].<br />
<br />
====Scripts====<br />
Some scripts can make it easier to grep the information you need from tp_smapi<br />
* [[battery.rb]]<br />
<br />
===Other features===<br />
<br />
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:<br />
# echo '211a 100 0 0' > /sys/devices/platform/smapi/smapi_request; cat /sys/devices/platform/smapi/smapi_request<br />
211a 34b b2 0 0 0 'OK'<br />
The "4b" in the 2nd value, converted to decimal, is 75: the current charging stop threshold (stop_charge_thresh).<br />
<br />
===Bundled <tt>hdaps</tt> driver===<br />
<br />
The tp_smapi package includes a modified version of the <tt>hdaps</tt> Linux kernel driver used by the [[HDAPS]] system. It has remained outside the mainline kernel for a few years for several reasons, [https://lists.ubuntu.com/archives/kernel-team/2009-April/005565.html] including the upstream maintainer's assertion that the new code's anonymous author was under a NDA. (Although this would not normally expose the kernel team to litigation.) [http://lkml.org/lkml/2008/9/15/126] [http://lkml.org/lkml/2008/10/7/403] [http://lkml.org/lkml/2008/10/7/428]<br />
<br />
To use <tt>tp_smapi</tt> and <tt>hdaps</tt> concurrently, you '''must''' use the modified version.<br />
<br />
To build the modified version, simply append the <tt>HDAPS=1</tt> parameter to the <tt>make</tt> command (see [[#Installation|Installation]] above):<br />
:{{cmdroot|1=make load HDAPS=1}}<br />
or<br />
:{{cmdroot|1=make install HDAPS=1}}<br />
<br />
If you don't do that, you will not be able to load <tt>tp_smapi</tt> (and its support module <tt>thinkpad_ec</tt>) when <tt>hdaps</tt> is loaded, and vice versa. You can use <tt>rmmod</tt> to switch between these modules.<br />
<br />
Note that some of the battery status is also visible through ACPI ({{path|/proc/acpi/battery/*}}), independently of <tt>tp_smapi</tt>.<br />
<br />
The modified <tt>hdaps</tt> has several changes:<br />
* The <tt>hdaps</tt> driver in mainline kernels conflicts with the extended battery status (they use the same IO ports). The modified <tt>hdaps</tt> coordinates this access through the bundled <tt>thinkpad_ec</tt> driver.<br />
* The modified <tt>hdaps</tt> 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.<br />
* Several other improvements, such as the ability to control the polling rate.<br />
<br />
===Troubleshooting===<br />
==== <tt>thinkpad_ec: cannot claim io ports 0x1600-0x161f</tt> ====<br />
The "<tt>thinkpad_ec: cannot claim io ports 0x1600-0x161f!</tt>" error message is printed when loading the <tt>thinkpad_ec</tt> module on some recent ThinkPad models. This occurs because the ACPI BIOS DSDT is reserving ports used by tp_smapi.<br />
<br />
As a workaround, add the <tt>force_io=1</tt> module parameter to <tt>thinkpad_ec</tt> in {{path|/etc/modprobe.conf}} (or your distribution's equivalent). Add the line:<br />
: options thinkpad_ec force_io=1<br />
<br />
For transient testing, load the modules as follows:<br />
<br />
: {{cmdroot|1=make load HDAPS=1 FORCE_IO=1}}<br />
<br />
Note: force_io option was added in tp_smapi v0.40 (released 2008-12-16).<br />
<br />
Models which need this option include:<br />
* ThinkPad {{T400}}<br />
* ThinkPad {{T500}}<br />
* ThinkPad {{X60s}}<br />
* ThinkPad {{X301}}<br />
<br />
More information:<br />
* http://bugzilla.kernel.org/show_bug.cgi?id=12221<br />
* http://www.nabble.com/thinkpad_ec-fails-to-load-on-Thinkpad-T500-td19932985.html<br />
<br />
==== <tt>thinkpad_ec: no ThinkPad embedded controller!</tt> ====<br />
If you get "<tt>thinkpad_ec: no ThinkPad embedded controller!</tt>" 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.<br />
<br />
==== <tt>T60p writing to start_charge_thresh/stop_charge_thresh does not work!</tt> ====<br />
Writing to /sys/devices/platform/smapi/BAT0/start_charge_thresh succeeds, but the older value does not change. Solution: unknown. If you know a solution please update here.<br />
<br />
UPDATE: Failure to effectively change sysfs values sometimes happens at boot time (through sysfs.conf OR etc/local.start for instance) when the values have never previously been changed manually (ie using echo from a shell). Try initializing the values manually before including them in boot-time scripting.<br />
<br />
===Model-specific status===<br />
<br />
<br />
<div style="font-size: 92%"><br />
{| border="1" cellspacing="0" cellpadding="2"<br />
|+<tt>tp_smapi</tt> feature support matrix<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" | <br />
=====A series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{A22p}} 2629-USG<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || N/A || N/A || || || ||<br />
|-<br />
! {{A30}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
=====G series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{G41}}<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || N/A || N/A || || || ||<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
<br />
=====R series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{R31}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || N/A || N/A || || || || No SMAPI BIOS<br />
|-<br />
! {{R40}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cunk}} || N/A || N/A || || || ||<br />
|-<br />
! {{R50}}<br />
| {{Cunk}} || {{Cno}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || || ||<br />
|-<br />
! {{R50e}} 1834-JAG<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{R50e}} 1834-5US<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{R50p}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || || ||<br />
|-<br />
! {{R51}} 18*<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.32 || 3.22 || || Machine types 1829, 1830, 1831 and 1836<br />
|-<br />
! {{R51}} 28*<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || 1.29 || || Machine types 2883, 2887, 2888, 2889, 2894 and 2495<br />
|-<br />
! {{R52}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.33 || 1.29 || 1.06 ||<br />
|-<br />
! {{R60}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} ||{{Cyes}} || {{Cno|text=}} 1 || 0.33 || || ||<br />
|-<br />
! {{R61}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} ||{{Cyes}} || {{Cyes|text=}} 1 || 0.35-test1 || 7KETA7WW 2.07 || 7KHT24WW 1.08 || Machine type 8918<br />
|-<br />
! {{R61i}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} ||{{Cunk}} || {{Cunk}} || || || || Machine type 8250<br />
|-<br />
! {{R400}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} ||{{Cyes}} || {{Cyes|text=}} 1 || 0.40-1 || || || Machine type 7443<br />
|-<br />
! {{R500}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} ||{{Cunk}} || {{Cyes|text=}} 1 || 0.40-1 || || ||<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
<br />
=====T series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{T20}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || N/A || N/A || || || || Has SMAPI BIOS but no function is supported. EC LPC3 protocol fails.<br />
|-<br />
! {{T22}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || N/A || N/A || || || || Has SMAPI BIOS but no function is supported. EC LPC3 protocol fails.<br />
|-<br />
! {{T23}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{T30}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{T40}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{T40}} 2373-72U<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || 0.40 || 3.23 || 1RHT71WW-3.04 ||<br />
|-<br />
! {{T40p}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{T41}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.37 || 3.23 || 3.04 ||<br />
|-<br />
! {{T41}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.40 || 3.20 || 3.04 ||<br />
|-<br />
! {{T41}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.40 || 3.23 || 3.04 ||<br />
|-<br />
! {{T41p}} 2373-AM9<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.32 || 3.20 || v3.04 ||<br />
|-<br />
! {{T42}}<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || || ||<br />
|-<br />
! {{T42p}} 2373-KXU<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.32 || 3.21 || || Stop charge threshold works in Windows, but dmesg says "__get_real_thresh: cannot get stop_thresh of bat=0: Function is not supported by SMAPI BIOS".<br />
|-<br />
! {{T42p}} 2373-KUU<br />
| {{Cyes}} || {{Cno}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || || ||<br />
|-<br />
! {{T43}} 2686<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.33 || 1.27 || ||<br />
|-<br />
! {{T43p}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes|text=}} 0 || || || ||<br />
|-<br />
! {{T60}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 7 || 0.32 || || ||<br />
|-<br />
! {{T60}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 1 || 0.34 || || ||<br />
|-<br />
! {{T60}} 1951-24G<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || 0.36 || 1.09a || ||<br />
|-<br />
! {{T60}} 2007-FSG<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.39 || 1.10 || 1.05b ||<br />
|-<br />
! {{T60}} 1951-CZ1<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.40 || 2.23 || 1.07 ||<br />
|-<br />
! {{T60p}} 8743-CTO<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.32 || || ||<br />
|-<br />
! {{T61}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 1 || 0.32 || || || [http://ubuntuforums.org/showthread.php?p=3146719 ref]<br />
|-<br />
! {{T61p}} 6457-7XG<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 1 || 0.32 || || || [http://ubuntuforums.org/showthread.php?p=3146719 ref]<br />
|-<br />
! {{T400}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.40 || 1.19 || || Requires <tt>force_io=1</tt> parameter to <tt>thinkpad_ec</tt><br />
|-<br />
! {{T400s}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 2 || 0.40 || 1.06 || || Requires <tt>invert=2</tt> paramteter to <tt>hdaps</tt><br />
|-<br />
! {{T410s}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 4 || 0.40 || 1.14 || || Requires <tt>invert=4</tt> accoding to <tt>hdaps-gl</tt><br />
|-<br />
! {{T410}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.40 || 1.25 || ||<br />
|-<br />
! {{T500}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 1 || 0.40 || 2.07 || || Requires <tt>force_io=1</tt> parameter to <tt>thinkpad_ec</tt><br />
|-<br />
! {{T510}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 7 || 0.40 || 1.12 || 1.08 || ||<br />
|-<br />
! {{T510}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 7 || 0.40 || 1.35 || 1.17 || ||<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
<br />
=====W series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{W700}} 2757-CTO<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.40 || 2.08 || 1.05 ||<br />
|-<br />
<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
<br />
=====X series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{X22}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || N/A || N/A || || || || no EC controller found<br />
|-<br />
! {{X24}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cunk}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{X30}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || 0.34 || 1.09 || ||<br />
|-<br />
! {{X31}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || 0.40 || 3.02 || ||<br />
|-<br />
! {{X32}}<br />
| {{Cno}} || {{Cno}} || {{Cno}} || {{Cno}} || {{Cyes}} || N/A || N/A || || || ||<br />
|-<br />
! {{X40}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 3 || 0.32 || 2.08 || 1.62 || <br />
|-<br />
! {{X41}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 3 || 0.32 || || ||<br />
|-<br />
! {{X41_Tablet}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 3 || 0.40 || 75ET60WW (2.06 ) || 75HT20WW (1.02) ||<br />
|-<br />
! {{X60}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 || || 2.07 || 1.10 || 2.6.20 issue (see discussion)<br />
|-<br />
! {{X60_Tablet}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 3 || 0.34 || 7JET25WW (1.10 ) || 7JHT13WW 1.04 || [http://luke.no-ip.org/x60tablet/ ref] [http://rad.bioinfo.ulaval.ca/hardware/x60tablet ref]<br />
|-<br />
! {{X60s}} 1704-5UG<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cno|text=}} 3 || 0.34 || 7BETD2WW 2.13 || 7BHT40WW 1.13 ||<br />
|-<br />
! {{X60s}} 1704-56G<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cno|text=}} 3 || 0.40 || 7BETD5WW 2.16 || 7BHT40WW 1.13 ||<br />
|-<br />
! {{X61}} 7673-CTO<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.37 || 7NETB9WW (2.19) || {{Cunk}} ||<br />
|-<br />
! {{X61}} 7675-CTO<br />
| {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cno|text=}} 6 || 0.35-test1 || || ||<br />
|-<br />
! {{X61}} 7675-4KU<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 || 0.34 || 7NET30WW (1.11 ) || 7MHT24WW 1.02 ||<br />
|-<br />
! {{X61_Tablet}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 || 0.32 || || ||<br />
|-<br />
! {{X61s}}<br />
| {{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<br />
|-<br />
! {{X100e}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || 0.40 || 6XET36WW (1.20a) || 6XHT36WW (1.176000) || x100e NTS4UTX, dual-core L625 also works (NTT27MH)<br />
|-<br />
! {{X200}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 7 || 0.40 || 6DET40WW (2.04 ) || 7XHT22WW 1.04 ||<br />
|-<br />
! {{X200s}} 7470-X01<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 5 || 0.40 || 6DET63WW (3.13) || 7XHT24WW 1.06 ||<br />
|-<br />
! {{X201}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 6 || 0.40 || || ECP: ||<br />
|-<br />
! {{X201s}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cno|text=}} 5 || 0.40 || 6QET44WW (1.14 ) || ECP: 1.09/1.09 ||<br />
|-<br />
! {{X300}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || 0.37 || 7TET25WW (1.02 ) || 7THT15WW 1.00c ||<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
<br />
=====Z series=====<br />
|-<br />
{{tp_smapi/model_status_table_header}}<br />
|-<br />
! {{Z60m}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || || ||<br />
|-<br />
! {{Z60t}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || {{Cyes}} || {{Cunk}} || {{Cunk}} || || || ||<br />
|-<br />
! {{Z61m}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes|text=}} 0 || 0.32 || || ||<br />
|-<br />
! {{Z61t}}<br />
| {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || || || || [https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/45014 ref]<br />
|-<br />
! {{Z61p}}<br />
| {{Cyes}} || {{Cyes}} || {{Cunk}} || {{Cyes}} || {{Cyes}} || {{Cyes}} || {{Cunk}} || || || ||<br />
|-<br />
! colspan=12 style="text-align:center;background:#efefef;" |<br />
<br />
=====SL series and IdeaPad=====<br />
|-<br />
! colspan=12 style="text-align:left" |<br />
The ThinkPad SL series and IdeaPad series have firmware that is completely different from other ThinkPad models. Neither [[tp_smapi]] nor [[thinkpad-acpi]] support these models.<br />
|}<br />
</div><br />
<br />
<br />
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).<br />
<br />
Please update the above and report your experience on the [[Talk:tp_smapi|discussion]] page. If the module loads but gives a "<tt>not supported</tt>" or "<tt>not implementeded</tt>" error when you try to use some specific file in {{path|/sys/devices/platform/smapi/}}, please report the <tt>dmesg</tt> output and whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that. <br />
<br />
While at it, you may also want to add your laptop to the [[list of DMI IDs]].<br />
<br />
=====HDAPS axis orientation=====<br />
<sup>1</sup> The HDAPS axis orientation is set using the <tt>invert</tt> module parameter (at load time) or sysfs attribute (at runtime). The <tt>hdaps</tt> driver of tp_smapi 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.<br />
<br />
The <tt>invert</tt> parameter is an integer between 0 and 7, whose meaning is defined below. (This is confusing. Most people will find it easier to just try all 8 possibilities.)<br />
<br />
Let <tt>X</tt> and <tt>Y</tt> denote the hardware readouts. Let <tt>R</tt> denote the laptop's roll (tilt left/right), and let <tt>P</tt> denote the laptop's pitch (tilt forward/backward). The possible values are as follows:<br />
invert=0: R= X P= Y (same as mainline)<br />
invert=1: R=-X P=-Y (same as mainline)<br />
invert=2: R=-X P= Y (new)<br />
invert=3: R= X P=-Y (new)<br />
invert=4: R= Y P= X (new)<br />
invert=5: R=-Y P=-X (new)<br />
invert=6: R=-Y P= X (new)<br />
invert=7: R= Y P=-X (new)<br />
<br />
[[Category:Drivers]] [[Category:Patches]]<br />
<br />
===Tools using this driver===<br />
<br />
The driver's interface can be accessed directly through the files under {{path|/sys/devices/platform/smapi}}, or via the following tools:<br />
* [[KThinkBat]] - display battery status on the KDE <tt>kicker</tt> panel.<br />
* [[gkrellm-ThinkBat]] - battery status plugin for Gkrellm2<br />
* {{CodeRef|thinkpad-smapi.sh}} - script to display various SMAPI information using tp_smapi module.<br />
<br />
== Headline text ==</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=Category:X60s&diff=48535Category:X60s2010-05-12T12:10:28Z<p>SpeedEvil: /* ThinkPad X60s */ typo</p>
<hr />
<div>__NOTOC__<br />
{| width="100%"<br />
|style="vertical-align:top" |<br />
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
=== ThinkPad X60s ===<br />
This page gives an overview of all ThinkPad X60s related topics.<br />
<br />
==== Standard Features ====<br />
* One of the following low voltage processors, supporting Intel Virtualization Technology ([[Problem with disabled VT|available since bios version 2.06]]):<br />
** [[Intel Core 2 Duo]] CPU L7400 @ 1.50 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2500 @ 1.83 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2400 @ 1.66 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2300 @ 1.50 GHz<br />
* [[Intel Graphics Media Accelerator 950]]<br />
** 12.1" TFT display with 1024x768 resolution (150 nits)<br />
** 12.1" TFT display with 1024x768 resolution (UL, 180 nits)<br />
* 256, 512, or 1024 MB [[PC2-5300]] memory standard<br />
** Supports 2048M per stick, for a total of 4096M, this was offered as 4GB PC3-8500, FRU 51J0493 (lenovo compatibility list)<br />
* 40, 60, 80, or 100 GB 5400 rpm SATA 2.5" HDD <br />
* [[Active Protection System]]<br />
* Intel HD Audio with [[AD1981HD]] codec<br />
* [[Intel Gigabit Ethernet (10/100/1000) PCI-Express]]<br />
* [[MiniPCI Express slot]] with one of the following:<br />
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]<br />
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]<br />
* [[Embedded Security Subsystem|Trusted Computing Group TPM 1.2]]<br />
* [[Integrated Fingerprint Reader]] on some models<br />
* [[SD Card slot]] with IO support<br />
* [[CardBus slot]] (Type 2)<br />
* [[Firewire Port|Firewire 400]] (IEEE1394a)<br />
</div><br />
|style="vertical-align:top" |<br />
[[Image:ThinkPadX60.jpg|ThinkPad X60s]]<br />
|}<br />
<br />
The '''s''' in X60s means "slim". This is achieved by the low-voltage CPU, which requires less cooling. Sellers claim an amazing 8 hour battery life.<br />
<br />
A tiny "Radio Frequency Kill Switch" is rather hidden below the front edge of the keyboard, it stops Wireless, Bluetooth and GSM/UMTS.<br />
<br />
=== Batteries ===<br />
The x60s uses lithium-ion batteries in various shapes and sizes.<br />
<br />
All these batteries apart from the ultrabay battery that fits in the base are 14.4V<br />
<br />
It can use batteries which work with the x60, but these are approximately 3cm shorter, and leave a gap, which needs to be filled with a spacer, 92P1227/42W3050 (same part). The x61s is similar, but only some batteries are recommended.<br />
<br />
Firstly, there are the prismatic batteries that fit flat with the bottom of the laptop - these give you a nice smooth back to the laptop and are slightly lighter in weight.<br />
<br />
* Battery 4-cell Li-Ion (Prismatic)<br />
o Sanyo 92P1163<br />
o LGC 42T5224 <br />
** LG Chemical 92P1165<br />
<br />
The 4-cell cylindrical battery is slightly larger - it protrudes a little from the underside of the laptop - approximately 10mm, but is flush with the back.<br />
<br />
* Battery 4-cell Li-Ion (2.6AH cylindrical)<br />
o Sanyo 42T4505 93P5027 92P1167<br />
o Sony 93P5028 92P1169 <br />
<br />
The 8 cell battery is similar to the 4 cell battery, but it has an extra 4 cells in a 'bar' that goes along the entire width of the laptop, making the laptop about 20mm deeper. It's of course heavier too.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 92P1171 93P5029<br />
o Sony 92P1173 <br />
<br />
A similar battery, that also works in the x61s as well as the x60.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 93P5029 42T4506<br />
o Sony 93P5030 <br />
<br />
A large battery that covers the entire underside of the laptop - leaving space for normal batteries.<br />
<br />
* Extended battery Li-Ion (Sanyo)<br />
o 40Y7904 <br />
<br />
A battery that fits inside the ultrabase:<br />
* ThinkPad Advance Ultrabay Battery<br />
** 40Y6789 27Wh, 2.7Ah 10.8V (approximately equal to 2Ah@14.4V<br />
The lenovo website currently lists <br />
==== External links ====<br />
* {{IBMDOCURL|MIGR-62866|ThinkPad X60, X60s, X61, X61s - Hardware Maintenance Manual}}<br />
<br />
==== Reviews ====<br />
* [http://www.notebookreview.com/default.asp?newsID=2701 NotebookReview.com], 2006-01-05<br />
<br />
[[Category:X Series]]</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=X60s&diff=48534X60s2010-05-12T12:09:49Z<p>SpeedEvil: Redirected page to Category:X60s</p>
<hr />
<div>#redirect [[category:x60s]]</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=Category:X60s&diff=44543Category:X60s2009-10-26T17:35:55Z<p>SpeedEvil: Adding additional information sourced from the parts list for the x60s on lenovo.co.uk</p>
<hr />
<div>{| width="100%"<br />
|style="vertical-align:top" |<br />
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
=== ThinkPad X60s ===<br />
This pages gives an overview of all ThinkPad X60s related topics.<br />
<br />
==== Standard Features ====<br />
* One of the following low voltage processors, supporting Intel Virtualization Technology ([[Problem with disabled VT|available since bios version 2.06]]):<br />
** [[Intel Core 2 Duo]] CPU L7400 @ 1.50 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2500 @ 1.83 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2400 @ 1.66 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2300 @ 1.50 GHz<br />
* [[Intel Graphics Media Accelerator 950]]<br />
** 12.1" TFT display with 1024x768 resolution (150 nits)<br />
** 12.1" TFT display with 1024x768 resolution (UL, 180 nits)<br />
* 256, 512, or 1024 MB [[PC2-5300]] memory standard<br />
** Supports 2048M per stick, for a total of 4096M, this was offered as 4GB PC3-8500, FRU 51J0493 (lenovo compatibility list)<br />
* 40, 60, 80, or 100 GB 5400 rpm SATA 2.5" HDD <br />
* [[Active Protection System|IBM Active Protection System]]<br />
* [[AD1981HD]] HD Audio 1.0 controller<br />
* [[Ethernet Controllers#Intel Gigabit (10/100/1000)|Intel Gigabit Ethernet Controller]]<br />
* [[MiniPCI Express slot]] with one of the following:<br />
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]<br />
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]<br />
* [[Embedded Security Subsystem|IBM Embedded Security Subsystem 2.0]]<br />
* [[Integrated Fingerprint Reader]] on some models<br />
* [[SD Card slot]] with IO support<br />
* [[CardBus slot]] (Type 2)<br />
* Firewire (IEEE1394)<br />
</div><br />
|style="vertical-align:top" |<br />
[[Image:ThinkPadX60.jpg|ThinkPad X60s]]<br />
|}<br />
<br />
The '''s''' in X60s means "slim". This is achieved by the low-voltage CPU, which requires less cooling. Sellers claim an amazing 8 hour battery life.<br />
<br />
A tiny "Radio Frequency Kill Switch" is rather hidden below the front edge of the keyboard, it stops Wireless, Bluetooth and GSM/UMTS.<br />
<br />
=== Batteries ===<br />
The x60s uses lithium-ion batteries in various shapes and sizes.<br />
<br />
All these batteries apart from the ultrabay battery that fits in the base are 14.4V<br />
<br />
It can use batteries which work with the x60, but these are approximately 3cm shorter, and leave a gap, which needs to be filled with a spacer, 92P1227/42W3050 (same part). The x61s is similar, but only some batteries are recommended.<br />
<br />
Firstly, there are the prismatic batteries that fit flat with the bottom of the laptop - these give you a nice smooth back to the laptop and are slightly lighter in weight.<br />
<br />
* Battery 4-cell Li-Ion (Prismatic)<br />
o Sanyo 92P1163<br />
o LGC 42T5224 <br />
** LG Chemical 92P1165<br />
<br />
The 4-cell cylindrical battery is slightly larger - it protrudes a little from the underside of the laptop - approximately 10mm, but is flush with the back.<br />
<br />
* Battery 4-cell Li-Ion (2.6AH cylindrical)<br />
o Sanyo 42T4505 93P5027 92P1167<br />
o Sony 93P5028 92P1169 <br />
<br />
The 8 cell battery is similar to the 4 cell battery, but it has an extra 4 cells in a 'bar' that goes along the entire width of the laptop, making the laptop about 20mm deeper. It's of course heavier too.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 92P1171 93P5029<br />
o Sony 92P1173 <br />
<br />
A similar battery, that also works in the x61s as well as the x60.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 93P5029 42T4506<br />
o Sony 93P5030 <br />
<br />
A large battery that covers the entire underside of the laptop - leaving space for normal batteries.<br />
<br />
* Extended battery Li-Ion (Sanyo)<br />
o 40Y7904 <br />
<br />
A battery that fits inside the ultrabase:<br />
* ThinkPad Advance Ultrabay Battery<br />
** 40Y6789 27Wh, 2.7Ah 10.8V (approximately equal to 2Ah@14.4V<br />
The lenovo website currently lists <br />
==== External links ====<br />
* {{IBMDOCURL|MIGR-62866|ThinkPad X60, X60s, X61, X61s - Hardware Maintenance Manual}}<br />
<br />
==== Reviews ====<br />
* [http://www.notebookreview.com/default.asp?newsID=2701 NotebookReview.com], 2006-01-05<br />
<br />
[[Category:X Series]]</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=User_talk:SpeedEvil&diff=44516User talk:SpeedEvil2009-10-18T23:20:03Z<p>SpeedEvil: /* Batteries */</p>
<hr />
<div>I haz a x60s. And a flavour!</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=Category:X60s&diff=44514Category:X60s2009-10-18T23:15:10Z<p>SpeedEvil: </p>
<hr />
<div>{| width="100%"<br />
|style="vertical-align:top" |<br />
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
=== ThinkPad X60s ===<br />
This pages gives an overview of all ThinkPad X60s related topics.<br />
<br />
==== Standard Features ====<br />
* One of the following low voltage processors, supporting Intel Virtualization Technology ([[Problem with disabled VT|available since bios version 2.06]]):<br />
** [[Intel Core 2 Duo]] CPU L7400 @ 1.50 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2500 @ 1.83 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2400 @ 1.66 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2300 @ 1.50 GHz<br />
* [[Intel Graphics Media Accelerator 950]]<br />
** 12.1" TFT display with 1024x768 resolution (150 nits)<br />
** 12.1" TFT display with 1024x768 resolution (UL, 180 nits)<br />
* 256, 512, or 1024 MB [[PC2-5300]] memory standard<br />
* 40, 60, 80, or 100 GB 5400 rpm SATA 2.5" HDD <br />
* [[Active Protection System|IBM Active Protection System]]<br />
* [[AD1981HD]] HD Audio 1.0 controller<br />
* [[Ethernet Controllers#Intel Gigabit (10/100/1000)|Intel Gigabit Ethernet Controller]]<br />
* [[MiniPCI Express slot]] with one of the following:<br />
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]<br />
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]<br />
* [[Embedded Security Subsystem|IBM Embedded Security Subsystem 2.0]]<br />
* [[Integrated Fingerprint Reader]] on some models<br />
* [[SD Card slot]] with IO support<br />
* [[CardBus slot]] (Type 2)<br />
* Firewire (IEEE1394)<br />
</div><br />
|style="vertical-align:top" |<br />
[[Image:ThinkPadX60.jpg|ThinkPad X60s]]<br />
|}<br />
<br />
The '''s''' in X60s means "slim". This is achieved by the low-voltage CPU, which requires less cooling. Sellers claim an amazing 8 hour battery life.<br />
<br />
A tiny "Radio Frequency Kill Switch" is rather hidden below the front edge of the keyboard, it stops Wireless, Bluetooth and GSM/UMTS.<br />
<br />
=== Batteries ===<br />
The x60s uses lithium-ion batteries in various shapes and sizes.<br />
<br />
It can use batteries which work with the x60, but these are approximately 3cm shorter, and leave a gap, which needs to be filled with a spacer, 92P1227/42W3050 (same part). The x61s is similar, but only some batteries are recommended.<br />
<br />
Firstly, there are the prismatic batteries that fit flat with the bottom of the laptop - these give you a nice smooth back to the laptop and are slightly lighter in weight.<br />
<br />
* Battery 4-cell Li-Ion (Prismatic)<br />
o Sanyo 92P1163<br />
o LGC 42T5224 <br />
<br />
The 4-cell cylindrical battery is slightly larger - it protrudes a little from the underside of the laptop - approximately 10mm, but is flush with the back.<br />
<br />
* Battery 4-cell Li-Ion (2.6AH cylindrical)<br />
o Sanyo 42T4505 93P5027 92P1167<br />
o Sony 93P5028 92P1169 <br />
<br />
The 8 cell battery is similar to the 4 cell battery, but it has an extra 4 cells in a 'bar' that goes along the entire width of the laptop, making the laptop about 20mm deeper. It's of course heavier too.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 92P1171<br />
o Sony 92P1173 <br />
<br />
A similar battery, that also works in the x61s as well as the x60.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 93P5029 42T4506<br />
o Sony 93P5030 <br />
<br />
A large battery that covers the entire underside of the laptop - leaving space for normal batteries.<br />
<br />
* Extended battery Li-Ion (Sanyo)<br />
o 40Y7904 <br />
<br />
==== External links ====<br />
* {{IBMDOCURL|MIGR-62866|ThinkPad X60, X60s, X61, X61s - Hardware Maintenance Manual}}<br />
<br />
==== Reviews ====<br />
* [http://www.notebookreview.com/default.asp?newsID=2701 NotebookReview.com], 2006-01-05<br />
<br />
[[Category:X Series]]</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=Category:X60s&diff=44513Category:X60s2009-10-18T23:04:09Z<p>SpeedEvil: Add information on battery FRUs</p>
<hr />
<div>{| width="100%"<br />
|style="vertical-align:top" |<br />
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
=== ThinkPad X60s ===<br />
This pages gives an overview of all ThinkPad X60s related topics.<br />
<br />
==== Standard Features ====<br />
* One of the following low voltage processors, supporting Intel Virtualization Technology ([[Problem with disabled VT|available since bios version 2.06]]):<br />
** [[Intel Core 2 Duo]] CPU L7400 @ 1.50 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2500 @ 1.83 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2400 @ 1.66 GHz<br />
** [[Intel Core Duo (Yonah)]] CPU L2300 @ 1.50 GHz<br />
* [[Intel Graphics Media Accelerator 950]]<br />
** 12.1" TFT display with 1024x768 resolution (150 nits)<br />
** 12.1" TFT display with 1024x768 resolution (UL, 180 nits)<br />
* 256, 512, or 1024 MB [[PC2-5300]] memory standard<br />
* 40, 60, 80, or 100 GB 5400 rpm SATA 2.5" HDD <br />
* [[Active Protection System|IBM Active Protection System]]<br />
* [[AD1981HD]] HD Audio 1.0 controller<br />
* [[Ethernet Controllers#Intel Gigabit (10/100/1000)|Intel Gigabit Ethernet Controller]]<br />
* [[MiniPCI Express slot]] with one of the following:<br />
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]<br />
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]<br />
* [[Embedded Security Subsystem|IBM Embedded Security Subsystem 2.0]]<br />
* [[Integrated Fingerprint Reader]] on some models<br />
* [[SD Card slot]] with IO support<br />
* [[CardBus slot]] (Type 2)<br />
* Firewire (IEEE1394)<br />
</div><br />
|style="vertical-align:top" |<br />
[[Image:ThinkPadX60.jpg|ThinkPad X60s]]<br />
|}<br />
<br />
The '''s''' in X60s means "slim". This is achieved by the low-voltage CPU, which requires less cooling. Sellers claim an amazing 8 hour battery life.<br />
<br />
A tiny "Radio Frequency Kill Switch" is rather hidden below the front edge of the keyboard, it stops Wireless, Bluetooth and GSM/UMTS.<br />
<br />
Batteries<br />
<br />
The x60s uses lithium-ion batteries in various shapes and sizes.<br />
<br />
It can use batteries which work with the x60, but these are approximately 3cm shorter, and leave a gap, which needs to be filled with a spacer, 92P1227/42W3050 (same part). The x61s is similar, but only some batteries are recommended.<br />
<br />
Firstly, there are the prismatic batteries that fit flat with the bottom of the laptop - these give you a nice smooth back to the laptop and are slightly lighter in weight.<br />
<br />
* Battery 4-cell Li-Ion (Prismatic)<br />
o Sanyo 92P1163<br />
o LGC 42T5224 <br />
<br />
The 4-cell cylindrical battery is slightly larger - it protrudes a little from the underside of the laptop - approximately 10mm, but is flush with the back.<br />
<br />
* Battery 4-cell Li-Ion (2.6AH cylindrical)<br />
o Sanyo 42T4505 93P5027 92P1167<br />
o Sony 93P5028 92P1169 <br />
<br />
The 8 cell battery is similar to the 4 cell battery, but it has an extra 4 cells in a 'bar' that goes along the entire width of the laptop, making the laptop about 20mm deeper. It's of course heavier too.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 92P1171<br />
o Sony 92P1173 <br />
<br />
A similar battery, that also works in the x61s as well as the x60.<br />
<br />
* Battery 8-cell Li-Ion (5.2AH cylindrical)<br />
o Sanyo 93P5029 42T4506<br />
o Sony 93P5030 <br />
<br />
A large battery that covers the entire underside of the laptop - leaving space for normal batteries.<br />
<br />
* Extended battery Li-Ion (Sanyo)<br />
o 40Y7904 <br />
<br />
==== External links ====<br />
* {{IBMDOCURL|MIGR-62866|ThinkPad X60, X60s, X61, X61s - Hardware Maintenance Manual}}<br />
<br />
==== Reviews ====<br />
* [http://www.notebookreview.com/default.asp?newsID=2701 NotebookReview.com], 2006-01-05<br />
<br />
[[Category:X Series]]</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=User_talk:SpeedEvil&diff=44512User talk:SpeedEvil2009-10-18T23:03:00Z<p>SpeedEvil: </p>
<hr />
<div>I haz a x60s. And a flavour!<br />
==== Batteries ====<br />
The x60s uses lithium-ion batteries in various shapes and sizes.<br />
<br />
It can use batteries which work with the x60, but these are approximately 3cm shorter, and leave a gap, which needs to be filled with a spacer, 92P1227/42W3050 (same part).<br />
The x61s is similar, but only some batteries are recommended.<br />
<br />
Firstly, there are the prismatic batteries that fit flat with the bottom of the laptop - these give you a nice smooth back to the laptop and are slightly lighter in weight. <br />
<br />
* Battery 4-cell Li-Ion (Prismatic)<br />
** Sanyo 92P1163<br />
** LGC 42T5224<br />
<br />
The 4-cell cylindrical battery is slightly larger - it protrudes a little from the underside of the laptop - approximately 10mm, but is flush with the back.<br />
<br />
*Battery 4-cell Li-Ion (2.6AH cylindrical)<br />
**Sanyo 42T4505 93P5027 92P1167 <br />
**Sony 93P5028 92P1169 <br />
<br />
The 8 cell battery is similar to the 4 cell battery, but it has an extra 4 cells in a 'bar' that goes along the entire width of the laptop, making the laptop about 20mm deeper. It's of course heavier too.<br />
<br />
*Battery 8-cell Li-Ion (5.2AH cylindrical) <br />
**Sanyo 92P1171 <br />
**Sony 92P1173 <br />
<br />
A similar battery, that also works in the x61s as well as the x60.<br />
*Battery 8-cell Li-Ion (5.2AH cylindrical) <br />
**Sanyo 93P5029 42T4506<br />
**Sony 93P5030 <br />
<br />
A large battery that covers the entire underside of the laptop - leaving space for normal batteries.<br />
<br />
*Extended battery Li-Ion (Sanyo)<br />
**40Y7904</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=How_to_configure_the_TrackPoint&diff=43847How to configure the TrackPoint2009-08-09T14:51:37Z<p>SpeedEvil: correct the trackpoint link - which was pointing to a very old version of the spec</p>
<hr />
<div>{| width="100%"<br />
|style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" | __TOC__<br />
|style="vertical-align:top" |Below are several ways of configuring the kernel psmouse driver for controlling extended TrackPoint features.<br />
|}<br />
<br />
= Configuration using Gnome=<br />
If you are using GNOME, you might want to use [http://tpctl.sourceforge.net/configure-trackpoint.html configure-trackpoint] as a graphical frontend.<br />
<br />
= Configuration using udev and HAL =<br />
Modern distributions like Ubuntu 8.10 and Fedora 10 use udev and HAL to configure the input devices. You should no longer make changes to xorg.conf as by default Xorg (through the evdev driver) will let the kernel now handle input devices.<br />
<br />
But before you get started on this you should make sure you have all the updates applied from your distro vendor as both Ubuntu 8.10 and Fedora 10 require some additional fixes that you will need.<br />
<br />
=== Vertical Scrolling ===<br />
By default the middle mouse button is that, a middle mouse button, which in Linux is used for the Paste operation.<br />
<br />
But you can configure it to act in the same way as in Windows, such that you can use it for vertical scrolling (keep the button pressed and move the TrackPoint up and down to scroll). To accomplish this create the file {{path|/etc/hal/fdi/policy/mouse-wheel.fdi}} as root with the following content:<br />
<br />
<pre><br />
<match key="info.product" string="TPPS/2 IBM TrackPoint"><br />
<merge key="input.x11_options.EmulateWheel" type="string">true</merge><br />
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge><br />
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge><br />
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge><br />
<merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge><br />
</match><br />
</pre><br />
<br />
If you also want to have horizontal scrolling, simply add the following XAxisMapping option to the above<br />
<pre><br />
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge><br />
</pre><br />
After this reboot, or restart the hal service and Xorg. You can validate the settings with {{cmd|lshal|}}.<br />
<br />
====Reactivate Scrolling after suspend/resume====<br />
Scrolling may be disabled after a resume from suspend. <br />
<br />
You can manually reactivate the trackpoint by reloading the {{path|psmouse}} module as root:<br />
:{{cmdroot|rmmod psmouse && modprobe psmouse}}<br />
<br />
You can automatically force the pm-utils to reload this module.<br />
Create a file {{path|/etc/pm/config.d/01reload_mouse}} as root with the following content:<br />
<pre><br />
# reload psmouse to reactivate trackpoint scrolling<br />
SUSPEND_MODULES="${SUSPEND_MODULES:+$SUSPEND_MODULES }psmouse"<br />
</pre><br />
<br />
===Configuring other options (e.g. Press to select, Sensitivity and Speed)===<br />
<!--HAL wasn't made to configure sysfs settings, so we'll use udev instead --><br />
Create a file {{path|/etc/udev/rules.d/10-trackpoint.rules}} and add a line to suit your needs<br />
<br />
<pre><br />
SUBSYSTEM=="serio", DRIVERS=="psmouse", ATTR{press_to_select}="1", ATTR{sensitivity}="122"<br />
</pre><br />
<br />
Testing udev with {{cmdroot|udevadm test /devices/platform/i8042/serio1}} should apply the new changes. All of the settings listed [[How to configure the TrackPoint#Sysfs_Options_Reference|below]] can be specified here as part of a comma separated list.<br />
<br />
=Configuration using xinput=<br />
If you want to modify changes on the fly, you can do so with {{cmd|xinput|}} (part of the optional xorg-x11-apps rpm on Fedora).<br />
Note that these changes are not saved when the xserver is restarted.<br />
<br />
To query the available options<br />
xinput list-props "TPPS/2 IBM TrackPoint"<br />
<br />
To enable vertical scrolling<br />
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation" 8 1<br />
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation Button" 8 2<br />
<br />
{{Todo|some other examples}}<br />
<br />
=Configuration using sysfs=<br />
Another way to modify changes on the fly, is echoing values directly into special files in sysfs.<br />
<br />
{{NOTE|<br />
The examples shown below are valid for ThinkPads with both TrackPoint and Touchpad, in which case the sysfs path is {{path|/sys/devices/platform/i8042/serio1/serio2}}.<br />
<br />
If however you have a ThinkPad without Touchpad, or with the Touchpad disabled in the BIOS, the sysfs path needs to be changed to {{path|/sys/devices/platform/i8042/serio1}} instead (notice the missing serio2 at the end).}}<br />
<br />
If you want to set the sysfs parameters at boot, you can use the [http://linux-diag.sourceforge.net/Sysfsutils.html sysfsutils] and put the preferred value in /etc/sysfs.conf.<br />
<br />
===Press to Select===<br />
Press to Select allows you to tap the control stick which will simulate a left click. You can enable this feature by typing the following in to a terminal (you may need to be root):<br />
<br />
:{{cmdroot|echo -n 1 > /sys/devices/platform/i8042/serio1/serio2/press_to_select}}<br />
<br />
Press to Select should now be enabled. You can disable it in a similar manner:<br />
<br />
:{{cmdroot|echo -n 0 > /sys/devices/platform/i8042/serio1/serio2/press_to_select}}<br />
<br />
You can use this script to automate the operation<br />
<br />
#!/bin/bash<br />
if [ "$1" = "1" ]; then<br />
echo "Turning on tap on TrackPoint"<br />
echo -n 1 > /sys/devices/platform/i8042/serio1/serio2/press_to_select<br />
exit 0<br />
fi<br />
if [ "$1" = "0" ]; then<br />
echo "Turning off tap on TrackPoint"<br />
echo -n 0 > /sys/devices/platform/i8042/serio1/serio2/press_to_select<br />
exit 0<br />
fi<br />
echo -n "Tap status: "<br />
cat /sys/devices/platform/i8042/serio1/serio2/press_to_select<br />
<br />
In Ubuntu 8.10 to make Press to Select a permanent change:<br />
<br />
echo -n 1 | tee /sys/devices/platform/i8042/serio1/serio2/press_to_select<br />
<br />
As root, append the above command above "exit 0" in /etc/gdm/Init/Default<br />
<br />
===Sensitivity & Speed===<br />
Adjusting the speed and sensitivity of the TrackPoint requires echoing a value between 0 and 255 into the appropriate file. For example, for a speed of 120 and a sensitivity of 250, type the following into a terminal:<br />
<br />
:{{cmdroot|echo -n 120 > /sys/devices/platform/i8042/serio1/serio2/speed}}<br />
:{{cmdroot|echo -n 250 > /sys/devices/platform/i8042/serio1/serio2/sensitivity}}<br />
<br />
Feel free to experiment with your settings until you find a combination that is comfortable.<br />
<br />
When you satisfy your setting, add the two lines into /etc/rc.d/rc.local in order to avoid restoring the default setting every time the system reboots.<br />
<br />
===Vertical Scrolling===<br />
No sysfs entry exists for vertical scrolling in kernels after 2.6.11.<br />
<br />
The feature was removed as it was not a hardware feature, but rather emulating a scroll action in software and as such did not belong in the kernel.<br />
Instead the scroll feature of the Xserver should be used, which can be activated with HAL or xinput as described above.<br />
<br />
=Configuration using the X server (old Xorg only)=<br />
{{NOTE|This only applies to old distributions with Xorg versions that did not yet use evdev. For modern distributions use one of the other methods}}<br />
The scroll setting has been removed from the trackpoint driver in kernel versions 2.6.11 and above. Scroll emulation should now be handled in the X server.<br />
<br />
A nice side effect of that is, that middle button scrolling applies to any mouse and not just the TrackPoint interface, which can be a quite handy feature for desktop computers or people who prefer to use an external mouse, especially when scrolling through long lists or needing to use horizontal scrolling with a mouse which has only a vertical scroll wheel.<br />
<br />
The necessary functionality, known as "EmulateWheelTimeout" allowing to use button 2 for a middle click, wasn't implemented in Xorg prior to 6.9/7.0. However, there was a patch included in most distributions packages of Xorg, which was announced [http://www.mail-archive.com/devel@xfree86.org/msg03333.html here]. You can find an updated version of the package in the experimental branch of {{Debian}} or try to build the mouse driver yourself with the information in the announcement. This has successfully been tried with FC3's 6.8.2 packages.<br />
<br />
Once this functionality is in the X.org, add these lines to your TrackPoint configuration section in {{path|/etc/X11/xorg.conf}}:<br />
<br />
Option "EmulateWheel" "on"<br />
Option "EmulateWheelButton" "2"<br />
<br />
It may also be necessary to add these lines:<br />
<br />
Option "YAxisMapping" "4 5"<br />
Option "XAxisMapping" "6 7"<br />
<br />
which specify which buttons are mapped to motion in the vertical (Y) and horizontal (X) directions, respectively, in wheel emulation mode (see http://www.xfree86.org/current/mouse.4.html).<br />
<br />
{{HINT| Use the program "xev" to see, what mouse button identifiers are sent by your mouse/touchpad/trackpoint.<br />You might want to try: "xev &#124; grep button"}}<br />
{{HINT| If it does not work see if evdev is installed and remove it. On gentoo do the following:<br /><br />
eix xf86-input-evdev<br /><br />
emerge -C xf86-input-evdev<br /><br />
and then remove the evdev flag in make.conf INPUT_DEVICES}}<br />
<br />
So, a complete mouse section, that implements this nicely and works very well on my R51, even with a simultaneously connected USB mouse, looks like that (tried out today, 20th of September, 2006 on Dapper):<br />
<br />
Section "InputDevice"<br />
Identifier "Configured Mouse"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mice"<br />
Option "Protocol" "ExplorerPS/2"<br />
Option "Emulate3Buttons" "on"<br />
Option "Emulate3TimeOut" "50"<br />
Option "EmulateWheel" "on"<br />
Option "EmulateWheelTimeOut" "200"<br />
Option "EmulateWheelButton" "2"<br />
Option "YAxisMapping" "4 5"<br />
Option "XAxisMapping" "6 7"<br />
Option "ZAxisMapping" "4 5"<br />
EndSection<br />
<br />
The mappings for Y and Z are the same, since the "Z-Axis" refers to actual hardware scrolling wheels which usually scroll the screen along the Y-Axis. If there is no hardware scrolling wheel present, horizontal and vertical scrolling using the TrackPoint work fine without the Z-Axis line.<br />
<br />
Now restart X and hold down button 2 and move the mouse to scroll, or just press and release button 2 for a middle click.<br />
<br />
To make this work with the synaptics driver for the touchpad, you can add<br />
Option "GuestMouseOff" "1"<br />
to the synaptics device section. This will make the synaptics driver ignore the Trackpoint, so it will be handled by the mouse driver. This allowed me to disable the touchpad while making the TrackPoint work like it should.<br />
<br />
{{NOTE| With the above mouse section in my xorg.conf all this works like a charm: <br />
*I can press the wheel on my external USB mouse and move the mouse up and down for scrolling<br />
*or I can just use the wheel on the external mouse for scrolling<br />
*or pressing the MMB button of the trackpoint and use the trackpoint for scrolling.<br />
*Even horizontal scrolling works automagically in Konqueror, for Firefox/Opera see below.<br />
<br />
Simultaneously I can use <br />
*a press on the external mouse's wheel <br />
*or the MMB of the trackpoint<br />
<br />
for pasting the buffer. Lovely! :) }}<br />
<br />
{{HINT| If you don't use the middle-mouse-button for pasting and sometimes pasting things by mistake while scrolling (witch is really odd) simply set the "EmulateWheelTimeOut" to "1" as a (bloody) workaround. Middle click will only possible with pressing left and right button simultaneously!}}<br />
=Application specific tweaks=<br />
===Configure Opera for using trackpoint horizontal scrolling===<br />
To fix horizontal scrolling in Opera, you need to edit the configfile <tt>standard_mouse.ini</tt> in e.g. /usr/share/opera/ini/ (Debian) or /opt/opera/share/opera/ini/ (Gentoo) and comment out the following lines<br />
<pre><br />
Button6 = Back<br />
Button7 = Forward<br />
</pre><br />
so they look like that<br />
<pre><br />
;Button6 = Back<br />
;Button7 = Forward<br />
</pre><br />
Remember, Button6 and Button7 do not so coincidental correspond with our X configuration we know from above:<br />
<pre><br />
Option "YAxisMapping" "6 7"<br />
</pre><br />
After this change you will be able to scroll vertically and horizontally with your middle button.<br />
<br />
===Firefox 3 tweaks===<br />
These settings make Firefox on Linux behave more like the Windows version. They were tested on an out of the box Fedora 10 system on a Thinkpad T61. Go into about:config, and set the following:<br />
<br />
middlemouse.paste = false<br />
middlemouse.contentLoadURL = false<br />
general.autoScroll = true<br />
<br />
=Sysfs Options Reference=<br />
{{NOTE|These options are current as of kernel version 2.6.29, 3 May 2009}}<br />
{| <br />
|-<br />
! Name<br />
! Type<br />
! Default<br />
! Notes<br />
|-<br />
| sensitivity<br />
| Integer<br />
| 128<br />
| Sensitivity<br />
|-<br />
| speed<br />
| Integer<br />
| 97<br />
| Cursor speed<br />
|-<br />
| inertia<br />
| Integer<br />
| 6<br />
| Described as "negative inertia." It acts more like friction. High values cause the cursor to snap backward when the Trackpoint is released<br />
|-<br />
| reach<br />
| Integer<br />
| 10<br />
| Backup for Z-axis press<br />
|-<br />
| draghys<br />
| Integer<br />
| 255<br />
| Drag hysteresis (how hard it is to drag with Z-axis pressed)<br />
|-<br />
| mindrag<br />
| Integer<br />
| 20<br />
| Minimum amount of force needed to trigger dragging<br />
|-<br />
| thresh<br />
| Integer<br />
| 8<br />
| Minimum value for a Z-axis press<br />
|-<br />
| upthresh<br />
| Integer<br />
| 255<br />
| Used to generate a 'click' on Z-axis<br />
|-<br />
| ztime<br />
| Integer<br />
| 38<br />
| How sharp of a press<br />
|-<br />
| jenks<br />
| Integer<br />
| 135<br />
| Minimum curvature for double click<br />
|-<br />
| press_to_select<br />
| Boolean<br />
| 0<br />
| Press to select<br />
|-<br />
| skipback<br />
| Boolean<br />
| 0<br />
| Supress movement after drag release <br />
|-<br />
| ext_dev<br />
| Boolean<br />
| 0<br />
| Disable external device<br />
|}<br />
Table info taken from [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/input/mouse/trackpoint.h;hb=HEAD here]. The given link will always point to the current version of the driver. If the notes seem sparse, that's because the code is sparse. On the other hand, the [http://wwwcssrv.almaden.ibm.com/trackpoint/files/ykt3eext.pdf Trackpoint Engineering Specification Version 4.0] <!--if this link breaks, I recommend a quick Google search for "trackpoint version 4 engineering specifications" --> contains more documentation information than anyone ever desired.</div>SpeedEvilhttps://www.thinkwiki.org/w/index.php?title=User_talk:SpeedEvil&diff=43512User talk:SpeedEvil2009-06-21T17:01:14Z<p>SpeedEvil: â†Created page with 'I haz a x60s. And a flavour!'</p>
<hr />
<div>I haz a x60s. And a flavour!</div>SpeedEvil