Difference between revisions of "Active Protection System"

From ThinkWiki
Jump to: navigation, search
(Related Links)
(added category)
 
(143 intermediate revisions by 48 users not shown)
Line 1: Line 1:
 
{| width="100%"
 
{| width="100%"
|style="vertical-align:top;padding-right:20px;width:10px;" | [[Image:APS.jpg|IBM Active Protection System]]
+
|style="vertical-align:top;padding-right:20px;width:10px;" | [[Image:APS.jpg|IBM Active Protection System]] __NOTOC__
 
|style="vertical-align:top" |
 
|style="vertical-align:top" |
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
=== The Active Protection System ===
 
=== The Active Protection System ===
With the new series of Thinkpads IBM introduced the Active Protection System (APS) in 2003. The APS is a protection system for the Thinkpad's internal harddrive. A sensor inside the Thinkpad recognizes when the notebook is accelerated. A software applet then is triggered to park the harddisk. This way the risk of data loss in case of when the notebook is dropped is significantly reduced since the read/write head of the harddrive is parked and hence can't crash onto the platter when the notebook drops onto the floor.
+
With the new series of ThinkPads IBM introduced the Active Protection System (APS) in 2003. The APS is a protection system for the ThinkPad's internal harddrive. A sensor inside the ThinkPad recognizes when the notebook is accelerated. A software applet then is triggered to park the harddisk. This way the risk of data loss in case of when the notebook is dropped is significantly reduced since the read/write head of the harddrive is parked and hence can't crash onto the platter when the notebook drops onto the floor.
  
The whole concept of the technology seems very advanced. For the first part, the hardware sensor is capable of not only recognizing acceleration of the notebook, but also (to a certain degree) of its whole orientation in space, relative to gravity's axis. Furthermore, having the actual control put into software, its functionality is extendable and it gives chance to implement features like the "ignore minor shocks" feature which is present in the Windows based control applet. (This feature prevents the harddrive from parking in case of minor regular shocks such as occur when in a train or car.)
+
The hardware sensor is capable of not only recognizing acceleration of the notebook, but also (to a certain degree) of its whole orientation in space, relative to gravity's axis. Furthermore, having the actual control put into software, its functionality is extendable and it gives chance to implement features like the "ignore minor shocks" feature which is present in the Windows based control applet. (This feature prevents the harddrive from parking in case of minor regular shocks such as occur when in a train or car.)
 +
 
 +
The measurements are physically performed by an [[Analog Devices ADXL320 accelerometer]] chip, managed by the [[Embedded Controller Chips|embedded controller]].
 
</div>
 
</div>
 
|}
 
|}
 +
 +
* [ftp://ftp.software.ibm.com/pc/pccbbs/mobiles_pdf/aps2mst.pdf IBM Active Protection System Whitepaper]
 +
 +
==Hard-disk Support==
 +
 +
HD-APS requires a hard-disk with [http://www.hitachigst.com/hdd/research/storage/hdi/loadunload.html head unload ramp technology] and also support on the hard-disk firmware to unload heads without flushing the disk cache.  This is required, because as soon as the APS system detects a shock is imminent, the system has less than 500ms to prepare for the shock.
 +
 +
Unloading heads without flushing the cache is done using the [http://www.t13.org/Documents/UploadedDocuments/docs2003/e03120r5.pdf optional Unload Immediate feature of the IDLE IMMEDIATE ATA command].  It finishes whatever sector write is in-flight, and immediately moves the heads to the unload ramp.  Without this command, hard-disk APS cannot be trusted, as disks with big caches can take a lot of time to write it all to disk.
 +
 +
So far, only hard-disks with IBM APS firmware, as well as the consumer Fujitsu HV2060AH/MHV2100AH/MHV2120AH HDs have been found to implement all the necessary functions.  Head unload technology is reasonably common in modern laptop disks, but the APS firmware is very rare in regular consumer products.  Please note that newer Apple notebooks also support APS, so it is somewhat likely that their disks also support unload immediate or a similar feature.
 +
 +
(Update: February, 2009) Meanwhile, other HDD manufacturers may have added the necessary support to their new products. E.g., [http://www.hitachigst.com/tech/techlib.nsf/techdocs/3255FB0B917AEB69862574B400578C7F/$file/TS7K320_OEM_Specification.pdf Hitachi Travelstar 7K320 spec] does mention some 'Idle Immediate with Unload Option' command. The description reads pretty much like what's needed for APS, though I don't want to drop my almost new TP just to field-test it.
  
 
==Linux Support==
 
==Linux Support==
Linux support is so far not available.
+
Linux support is in development.
  
Note that this feature definitely depends on software and there is no hardware or BIOS only way of making it work. A statement from IBM clearifies this:
+
This feature definitely depends on software and there is no hardware or BIOS-only way of making it work.
"The APS system will require  APS software to be installed on the  
+
IBM made contradictory statements about their willingness to release the specifications of the hardware sensor and its API to the linux community or some developers. Although a lot of developers and other interested people from the OpenSource community actively contacted IBM to get the specs, in fact they never got them.
computer before it activates the harddrive parking . This means it will
 
not work on systems preloaded with Linux."
 
  
However, IBM made general (unofficial) statements that they are willing to release the specifications of the hardware sensor and its API to the linux community or some developers, but they in fact, never did. Also some linux developers actively tried to contact with IBM about the issue but were unable to make progress.
+
However, after first efforts of [http://www.kernelthread.com/software/ams/ Amit Singh on a PowerBook] and [http://www.almaden.ibm.com/cs/people/marksmith/tpaps.html Mark Smith on a ThinkPad], the [[HDAPS]] project was founded to produce a linux kernel driver for the acceleration sensor and a user space application to monitor it. Later, a kernel patch to enable harddisk parking followed.
  
{| Border="1" Cellspacing="0" Cellpadding="2"
+
See [[How to protect the harddisk through APS]] for instructions and [[Problem with APS harddisk parking]] for Troubleshooting.
|+The following table is supposed to give us a chance to gather information about the efforts made and how they ended up.
+
 
|-
+
Furthermore, a list of alternative applications like theft alarm and others can be found on the [[HDAPS]] driver page.
! Date !! User !! effort made !! result
+
 
|-
+
==Tilt detection field tests==
| March 2004 || [[User:Wyrfel|Wyrfel]] || asked IBM representatives at CeBIT 2004 about state of linux support || got promise that specifications will be released, but nothing actually happened
+
Using Perl code for WinXP:
|}
+
<pre>
 +
use Win32API::File qw(:ALL);
 +
sub get_tilt {
 +
      my $file = createFile("//./ShockMgr", "r ke") or die "Can't get ShockMgr device";
 +
      DeviceIoControl($file, 0x733fc, [], 0, my($buf), 0x24, my($bytes), []);
 +
      my @data = unpack "x4s*", $buf;
 +
      return @data[1, 0];
 +
}
 +
</pre>
 +
my T42 gives values of roughly 490 when at rest in normal upright position with base parallel to the ground.  As I gently tilt the T42 through all possible x or y angles, the values range from about 335-645, meaning a resolution of about 155 units per Earth gravity.  This seems to suggest that the operating range of the APS is actually about +-3 gs, although the ADXL320 is supposed to allow +-5 gs.
 +
 
 +
As the tilt angle is the arcsine of the normalized APS reading, the Thinkpad is most tilt sensitive when in a normal upright position with base parallel to the ground.  In this position, the tilt resolution is about 0.35 - 0.4 degrees.  At maximum tilt, the resolution is much worse, about 6.5 degrees.
 +
 
 +
Shouldn't matter much, but my tests are at an elevation of about 60 meters above sea level.
 +
 
 +
===More field tests===
 +
When placed on a reasonably flat and reasonably horizontal work surface my T43 provides readings of about x=503 and y=569. I wrote a command-line application in C# (using the .NET DllImport annotation to access the sensor.dll API) to log the sensor readings at some interval. With 150ms sampling I found the following extreme values: 335 to 654 for x, and 409 to 723 for y. 
  
Hi, is it worth to contact ibm in some sort of conserted effort
+
<pre>
to get this going?
+
x: 494.5  +/- 159.5
 +
y: 566.0  +/- 157.0
 +
</pre>
  
==Related Links==
+
Based on the maximum and minimum x and y readings I calculated the above "zero" and range values in order to convert the sensor readings to degrees and wrapped this up in a small graphical application for Windows. My data, source code, executables and a complete description can be found [http://www.stanford.edu/~bsuter/thinkpad-accelerometer/ here].
*[http://www.pc.ibm.com/presentations/us/thinkvantage/56/index.html?shortcut=aps& IBMs ThinkVantage<sup>TM</sup> Technologies Flash presentation - Active Protection System]
 
  
*To bypass the flash presentation, use this link (www.pc.ibm.com/us/think/thinkvantagetech.html) [http://www.pc.ibm.com/us/think/thinkvantagetech.html]
+
== See also ==
 +
* [[HDAPS]] - IBM Active Protection System Linux Driver. Shows various applications of APS.
  
* Quoted from NewScientist.com: The latest Apple PowerBook laptops can be controlled with a gentle shake. Programmer Amit Singh has written code that lets him use the sensor to control software on the computer. The code is published at [http://www.kernelthread.com/software/ams/ www.kernelthread.com/software/ams/].
+
==Related Links==
 +
*[http://www.stanford.edu/~bsuter/thinkpad-accelerometer/ Sensor Data, Calibration, command-line and GUI executables for Windows and C# .NET source code]  (link broken)
 +
*[http://www.ibm.com/developerworks/blogs/page/johnston?entry=python_and_thinkpad Python and ThinkPad, a Python script for Windows to access the sensor data] (comments are spam fooded)
 +
*[http://www.pc.ibm.com/presentations/us/thinkvantage/56/index.html?shortcut=aps& IBMs ThinkVantage&trade; Technologies Flash presentation - Active Protection System]
 +
*[http://www.musatcha.com/software/LaptopTheftPrevention/ Motion-Sensitive anti-theft alarm for ThinkPads with APS]
 +
*[http://www-128.ibm.com/developerworks/linux/library/l-knockage.html?ca=dgr-lnxw01Knock-Knock IBM HDAPS/Linux HDAPS information page]
 +
*[http://hdaps.sourceforge.net HDAPS project page]
 +
*[http://sourceforge.net/mailarchive/forum.php?forum=hdaps-devel HDAPS-devel list archive]
  
 +
==Models featuring this Technology==
 +
*ThinkPad {{Edge 14"}}, {{Edge 15"}}
 +
*ThinkPad {{L412}}, {{L512}}
 +
*ThinkPad {{R50}}, {{R50p}}, {{R51}}, {{R52}}, {{R60}}, {{R61}}, {{R61i}}, {{R400}}, {{R500}}
 +
*ThinkPad {{SL Series}}
 +
*ThinkPad {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}, {{T60}}, {{T60p}}, {{T61}}, {{T61p}}, {{T400}}, {{T410}}, {{T410i}}, {{T410s}}, {{T410si}}, {{T500}}, {{T510}}, {{T510i}}
 +
*ThinkPad {{W Series}}
 +
*ThinkPad {{X40}}, {{X41}}, {{X41_Tablet}}, {{X60}}, {{X60s}}, {{X60_Tablet}}, {{X61}}, {{X61s}}, {{X61 Tablet}}, {{X100e}}, {{X200}}, {{X200s}}, {{X200 Tablet}}, {{X201}}, {{X201i}}, {{X201s}}, {{X201 Tablet}}, {{X300}}, {{X301}}
 +
*ThinkPad {{Z Series}}
  
[[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R51p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:X40]] [[Category:X41]]
+
[[Category:Glossary]] [[Category:ThinkPad Technologies]]

Latest revision as of 16:02, 22 January 2021

IBM Active Protection System

The Active Protection System

With the new series of ThinkPads IBM introduced the Active Protection System (APS) in 2003. The APS is a protection system for the ThinkPad's internal harddrive. A sensor inside the ThinkPad recognizes when the notebook is accelerated. A software applet then is triggered to park the harddisk. This way the risk of data loss in case of when the notebook is dropped is significantly reduced since the read/write head of the harddrive is parked and hence can't crash onto the platter when the notebook drops onto the floor.

The hardware sensor is capable of not only recognizing acceleration of the notebook, but also (to a certain degree) of its whole orientation in space, relative to gravity's axis. Furthermore, having the actual control put into software, its functionality is extendable and it gives chance to implement features like the "ignore minor shocks" feature which is present in the Windows based control applet. (This feature prevents the harddrive from parking in case of minor regular shocks such as occur when in a train or car.)

The measurements are physically performed by an Analog Devices ADXL320 accelerometer chip, managed by the embedded controller.

Hard-disk Support

HD-APS requires a hard-disk with head unload ramp technology and also support on the hard-disk firmware to unload heads without flushing the disk cache. This is required, because as soon as the APS system detects a shock is imminent, the system has less than 500ms to prepare for the shock.

Unloading heads without flushing the cache is done using the optional Unload Immediate feature of the IDLE IMMEDIATE ATA command. It finishes whatever sector write is in-flight, and immediately moves the heads to the unload ramp. Without this command, hard-disk APS cannot be trusted, as disks with big caches can take a lot of time to write it all to disk.

So far, only hard-disks with IBM APS firmware, as well as the consumer Fujitsu HV2060AH/MHV2100AH/MHV2120AH HDs have been found to implement all the necessary functions. Head unload technology is reasonably common in modern laptop disks, but the APS firmware is very rare in regular consumer products. Please note that newer Apple notebooks also support APS, so it is somewhat likely that their disks also support unload immediate or a similar feature.

(Update: February, 2009) Meanwhile, other HDD manufacturers may have added the necessary support to their new products. E.g., Hitachi Travelstar 7K320 spec does mention some 'Idle Immediate with Unload Option' command. The description reads pretty much like what's needed for APS, though I don't want to drop my almost new TP just to field-test it.

Linux Support

Linux support is in development.

This feature definitely depends on software and there is no hardware or BIOS-only way of making it work. IBM made contradictory statements about their willingness to release the specifications of the hardware sensor and its API to the linux community or some developers. Although a lot of developers and other interested people from the OpenSource community actively contacted IBM to get the specs, in fact they never got them.

However, after first efforts of Amit Singh on a PowerBook and Mark Smith on a ThinkPad, the HDAPS project was founded to produce a linux kernel driver for the acceleration sensor and a user space application to monitor it. Later, a kernel patch to enable harddisk parking followed.

See How to protect the harddisk through APS for instructions and Problem with APS harddisk parking for Troubleshooting.

Furthermore, a list of alternative applications like theft alarm and others can be found on the HDAPS driver page.

Tilt detection field tests

Using Perl code for WinXP:

use Win32API::File qw(:ALL);
sub get_tilt {
      my $file = createFile("//./ShockMgr", "r ke") or die "Can't get ShockMgr device";
      DeviceIoControl($file, 0x733fc, [], 0, my($buf), 0x24, my($bytes), []);
      my @data = unpack "x4s*", $buf;
      return @data[1, 0];
}

my T42 gives values of roughly 490 when at rest in normal upright position with base parallel to the ground. As I gently tilt the T42 through all possible x or y angles, the values range from about 335-645, meaning a resolution of about 155 units per Earth gravity. This seems to suggest that the operating range of the APS is actually about +-3 gs, although the ADXL320 is supposed to allow +-5 gs.

As the tilt angle is the arcsine of the normalized APS reading, the Thinkpad is most tilt sensitive when in a normal upright position with base parallel to the ground. In this position, the tilt resolution is about 0.35 - 0.4 degrees. At maximum tilt, the resolution is much worse, about 6.5 degrees.

Shouldn't matter much, but my tests are at an elevation of about 60 meters above sea level.

More field tests

When placed on a reasonably flat and reasonably horizontal work surface my T43 provides readings of about x=503 and y=569. I wrote a command-line application in C# (using the .NET DllImport annotation to access the sensor.dll API) to log the sensor readings at some interval. With 150ms sampling I found the following extreme values: 335 to 654 for x, and 409 to 723 for y.

 x: 494.5   +/- 159.5
 y: 566.0   +/- 157.0

Based on the maximum and minimum x and y readings I calculated the above "zero" and range values in order to convert the sensor readings to degrees and wrapped this up in a small graphical application for Windows. My data, source code, executables and a complete description can be found here.

See also

  • HDAPS - IBM Active Protection System Linux Driver. Shows various applications of APS.

Related Links

Models featuring this Technology